[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 5/7] [ng] diag: new make function $(am.fatal)
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 5/7] [ng] diag: new make function $(am.fatal) |
Date: |
Sun, 12 Aug 2012 23:20:10 +0200 |
Mostly a preparatory patch for future changes.
* lib/am/header-vars.mk (am.fatal): New.
* automake.in (generate_makefile): Use in instead of $(error) in the
generated make code exiting for earlier errors.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 3 +--
lib/am/header-vars.mk | 5 +++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/automake.in b/automake.in
index 12f2a99..3a11b53 100644
--- a/automake.in
+++ b/automake.in
@@ -6767,8 +6767,7 @@ sub generate_makefile ($$)
# relevant diagnostic should have already been reported by any
# call to the function '$(am.error)', so we just print a generic
# "errors seen, stopping" message.
- $output_checks .= '$(if $(am.error.seen),' .
- '$(error Some Automake-NG error occurred))' .
+ $output_checks .= '$(if $(am.error.seen),$(call am.fatal))' .
"\n";
if ($exit_code != 0)
diff --git a/lib/am/header-vars.mk b/lib/am/header-vars.mk
index 50519a1..27699ba 100644
--- a/lib/am/header-vars.mk
+++ b/lib/am/header-vars.mk
@@ -45,6 +45,11 @@ define am.error
$(warning $1)$(eval am.error.seen := yes)
endef
+# Declare an error, and immediately terminate execution.
+define am.fatal
+$(if $1,$(call am.error,$1))$(error Some Automake-NG error occurred)
+endef
+
#
# Sometimes, in our makefiles, we want to assign a default value to a
# variable that might not have been assigned yet. One might think that
--
1.7.12.rc0
- [Automake-NG] [PATCH 0/7] More patches on distribution tarballs support, Stefano Lattarini, 2012/08/12
- [Automake-NG] [PATCH 1/7] [ng] dist: refactor: reduce duplication in the 'dist-*' recipes, Stefano Lattarini, 2012/08/12
- [Automake-NG] [PATCH 2/7] [ng] dist: vars DIST_TARGETS and DIST_ARCHIVES are no more public, Stefano Lattarini, 2012/08/12
- [Automake-NG] [PATCH 3/7] [ng] distcheck: remove stale tarballs with 'rm -f', not 'rm -rf', Stefano Lattarini, 2012/08/12
- [Automake-NG] [PATCH 5/7] [ng] diag: new make function $(am.fatal),
Stefano Lattarini <=
- [Automake-NG] [PATCH 4/7] [ng] dist: fixup: add 'dist' and 'dist-all' to AM_RECURSIVE_TARGETS, Stefano Lattarini, 2012/08/12
- [Automake-NG] [PATCH 7/7] [ng] rename: am.dist.uninstallcheck-listfiles -> am.dist.uninstallcheck-listfiles, Stefano Lattarini, 2012/08/12
- [Automake-NG] [PATCH 6/7] [ng] dist: new API to specify formats of distribution tarballs, Stefano Lattarini, 2012/08/12
- Re: [Automake-NG] [PATCH 6/7] [ng] dist: new API to specify formats of distribution tarballs, Paolo Bonzini, 2012/08/21