summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-02 01:10:13 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-02 18:42:50 +0200
commitc93bc3d4e6d12068f0d9b32b67ec63b3ca3313bd (patch)
tree62fa5f76c8f245fc8c2b1937921e5f800dfcf1d6 /lib
parent7aa99186d1c5fb31d3fd39beb129fc4cb44f2c7c (diff)
downloadautomake-c93bc3d4e6d12068f0d9b32b67ec63b3ca3313bd.tar.gz
make flags analysis: cater to GNU make 3.83 (still unreleased as of now)
The current development version of GNU make (that is planned to become GNU make 3.83, sooner or later) has changed the format its $(MFLAGS) variable slightly, removing the space between an option and its argument: # With GNU make 3.82, compiled from official tarball: $ make -f- <<<'all:; @echo "$$MFLAGS"' -I none -I none # With development version of GNU make (Git commit b5ea49b): $ make -f- <<<'all:; @echo "$$MFLAGS"' -I none -Inone This was done on purpose, in order to support more easily the new option '-O', which takes an optional argument; see: <http://lists.gnu.org/archive/html/bug-make/2013-05/msg00001.html> So Just adapt to the new format as well. * t/header-vars.am (am__make_running_with_option): Adjust to cater to the new GNU make behaviour. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/am/header-vars.am8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index 3de46dca2..64d014ca2 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -74,9 +74,13 @@ am__make_running_with_option = \
fi; \
case $$am__flg in \
*=*|--*) ;; \
-## Quite ugly special-casing. We might need other similar ones actually,
-## but let's wait until the need arises.
+## GNU make 3.83 has changed the format of $MFLAGS, and removed the space
+## between an option and its argument (e.g., from "-I dir" to "-Idir").
+## So we need to handle both formats.
+## TODO: we might need to handle similar other cases as well; but let's
+## wait until the need arises.
-I) am__skip_next=yes;; \
+ -I*) continue;; \
*$$am__target_option*) am__has_opt=yes; break;; \
esac; \
done;\