2005-06-27 01:01:07 +00:00
|
|
|
# -*-perl-*-
|
|
|
|
|
|
|
|
$description = 'Test the $(shell ...) function.';
|
|
|
|
|
|
|
|
$details = '';
|
|
|
|
|
|
|
|
|
|
|
|
# Test shells inside rules.
|
|
|
|
run_make_test('.PHONY: all
|
|
|
|
all: ; @echo $(shell echo hi)
|
|
|
|
','','hi');
|
|
|
|
|
|
|
|
|
2009-09-28 23:08:49 +00:00
|
|
|
# Test unescaped comment characters in shells. Savannah bug #20513
|
|
|
|
if ($all_tests) {
|
|
|
|
run_make_test(q!
|
|
|
|
FOO := $(shell echo '#')
|
|
|
|
foo: ; echo '$(FOO)'
|
|
|
|
!,
|
|
|
|
'', "#\n");
|
|
|
|
}
|
|
|
|
|
2005-06-27 01:01:07 +00:00
|
|
|
# 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;
|