[ccontrol] ccontrol 0.6 make bug
Rusty Russell
rusty at rustcorp.com.au
Thu Dec 15 09:50:38 EST 2005
On Wed, 2005-12-14 at 21:32 +1100, Martin Schwenke wrote:
> In ccontrol version 0.6 (Tony Breeds) there seems to be a subtle bug
> somewhere in the make code. I'm trying to use crosstool (to build a
> cross compiler :-). At the following stage glibc has been built and
> an attempt is made to install it:
>
> make install_root=/opt/crosstool/gcc-4.0.2-glibc-2.2.5/powerpc-604-linux-gnu/powerpc-604-linux-gnu prefix= install
>
> This causes the following rule to be invoked:
>
> install:
> LANGUAGE=C LC_ALL=C; export LANGUAGE LC_ALL; \
> $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" CVSOPTS="$(CVSOPTS)" -C $(srcdir) objdir=`pwd` $@
>
> Somewhere in the depths of the Makefile in srcdir (and its include
> files), the value of install_root gets overridden (with /usr :-),
Hmm, we do override $MAKE to force it back to "make" (otherwise
it's /usr/bin/make, which would bypass ccontrol).
I wonder if they're doing something funky like setting $MAKE to "make
install_root=..." and we're blowing it away? Does hacking the ccontrol
source to print out the original $MAKE show anything?
diff -r 5a21da15f54f ccontrol.c
--- a/ccontrol.c Thu Dec 8 05:07:30 2005
+++ b/ccontrol.c Thu Dec 15 09:49:45 2005
@@ -72,6 +72,9 @@
switch (type) {
case TYPE_MAKE:
+ if (getenv("MAKE"))
+ __verbose("$MAKE is", getenv("MAKE"), NULL);
+
/* Ensure make calls us for children, not /usr/bin/make. */
setenv("MAKE", "make", 1);
--
ccontrol: http://ozlabs.org/~rusty/ccontrol
More information about the ccontrol
mailing list