install.do: stub /usr/bin programs: be smarter about finding the libdir.

We were hardcoding the absolute $LIBDIR location, which sounds smart, but not if
you're doing "make install" into a temp dir that will end up somewhere else
later.

Instead, look for ../lib/redo/ from wherever the binary is installed.
This commit is contained in:
Avery Pennarun 2010-12-14 02:51:44 -08:00
commit 5f9b6eeaf4

View file

@ -33,8 +33,9 @@ for d in redo redo-ifchange redo-ifcreate redo-always redo-stamp redo-oob; do
fix=$(echo $d | sed 's,-,_,g')
cat >install.wrapper <<-EOF
#!/usr/bin/python
import sys;
sys.path.insert(0, '$LIBDIR')
import sys, os;
exedir = os.path.dirname(os.path.abspath(sys.argv[0]))
sys.path.insert(0, os.path.join(exedir, '../lib/redo'))
import $fix
EOF
$INSTALL -m 0755 install.wrapper $BINDIR/$d