blob: 723cd0edf382e710d470c994616e09d36090d4d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
|