diff options
author | csilvers <csilvers@01de4be4-8c4a-0410-9132-4925637da917> | 2008-06-04 05:17:00 +0000 |
---|---|---|
committer | csilvers <csilvers@01de4be4-8c4a-0410-9132-4925637da917> | 2008-06-04 05:17:00 +0000 |
commit | 35d0b01bdde4509a071e668cb2a4ea90017184ea (patch) | |
tree | 0d0d3fcdf7fba015f4291dd1df69fd3b59d5bc31 /Makefile.in | |
parent | ffcaacfae4a222660c8fc15ef1ebf83dccc66ee1 (diff) | |
download | distcc-35d0b01bdde4509a071e668cb2a4ea90017184ea.tar.gz |
It turns out setup.py has a bug(?) in its --record output: in theory,
the paths of the --record fields should start with --prefix, but
sometimes the paths remove the leading / from --prefix:
% env CPPFLAGS='-Isrc -Ilzo -Ipopt' SRCDIR=`pwd` include_server/setup.py install --prefix=/tmp/distcc-bar --record=/dev/stdout --root=/var/
tmp/distcc-bar/lib/python2.4/site-packages/include_server/parse_file_test.pyc
[...]
% env CPPFLAGS='-Isrc -Ilzo -Ipopt' SRCDIR=`pwd` include_server/setup.py install --prefix=/tmp/distcc-bar --record=/dev/stdout --root=/var
/tmp/distcc-bar/lib/python2.4/site-packages/include_server/parse_file_test.pyc
[...]
It's hard to predict how, when and why it does this (--root=/ and
--root="" are particularly confusing cases), but luckily we know we
always want the leading slash: configure dies if --prefix isn't an
absolute path. So with this change, we just let setup.py write
whatever it wants to, and then add a leading slash before each line of
the --record output if it's missing.
Tested by running
./configure --prefix=/tmp/distcc
rm -rf /tmp/distcc; make install
rm -rf /var/tmp/tmp/distcc; make install DESTDIR=/var/tmp
rm -rf /var/tmp/tmp/distcc; make install DESTDIR=/var/tmp/
and verified that files ended up where expected, and the pump script
looked like expected (with pump's sibling files living in
/tmp/distcc/...).
Reviewed by fergus
git-svn-id: http://distcc.googlecode.com/svn/trunk@461 01de4be4-8c4a-0410-9132-4925637da917
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index 86b9588..33ead7d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1003,6 +1003,9 @@ install-programs: $(bin_PROGRAMS) # tell is to have setup.py install it, and then look what it says (via # the --record output). So when installing pump, we look at the # --record output and modify the installed pump to have that location. +# Note: --record output is inconsistent (buggy?) and sometimes leaves out +# the leading slash in $prefix, even though we require prefix start with +# a slash. We add it back in at cp time. install-include-server: include-server pump if test -z "$(INCLUDESERVER_PYTHON)"; then \ echo "Not building $@: No suitable python found"; \ @@ -1018,9 +1021,10 @@ install-include-server: include-server pump --build-temp="$(include_server_builddir)" \ install \ --prefix="$(prefix)" \ - --record="$(include_server_builddir)/install.log" \ + --record="$(include_server_builddir)/install.log.pre" \ --root="$$DESTDIR" \ || exit 1; \ + sed '/^[^\/]/ s,^,/,' "$(include_server_builddir)/install.log.pre" > "$(include_server_builddir)/install.log"; \ if test -n "$(PYTHON_INSTALL_RECORD)"; then \ cp -f "$(include_server_builddir)/install.log" "$(PYTHON_INSTALL_RECORD)"; \ fi; \ |