changeset 15615:79e8ec9a79db

maint.mk: sc_tight_scope: propagate failure from sub-make * top/maint.mk (sc_tight_scope): Actually initialize and use $fail. Reported by Martin von Gagern.
author Jim Meyering <meyering@redhat.com>
date Wed, 14 Sep 2011 14:39:35 +0200
parents e3c67dcee18f
children 9fd376c9460f
files ChangeLog top/maint.mk
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Sep 14 02:52:31 2011 +0200
+++ b/ChangeLog	Wed Sep 14 14:39:35 2011 +0200
@@ -1,3 +1,9 @@
+2011-09-14  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: sc_tight_scope: propagate failure from sub-make
+	* top/maint.mk (sc_tight_scope): Actually initialize and use $fail.
+	Reported by Martin von Gagern.
+
 2011-09-13  Bruno Haible  <bruno@clisp.org>
 
 	tempname: Support for MSVC.
--- a/top/maint.mk	Wed Sep 14 02:52:31 2011 +0200
+++ b/top/maint.mk	Wed Sep 14 14:39:35 2011 +0200
@@ -1398,7 +1398,8 @@
 
 ALL_RECURSIVE_TARGETS += sc_tight_scope
 sc_tight_scope: tight-scope.mk
-	@if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk	\
+	@fail=0;							\
+	if ! grep '^ *export _gl_TS_headers *=' $(srcdir)/cfg.mk	\
 		> /dev/null						\
 	   && ! grep -w noinst_HEADERS $(srcdir)/$(_gl_TS_dir)/Makefile.am \
 		> /dev/null 2>&1; then					\
@@ -1410,8 +1411,9 @@
 		-f $(abs_top_builddir)/$<				\
 	      _gl_tight_scope						\
 		|| fail=1;						\
-	fi
-	@rm -f $<
+	fi;								\
+	rm -f $<;							\
+	exit $$fail
 
 tight-scope.mk: $(ME)
 	@rm -f $@ $@-t