summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2014-01-12 10:54:29 -0500
committerPaul Smith <psmith@gnu.org>2014-01-12 10:54:29 -0500
commita9ff63021bb276f852621eefa260d425c97061c3 (patch)
tree15fbacf2c7c6f3f9f2b58dda5beb210dbc69cb6d /tests
parentcab4ae6d38400efc54284b9bf29be4e6f35cd02c (diff)
downloadmake-a9ff63021bb276f852621eefa260d425c97061c3.tar.gz
* main.c (die): Close output_context AND make_sync.
die() can be invoked inside a separate output_context, if the $(error ...) function is expanded as part of a recipe.
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/features/output-sync7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/scripts/features/output-sync b/tests/scripts/features/output-sync
index 75d7e81d..a7534cb7 100644
--- a/tests/scripts/features/output-sync
+++ b/tests/scripts/features/output-sync
@@ -330,5 +330,12 @@ t1: ; -\@\$(MAKE) -f $m1
rmfiles($m1);
+# Test $(error ...) functions in recipes
+
+run_make_test(q!
+foo: $(OBJS) ; echo $(or $(filter %.o,$^),$(error fail))
+!,
+ '-O', "#MAKEFILE#:2: *** fail. Stop.\n", 512);
+
# This tells the test driver that the perl test script executed properly.
1;