Debian Codegraph @

tests/scripts/options/dash-r

raw
1 # -*-perl-*-
2
3 $description = "Test removing default rules and variables";
4
5 $details = "DETAILS";
6
7 touch('xxx.c');
8
9 # Simple check
10 run_make_test("\n", '-r COMPILE.c=echo xxx.o',
11 "#MAKE#: *** No rule to make target 'xxx.o'. Stop.", 512);
12
13 # Make sure we can set it from within the makefile too
14 run_make_test(q!
15 COMPILE.c = echo
16 MAKEFLAGS += -r
17 !,
18 'xxx.o',
19 "#MAKE#: *** No rule to make target 'xxx.o'. Stop.", 512);
20
21 unlink('xxx.c');
22
23 # Simple check for -R
24 run_make_test(q!
25 all:;$(info CC='$(CC)')
26 !,
27 '-sR', "CC=''");
28
29 # Make sure we can set -R from within the makefile too
30 run_make_test(q!
31 MAKEFLAGS += -R
32 all:;$(info CC='$(CC)')
33 !,
34 '-s', "CC=''");
35
36 # sv 62356.
37 # Setting -R in MAKEFLAGS sets -r.
38 run_make_test(q!
39 MAKEFLAGS := -R
40 .PHONY: hello.c
41 all: hello.o
42 !, '', "#MAKE#: *** No rule to make target 'hello.o', needed by 'all'. Stop.", 512);
43
44 1;