2021-09-06 05:11:44 +08:00
|
|
|
# -*-perl-*-
|
|
|
|
|
|
|
|
$description = "Test removing default rules and variables";
|
|
|
|
|
|
|
|
$details = "DETAILS";
|
|
|
|
|
|
|
|
touch('xxx.c');
|
|
|
|
|
|
|
|
# Simple check
|
2022-02-27 06:19:42 +08:00
|
|
|
run_make_test("\n", '-r COMPILE.c=echo xxx.o',
|
2021-09-06 05:11:44 +08:00
|
|
|
"#MAKE#: *** No rule to make target 'xxx.o'. Stop.", 512);
|
|
|
|
|
|
|
|
# Make sure we can set it from within the makefile too
|
|
|
|
run_make_test(q!
|
|
|
|
COMPILE.c = echo
|
|
|
|
MAKEFLAGS += -r
|
|
|
|
!,
|
|
|
|
'xxx.o',
|
|
|
|
"#MAKE#: *** No rule to make target 'xxx.o'. Stop.", 512);
|
|
|
|
|
|
|
|
unlink('xxx.c');
|
|
|
|
|
|
|
|
# Simple check for -R
|
|
|
|
run_make_test(q!
|
|
|
|
all:;$(info CC='$(CC)')
|
|
|
|
!,
|
|
|
|
'-sR', "CC=''");
|
|
|
|
|
|
|
|
# Make sure we can set -R from within the makefile too
|
|
|
|
run_make_test(q!
|
|
|
|
MAKEFLAGS += -R
|
|
|
|
all:;$(info CC='$(CC)')
|
|
|
|
!,
|
|
|
|
'-s', "CC=''");
|
|
|
|
|
|
|
|
1;
|