Skip to content

Commit 6f2f169

Browse files
committed
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.)
1 parent db631de commit 6f2f169

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414
all check install installdirs installcheck uninstall dep depend clean distclean maintainer-clean:
1515
@if ! [ -f GNUmakefile ] ; then \
16-
echo "You need to run the \`configure' program first. See the file"; \
17-
echo "\`INSTALL' for installation instructions." ; \
16+
echo "You need to run the 'configure' program first. See the file"; \
17+
echo "'INSTALL' for installation instructions." ; \
1818
false ; \
1919
fi
2020
@IFS=':' ; \
2121
for dir in $$PATH; do \
2222
for prog in gmake gnumake make; do \
23-
if [ -f $$dir/$$prog ] && ( $$dir/$$prog --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \
23+
if [ -f $$dir/$$prog ] && ( $$dir/$$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \
2424
GMAKE=$$dir/$$prog; \
2525
break 2; \
2626
fi; \

src/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
# GNUmakefile won't exist yet, so we catch that case as well.
1212

1313

14-
all install clean dep depend distclean maintainer-clean:
14+
all check install installdirs installcheck uninstall dep depend clean distclean maintainer-clean:
1515
@if ! [ -f GNUmakefile ] ; then \
16-
echo "You need to run the \`configure' program first. See the file"; \
17-
echo "\`INSTALL' for installation instructions." ; \
16+
echo "You need to run the 'configure' program first. See the file"; \
17+
echo "'INSTALL' for installation instructions." ; \
1818
false ; \
1919
fi
2020
@IFS=':' ; \
2121
for dir in $$PATH; do \
2222
for prog in gmake gnumake make; do \
23-
if [ -f $$dir/$$prog ] && ( $$dir/$$prog --version | grep GNU >/dev/null 2>&1 ) ; then \
23+
if [ -f $$dir/$$prog ] && ( $$dir/$$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \
2424
GMAKE=$$dir/$$prog; \
2525
break 2; \
2626
fi; \

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy