Hello Bruno, all, on some systems it is helpful to do things like MAKE=pmake gnulib-tool ...
in order to test autotools' output for non-GNU make; also, inside makefile snippets, using plain 'make' can lead to oddities, e.g., when using 'make -j2'. OK to push? Thanks! Ralf gnulib-tool, maint.mk: use $MAKE not make * gnulib-tool: Default $MAKE to 'make'. (func_create_testdir, func_create_megatestdir): Use $MAKE rather than make. Initialize $MAKE in the do-autobuild script. * top/maint.mk (init-coverage, build-coverage): Use $(MAKE) rather than make. diff --git a/gnulib-tool b/gnulib-tool index a044ead..e98395a 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -63,6 +63,11 @@ if test -z "${AUTOPOINT}" || test -n "${GETTEXTPATH}"; then AUTOPOINT="${GETTEXTPATH}autopoint" fi +# You can set MAKE. +if test -z "${MAKE}"; then + MAKE=make +fi + # When using GNU sed, turn off as many GNU extensions as possible, # to minimize the risk of accidentally using non-portable features. # However, do this only for gnulib-tool itself, not for the code that @@ -4184,9 +4189,9 @@ func_create_testdir () ./configure || func_exit 1 cd "$sourcebase" echo 'built_sources: $(BUILT_SOURCES)' >> Makefile - make built_sources || func_exit 1 + $MAKE built_sources || func_exit 1 cd .. - make distclean || func_exit 1 + $MAKE distclean || func_exit 1 ) || func_exit 1 fi } @@ -4239,6 +4244,7 @@ func_create_megatestdir () -e 's,^\([0-9]*\) \([0-9]*\) \([0-9]*\),\3\2\1,'` (echo '#!/bin/sh' echo "CVSDATE=$cvsdate" + echo ": \${MAKE=make}" echo "test -d logs || mkdir logs" echo "for module in $megasubdirs; do" echo " echo \"Working on module \$module...\"" @@ -4250,7 +4256,7 @@ func_create_megatestdir () echo " : autobuild revision... cvs-\$CVSDATE-000000" echo " : autobuild timestamp... \`date \"+%Y%m%d-%H%M%S\"\`" echo " : autobuild hostname... \`hostname\`" - echo " cd \$module && ./configure \$CONFIGURE_OPTIONS && make && make check && make distclean" + echo " cd \$module && ./configure \$CONFIGURE_OPTIONS && \$MAKE && \$MAKE check && \$MAKE distclean" echo " echo rc=\$?" echo " ) 2>&1 | { if test -n \"\$AUTOBUILD_SUBST\"; then sed -e \"\$AUTOBUILD_SUBST\"; else cat; fi; } > logs/\$safemodule" echo "done" @@ -4462,9 +4468,9 @@ case $mode in mkdir build cd build ../configure || func_exit 1 - make || func_exit 1 - make check || func_exit 1 - make distclean || func_exit 1 + $MAKE || func_exit 1 + $MAKE check || func_exit 1 + $MAKE distclean || func_exit 1 remaining=`find . -type f -print` if test -n "$remaining"; then echo "Remaining files:" $remaining 1>&2 @@ -4485,9 +4491,9 @@ case $mode in mkdir build cd build ../configure - make - make check - make distclean + $MAKE + $MAKE check + $MAKE distclean remaining=`find . -type f -print` if test -n "$remaining"; then echo "Remaining files:" $remaining 1>&2 diff --git a/top/maint.mk b/top/maint.mk index d04530c..f378bd5 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -2,7 +2,7 @@ # This Makefile fragment is intended to be useful by any GNU-like project. # This file originate from coreutils, CPPI, Bison, and Autoconf. -# Copyright (C) 2001-2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2009 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -110,15 +110,15 @@ syntax-check: $(syntax-check-rules) # Code Coverage init-coverage: - make clean + $(MAKE) clean lcov --directory . --zerocounters COVERAGE_CCOPTS ?= "-g --coverage" COVERAGE_OUT ?= doc/coverage build-coverage: - make CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) - make CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check + $(MAKE) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) + $(MAKE) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check mkdir -p $(COVERAGE_OUT) lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \ --capture