OSDN Git Service

Fix GNU make detection.
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 6 Nov 2000 18:18:22 +0000 (18:18 +0000)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 6 Nov 2000 18:18:22 +0000 (18:18 +0000)
(The test 'make --version' with FreeBSD make (and potentially others)
would just reinvoke make on the same Makefile, resulting in an infinite
loop.)

Makefile
src/Makefile

index ba03d24..e736864 100644 (file)
--- a/Makefile
+++ b/Makefile
 
 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; \
index c5eca7a..e736864 100644 (file)
 # 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; \