Debian Codegraph @

tests/scripts/targets/DELETE_ON_ERROR

raw
1 #! -*-perl-*-
2
3 $description = "Test the behaviour of the .DELETE_ON_ERROR target.";
4
5 $details = "";
6
7 run_make_test('
8 .DELETE_ON_ERROR:
9 all: ; exit 1 > $@
10 ',
11 '',
12 "exit 1 > all
13 work/targets/DELETE_ON_ERROR.mk:3: *** [all] error 1
14
15 #0 all at $fullworkdir/DELETE_ON_ERROR.mk:3
16 #MAKE#: *** Deleting file 'all'", 512);
17
18 run_make_test('
19 .DELETE_ON_ERROR:
20 all: foo.x ;
21 %.x : %.q ; echo > $@
22 %.q : ; exit 1 > $@
23 ',
24 '',
25 "exit 1 > foo.q
26 work/targets/DELETE_ON_ERROR.mk.1:4: *** [foo.q] error 1
27
28 #0 foo.q at $fullworkdir/DELETE_ON_ERROR.mk.1:4
29 #1 foo.x at ??
30 #2 all at $fullworkdir/DELETE_ON_ERROR.mk.1:3
31 #MAKE#: *** Deleting file 'foo.q'", 512);
32
33 # This tells the test driver that the perl test script executed properly.
34 1;