Hi Martin, On Thu, Jun 26, 2014 at 4:33 PM, Martin Dorey <martin.do...@hds.com> wrote: >> Why is it trying to build target test.mk...??? > > That's explained by > https://www.gnu.org/software/make/manual/make.html#Remaking-Makefiles.
Thanks, that makes sense. >> Then it decides it was successful? > > For some value of "successful". With your makefile: > > martind@swiftboat:~/tmp/batrick-2014-06-26$ make -f test.mk foo > make: Nothing to be done for `foo'. > martind@swiftboat:~/tmp/batrick-2014-06-26$ > > If we add a semicolon, telling make that the recipe to update foo is empty: > > martind@swiftboat:~/tmp/batrick-2014-06-26$ sed -i -e 's/passwd/passwd;/' > test.mk > martind@swiftboat:~/tmp/batrick-2014-06-26$ > > Then the message changes: > > martind@swiftboat:~/tmp/batrick-2014-06-26$ make -f test.mk foo > make: `foo' is up to date. > martind@swiftboat:~/tmp/batrick-2014-06-26$ > > If we give it a recipe that actually works: > > martind@swiftboat:~/tmp/batrick-2014-06-26$ sed -i -e 's/passwd;/passwd; > @touch $@/' test.mk > martind@swiftboat:~/tmp/batrick-2014-06-26$ > > Then we get silent success, following the Unix Bushido: > > martind@swiftboat:~/tmp/batrick-2014-06-26$ make -f test.mk foo > martind@swiftboat:~/tmp/batrick-2014-06-26$ > > Though a second invocation has nothing to do, and says so: > > martind@swiftboat:~/tmp/batrick-2014-06-26$ make -f test.mk foo > make: `foo' is up to date. > martind@swiftboat:~/tmp/batrick-2014-06-26$ I'm afraid none of this exercise is helpful for solving the problem though. To put it concisely: how do I get Make to *fail* if it cannot create one of the targets? -- Patrick Donnelly _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make