From 5c4aaae2b0978ebdc1e1bf950917b82e6f7ad8d5 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Fri, 3 May 2013 12:47:59 +0200 Subject: make flags analysis: embed in a subshell So that we won't have to worry about leaking temporary variables, and similar stuff. * lib/am/header-vars.am (am__make_dryrun, am__make_keepgoing): Here. (am__make_running_with_option): Minor adjustments. Signed-off-by: Stefano Lattarini --- lib/am/header-vars.am | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'lib/am/header-vars.am') diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am index 72a187797..11779f5c9 100644 --- a/lib/am/header-vars.am +++ b/lib/am/header-vars.am @@ -36,7 +36,6 @@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' ## no argument. Actually, the only supported option at the moment ## is '-n' (support for '-k' will be added soon). am__make_running_with_option = \ - { \ case $${am__target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ @@ -89,22 +88,20 @@ am__make_running_with_option = \ case $$am__flg in \ *$$am__target_option*) am__has_opt=yes; break;; \ esac; \ - done;\ - unset am__skip_next am__flg am__flags am__target_option; \ - test $$am__has_opt = yes; \ - } + done; \ + test $$am__has_opt = yes ## Shell code that determines whether make is running in "dry mode" ## ("make -n") or not. Useful in rules that invoke make recursively, ## and are thus executed also with "make -n" -- either because they ## are declared as dependencies to '.MAKE' (NetBSD make), or because ## their recipes contain the "$(MAKE)" string (GNU and Solaris make). -am__make_dryrun = { am__target_option=n; $(am__make_running_with_option); } +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); } +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@ -- cgit v1.2.1