configure.in does
source /etc/make.conf
under certain circumstanses, which is bad since make.conf isn't a shell script but a makefile. What is the right solution?
In the last episode (Mar 09), Martin Nilsson (saturator) @ Pike (-) developers forum said:
configure.in does
source /etc/make.conf
under certain circumstanses, which is bad since make.conf isn't a shell script but a makefile. What is the right solution?
The simplest thing might be to just add CC=${CC} CFLAGS=${CFLAGS} (etc, for each variable configure cares about) to CONFIGUREARGS in the main Makefile. BSD make automatically includes /etc/make.conf, so that will work. This is essentially what the BSD ports trees do.
"make -V variable" asks make what it thinks a variable's value defaults to, so you could also add something like CC=${CC-`make -V CC`} to ./configure , to set CC to the default if it hasn't already been set.
If the user is using GNU make, it's probably best not to try and use it at all because it may have BSD make constructs in it (or alternatively, try and find a BSD make and use $BSDMAKE -V).
pike-devel@lists.lysator.liu.se