From 69089e27a6e5acc6ec3ef405a7a942c7f39f35ef Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Mon, 24 Sep 2012 14:45:33 +0200 Subject: [PATCH] Fix GNU make detection and usage. 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 Tested-by: Gabriel Filion Reviewed-by: Rob Browning --- Makefile | 2 +- config/Makefile | 2 +- config/configure | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ce91ff0..6b26f4e 100644 --- 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 \ diff --git a/config/Makefile b/config/Makefile index 451e49d..b383106 100644 --- a/config/Makefile +++ b/config/Makefile @@ -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} diff --git a/config/configure b/config/configure index 8841fff..fce0dde 100755 --- a/config/configure +++ b/config/configure @@ -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 -- 2.39.2