diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-03 14:06:25 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-03 14:06:25 +0200 |
commit | 57925b6707d9d6ae0afe92539b019bdd3c062305 (patch) | |
tree | f79ce6133ce22fd5d69251903260d4f58afe25c1 /lib/am | |
parent | 1adb0570cb5badd8bb569d2d243fcedd103f0b94 (diff) | |
download | automake-57925b6707d9d6ae0afe92539b019bdd3c062305.tar.gz |
make flags analysis: handle more options with args
That is, not only -I, but also -O (for upcoming GNU make 3.83),
-l (GNU make), -d, -E, -D, -m (BSD make), -J, -T (NetBSD make).
* lib/am/header-vars.am (am__make_running_with_option): Extend
and adjust, both code and comments.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib/am')
-rw-r--r-- | lib/am/header-vars.am | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 8698cd29a..4b9cc04cb 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -74,13 +74,27 @@ am__make_running_with_option = \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ +## ## 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. +## So we need to handle both formats, at least for options valid in GNU +## make. OTOH, BSD make formats $(MAKEFLAGS) by separating all options, +## and separating any option from its argument, so things are easier +## there. +## +## For GNU make and BSD make. -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ +## For GNU make >= 3.83. + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ +## For GNU make (possibly overkill, this one). + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ +## For BSD make. + -[dEDm]) skip_next=yes;; \ +## For NetBSD make. + -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ |