From 6f2f1690156d4815a40977f900f098af4f745086 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 6 Nov 2000 18:18:22 +0000 Subject: [PATCH] Fix GNU make detection. (The test 'make --version' with FreeBSD make (and potentially others) would just reinvoke make on the same Makefile, resulting in an infinite loop.) --- Makefile | 6 +++--- src/Makefile | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ba03d24c5d..e73686416c 100644 --- a/Makefile +++ b/Makefile @@ -13,14 +13,14 @@ all check install installdirs installcheck uninstall dep depend clean distclean maintainer-clean: @if ! [ -f GNUmakefile ] ; then \ - echo "You need to run the \`configure' program first. See the file"; \ - echo "\`INSTALL' for installation instructions." ; \ + echo "You need to run the 'configure' program first. See the file"; \ + echo "'INSTALL' for installation instructions." ; \ false ; \ fi @IFS=':' ; \ for dir in $$PATH; do \ for prog in gmake gnumake make; do \ - if [ -f $$dir/$$prog ] && ( $$dir/$$prog --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \ + if [ -f $$dir/$$prog ] && ( $$dir/$$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \ GMAKE=$$dir/$$prog; \ break 2; \ fi; \ diff --git a/src/Makefile b/src/Makefile index c5eca7a9d2..e73686416c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -11,16 +11,16 @@ # GNUmakefile won't exist yet, so we catch that case as well. -all install clean dep depend distclean maintainer-clean: +all check install installdirs installcheck uninstall dep depend clean distclean maintainer-clean: @if ! [ -f GNUmakefile ] ; then \ - echo "You need to run the \`configure' program first. See the file"; \ - echo "\`INSTALL' for installation instructions." ; \ + echo "You need to run the 'configure' program first. See the file"; \ + echo "'INSTALL' for installation instructions." ; \ false ; \ fi @IFS=':' ; \ for dir in $$PATH; do \ for prog in gmake gnumake make; do \ - if [ -f $$dir/$$prog ] && ( $$dir/$$prog --version | grep GNU >/dev/null 2>&1 ) ; then \ + if [ -f $$dir/$$prog ] && ( $$dir/$$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \ GMAKE=$$dir/$$prog; \ break 2; \ fi; \ -- 2.49.0