]> arthur.barton.de Git - bup.git/commitdiff
Fix GNU make detection and usage.
authorThomas Klausner <tk@giga.or.at>
Mon, 24 Sep 2012 12:45:33 +0000 (14:45 +0200)
committerRob Browning <rlb@defaultvalue.org>
Wed, 26 Sep 2012 18:37:46 +0000 (13:37 -0500)
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>
Makefile
config/Makefile
config/configure

index ce91ff0172451b167f76db86ad13cc8aa207bdf1..6b26f4e5d138795bf57b22a445dc8086d1c4ad44 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,7 @@ install: all
        
 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 \
index 451e49d6d7030f61787c0619dda36c7fc4fd5a33..b383106ecc10f9234abc0c80963ff9f1f49d7587 100644 (file)
@@ -1,7 +1,7 @@
 -include config.vars
 
 config.h: configure configure.inc $(wildcard *.in)
-       ./configure
+       MAKE=${MAKE} ./configure
 
 clean:
        rm -f ${CONFIGURE_FILES} ${GENERATED_FILES}
index 8841fff7c0de662caab6f4586d3d6246f663cc80..fce0ddea948048a1f7fe8063476c4e46e1fddc0e 100755 (executable)
@@ -12,7 +12,7 @@ if ! AC_PROG_CC; then
 fi
 
 TLOGN "checking the GNU make"
-MAKE=`acLookFor make`
+[ -n "$MAKE" ] || MAKE=`acLookFor make`
 if [ -z "$MAKE" ]; then
     AC_FAIL " Cannot find make";
 fi
@@ -45,7 +45,7 @@ TLOG " - you have some git program - ok"
 
 
 # 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