BSD make errors out since the Makefiles use GNU make specific code.
However, on BSD systems, 'make' is BSD make and not GNU make.
make(1) does set ${MAKE} to argv[0], so use this to pass the correct
make executable name down.
Also, prefer gmake to make, if it exists, since we want GNU make.
Signed-off-by: Thomas Klausner <tk@giga.or.at>
Tested-by: Gabriel Filion <lelutin@gmail.com>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
config/config.h: config/Makefile config/configure config/configure.inc \
$(wildcard config/*.in)
- cd config && make config.h
+ cd config && ${MAKE} config.h
lib/bup/_helpers$(SOEXT): \
config/config.h \
-include config.vars
config.h: configure configure.inc $(wildcard *.in)
- ./configure
+ MAKE=${MAKE} ./configure
clean:
rm -f ${CONFIGURE_FILES} ${GENERATED_FILES}
fi
TLOGN "checking the GNU make"
-MAKE=`acLookFor make`
+[ -n "$MAKE" ] || MAKE=`acLookFor make`
if [ -z "$MAKE" ]; then
AC_FAIL " Cannot find make";
fi
# assuming the above checks pass, get the path of everything
-MF_PATH_INCLUDE GMAKE make gmake
+MF_PATH_INCLUDE GMAKE gmake make
MF_PATH_INCLUDE GIT git
MF_PATH_INCLUDE TAR tar gtar
MF_PATH_INCLUDE PYTHON python