From e46c9ea201b4bad8f4c6d19ee6dfb3537bc9facd Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sun, 26 Aug 2012 19:24:46 +0400 Subject: Imported GNU Make 3.81 --- tests/scripts/functions/shell | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/scripts/functions/shell (limited to 'tests/scripts/functions/shell') diff --git a/tests/scripts/functions/shell b/tests/scripts/functions/shell new file mode 100644 index 0000000..723cd0e --- /dev/null +++ b/tests/scripts/functions/shell @@ -0,0 +1,32 @@ +# -*-perl-*- + +$description = 'Test the $(shell ...) function.'; + +$details = ''; + + +# Test shells inside rules. +run_make_test('.PHONY: all +all: ; @echo $(shell echo hi) +','','hi'); + + +# Test unescaped comment characters in shells. Savannah bug #20513 +if ($all_tests) { + run_make_test(q! +FOO := $(shell echo '#') +foo: ; echo '$(FOO)' +!, + '', "#\n"); +} + +# Test shells inside exported environment variables. +# This is the test that fails if we try to put make exported variables into +# the environment for a $(shell ...) call. +run_make_test(' +export HI = $(shell echo hi) +.PHONY: all +all: ; @echo $$HI +','','hi'); + +1; -- cgit v1.2.3