GNU bug report logs - #14311
[PATCH 2/7] header-vars: new variable $(am__running_with_option)

Previous Next

Package: automake;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Mon, 29 Apr 2013 21:02:04 UTC

Severity: normal

Tags: notabug, patch

Merged with 14309, 14310, 14312, 14313, 14314, 14315, 14316

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14311 in the body.
You can then email your comments to 14311 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#14311; Package automake. (Mon, 29 Apr 2013 21:02:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Mon, 29 Apr 2013 21:02:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: automake-patches <at> gnu.org
Cc: mdaniels <at> rim.com, bug-automake <at> gnu.org, 12554 <at> debbugs.gnu.org
Subject: [PATCH 2/7] header-vars: new variable $(am__running_with_option)
Date: Mon, 29 Apr 2013 23:00:30 +0200
This is a preparatory refactoring, needed by later patches.
No semantic change is intended.

* lib/am/header-vars.am (am__running_with_option): New, contains
shell code that determines whether the current make instance is
running with a given one-letter option (e.g., -k, -n) that takes
no argument.  Actually, the only supported option at the moment
is '-n' (support for '-k' will be added soon).
(am__make_dryrun): Rewrite as a thin wrapper around
'$(am__make_running_with_option)'.

Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 lib/am/header-vars.am | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)

diff --git a/lib/am/header-vars.am b/lib/am/header-vars.am
index d2f0984..8426dcb 100644
--- a/lib/am/header-vars.am
+++ b/lib/am/header-vars.am
@@ -31,21 +31,26 @@ VPATH = @srcdir@
 ## enough for now.
 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
 
-## 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 = \
+## Shell code that determines whether the current make instance is
+## running with a given one-letter option (e.g., -k, -n) that takes
+## no argument.  Actually, the only supported option at the moment
+## is '-n' (support for '-k' will be added soon).
+am__make_running_with_option = \
   { \
-    am__dry=no; \
+    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.
       for am__flg in $$MFLAGS; do \
         case $$am__flg in \
           *=*|--*) ;; \
-          -*n*) am__dry=yes; break;; \
+          -*$$am__target_option*) am__has_opt=yes; break;; \
         esac; \
       done; \
     else \
@@ -59,7 +64,7 @@ am__make_dryrun = \
 ## This has already happened in practice.  So we need this unpleasant hack.
          *\\[\ \	]*) \
            echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
-             | grep '^AM OK$$' >/dev/null || am__dry=yes ;; \
+             | grep '^AM OK$$' >/dev/null || am__has_opt=yes ;; \
          *) \
 	   am__skip_next=no; \
            for am__flg in $$MAKEFLAGS; do \
@@ -72,14 +77,21 @@ am__make_dryrun = \
 ## 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;; \
+               *$$am__target_option*) am__has_opt=yes; break;; \
              esac; \
            done ;;\
        esac; \
     fi; \
-    test $$am__dry = yes; \
+    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); }
+
 ## Some derived variables that have been found to be useful.
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-- 
1.8.2.1.610.g562af5b





Forcibly Merged 14310 14311 14315. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:10:03 GMT) Full text and rfc822 format available.

Forcibly Merged 14310 14311 14312 14315. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:10:03 GMT) Full text and rfc822 format available.

Forcibly Merged 14310 14311 14312 14313 14315. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:10:03 GMT) Full text and rfc822 format available.

Forcibly Merged 14310 14311 14312 14313 14314 14315. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:10:03 GMT) Full text and rfc822 format available.

Forcibly Merged 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:10:03 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:01 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:01 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Forcibly Merged 14309 14310 14311 14312 14313 14314 14315 14316. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 29 Apr 2013 21:14:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#14311; Package automake. (Mon, 29 Apr 2013 21:19:03 GMT) Full text and rfc822 format available.

Message #32 received at 14311 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Subject: Spurious bug report, ignore
Date: Mon, 29 Apr 2013 23:17:39 +0200
Oops, erroneously created while dealing with bug#12254.  Please ignore,
and sorry for the noise,

  Stefano




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 30 May 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.