diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-04-22 18:02:07 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-04-23 11:01:16 +0200 |
commit | cfe0abc7fcedfac86c8928a7dce41aeb41f461a9 (patch) | |
tree | e9205b1cc5333c264b66176d2876a9b5ffa7afaf /lib | |
parent | 334a2e0b46c3d17ffb24f415cbec2e13e48b6c94 (diff) | |
download | automake-cfe0abc7fcedfac86c8928a7dce41aeb41f461a9.tar.gz |
dry-run: don't get confused by '-I' option
Fixes automake bug#13760 for non-GNU make implementations that still
support the option '-I'. So far, the only such make implementation
are FreeBSD (8.x) make and NetBSD (5.x) make.
* lib/am/header-vars.am (am__make_dryrun): If a non-GNU make is being
used, try to handle the '-I' option in $MAKEFLAGS correctly. For GNU
make, that is already done by the proper use of the $MFLAGS variable.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/am/header-vars.am | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 23c627ed2..d2f098425 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -61,9 +61,17 @@ am__make_dryrun = \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes ;; \ *) \ + am__skip_next=no; \ for am__flg in $$MAKEFLAGS; do \ + if test $$am__skip_next = yes; then \ + am__skip_next=no; \ + continue; \ + fi; \ case $$am__flg in \ *=*|--*) ;; \ +## Quite ugly special-casing. We might need other similar, but let's +## wait until the need arises. + -I) am__skip_next=yes;; \ *n*) am__dry=yes; break;; \ esac; \ done ;;\ |