1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
From: Carlos Maddela <e7appew@gmail.com>
Date: Sun, 18 Dec 2016 23:05:03 +1100
Subject: Fix GNU Make detection.
Description: Fix GNU Make detection.
While the previous code works with earlier versions of bash, it doesn't
seem to work with bash 4.4.5. The redirection to /dev/null somehow causes
grep to return an error code of 2.
.
This change allows for more predictable behaviour: grep returns an
error code of 0 or 1.
Author: Carlos Maddela <e7appew@gmail.com>
Bug-Debian: https://bugs.debian.org/848811
Forwarded: no
Last-Update: 2016-12-18
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---
scripts/bash-based-configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/bash-based-configure b/scripts/bash-based-configure
index f68ecab..d62f5d7 100644
--- a/scripts/bash-based-configure
+++ b/scripts/bash-based-configure
@@ -313,13 +313,13 @@ function REQUIRE_GMAKE()
echo -n "Checking for gmake: "
- if (gmake -v | grep "GNU Make") > /dev/null 2>&1 ;
+ if (gmake -v 2>&1 | grep "GNU Make") > /dev/null 2>&1 ;
then echo "yes"
echo "MAKE = `which gmake`" >>Makefile.config
return 0
fi;
- if (make -v | grep "GNU Make") > /dev/null 2>&1 ;
+ if (make -v 2>&1 | grep "GNU Make") > /dev/null 2>&1 ;
then echo "yes"
echo "MAKE = `which make`" >>Makefile.config
return 0
|