URL: <http://savannah.gnu.org/bugs/?43677>
Summary: .DELETE_ON_ERROR doesn't work with patterns for main goal's dependencies Project: make Submitted by: monoid Submitted on: Пнд 24 Ноя 2014 06:19:16 Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: 3.81 Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Details: This is a sample of Makefile: .DELETE_ON_ERROR: bug: c_foobar ; c_%: a_% b_% echo $^ > $@ b_%: a_% echo $^ > $@ a_%: false > $@ I tested it with make 3.81 on Ubuntu 12.04 LTS, make 4.0 on Ubuntu 14.04.1 LTS, and make 4.0 on Gentoo. $ make false > a_foobar Makefile:13: recipe for target 'a_foobar' failed make: *** [a_foobar] Error 1 $ make echo a_foobar > b_foobar echo a_foobar b_foobar > c_foobar rm b_foobar -verbatiim- while when you specify a_foobar directly, it is deleted, as expected: $ make a_foobar false > a_foobar Makefile:13: recipe for target 'a_foobar' failed make: *** [a_foobar] Error 1 make: *** Deleting file 'a_foobar' If you replace '%' in Makefile with 'foobar', everything works too, so it seems to be pattern-related problem. When you call pattern rule directly: $ make c_foobar false > a_foobar Makefile:13: recipe for target 'a_foobar' failed make: *** [a_foobar] Error 1 (not failing rule, but its parent), it also doesn't remove a_foobar, so it is just pattern handling problem. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?43677> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make