summaryrefslogtreecommitdiff
path: root/tests/scripts/targets/DELETE_ON_ERROR
blob: f0d9f9b4d63fa61fe288c8c6e63205a81963ffa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! -*-perl-*-

$description = "Test the behaviour of the .DELETE_ON_ERROR target.";

$details = "";

run_make_test('
.DELETE_ON_ERROR:
all: ; exit 1 > $@
',
              '', "exit 1 > all\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n#MAKE#: *** Deleting file 'all'", 512);

run_make_test('
.DELETE_ON_ERROR:
all: foo.x ;
%.x : %.q ; echo > $@
%.q : ; exit 1 > $@
',
              '', "exit 1 > foo.q\n#MAKE#: *** [#MAKEFILE#:5: foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512);

# This tells the test driver that the perl test script executed properly.
1;