summaryrefslogtreecommitdiff
path: root/lib/am
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-04-29 15:22:10 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-04-29 19:55:07 +0200
commit69f7791509c523fe8b199a432b72dca6a5ce3caa (patch)
tree10336ea162738dc61eefb3582b0a20746e89c75f /lib/am
parente432b0d3f7deffd3468e7b32ab6760bc7f3148f2 (diff)
downloadautomake-69f7791509c523fe8b199a432b72dca6a5ce3caa.tar.gz
header-vars: recognize more make flags ('-k' in particular)
* lib/am/header-vars.am (am__running_with_option): Here. Few improvements to comments, while at it. (am__make_keepgoing): New, tell whther make is being runt with the '-k' option. * t/make-keepgoing.tap: New test. * t/list-of-tests.mk: Add it. * t/make-dryrun.tap: Minor edits to keep it more in sync with the new test. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib/am')
-rw-r--r--lib/am/header-vars.am13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index c0a5f0c8b..4ad17835d 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -38,15 +38,15 @@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__make_running_with_option = \
{ \
case $${am__target_option-} in \
- n) ;; \
+ ?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${am__target_option-}' specified" >&2; \
exit 1;; \
esac; \
am__has_opt=no; \
if $(am__is_gnu_make); then \
-## GNU make: $(MAKEFLAGS) is quite tricky there, and the older
-## $(MFLAGS) variable behaves much better.
+## GNU make: $(MAKEFLAGS) is quite tricky there, while the older variable
+## $(MFLAGS) behaves much better. So use the latter.
for am__flg in $$MFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
@@ -61,7 +61,7 @@ am__make_running_with_option = \
## to " TESTS=foo\ nap", so that the simpler loop below (on word-splitted
## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
## misinterpret that as and indication that make is running in dry mode.
-## This has already happened in practice. So we need this unpleasant hack.
+## This has already happened in practice. So we need this hack.
*\\[\ \ ]*) \
## Extra indirection with ${am__bs} required by FreeBSD 8.x make.
## Not sure why (so sorry for the cargo-cult programming here).
@@ -97,6 +97,11 @@ am__make_running_with_option = \
## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
am__make_dryrun = { am__target_option=n; $(am__make_running_with_option); }
+## Shell code that determines whether make is running in "keep-going mode"
+## ("make -k") or not. Useful in rules that must recursively descend into
+## subdirectories, and decide whther to stop at the first error or not.
+am__make_keepgoing = { am__target_option=k; $(am__make_running_with_option); }
+
## Some derived variables that have been found to be useful.
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@