2015-07-13 04:51:35 +00:00
|
|
|
#! -*-perl-*-
|
|
|
|
|
|
|
|
$description = "Test the behaviour of the .DELETE_ON_ERROR target.";
|
|
|
|
|
|
|
|
$details = "";
|
|
|
|
|
|
|
|
run_make_test('
|
|
|
|
.DELETE_ON_ERROR:
|
2016-05-31 06:26:26 +00:00
|
|
|
all: ; exit 1 > $@
|
2015-07-13 04:51:35 +00:00
|
|
|
',
|
2019-09-22 21:02:57 +00:00
|
|
|
'', "exit 1 > all\n#MAKE#: *** [#MAKEFILE#:3: all] Error 1\n#MAKE#: *** Deleting file 'all'", 512);
|
2015-07-13 04:51:35 +00:00
|
|
|
|
|
|
|
run_make_test('
|
|
|
|
.DELETE_ON_ERROR:
|
|
|
|
all: foo.x ;
|
|
|
|
%.x : %.q ; echo > $@
|
2016-05-31 06:26:26 +00:00
|
|
|
%.q : ; exit 1 > $@
|
2015-07-13 04:51:35 +00:00
|
|
|
',
|
2019-09-22 21:02:57 +00:00
|
|
|
'', "exit 1 > foo.q\n#MAKE#: *** [#MAKEFILE#:5: foo.q] Error 1\n#MAKE#: *** Deleting file 'foo.q'", 512);
|
2015-07-13 04:51:35 +00:00
|
|
|
|
|
|
|
# This tells the test driver that the perl test script executed properly.
|
|
|
|
1;
|