To save typing here's an example of some of the possible hacks: http://www.cmcrossroads.com/article/rules-multiple-outputs-gnu-make
You'll see the problem with "chaining" dependencies - there is a situation when a file is deleted and running make again doesn't recreate it. Basically only one target in your chain has a "command" or "recipe" so if that file exists then make won't run the recipe even if some other file in the chain is missing. Disclaimer: I work with Eric and although some of his articles are aimed at promoting emake and could wind a gmake aficionado up the wrong way, there is something to be said for #pragma or some other "fairly generic" way to implement new features so that implementing them becomes a non-issue. e.g. if I wanted to implement CRC uptodate checks for specific targets (small high value ones like header files that can cause a cascade of builds if they change) but not for big ones (600MB ISOs) then how would one indicate such handling for that target? ".WHATEVER: mytarget" is one way - I'm not the worlds greatest fan of it as it's really only suited to binary on-off settings but in this case why not use that? It would be best to have a way that allows one to not have to debate too much in future. As for implementation - I guess I couldn't offer because of my position which is frustrating :-). Regards, Tim On 13 November 2014 21:46, Steven Simpson <[email protected]> wrote: > Hi, > > On 11/11/14 05:44, Nicholas Clark wrote: > >> foo1.out report.txt foo2.out foo3.out non_pattern.bit: TASK1_OUTPUTS >> fob1.out static_file.bmm fob2.out fob3.out project_file.ngc: TASK2_OUTPUTS >> >> TASK1_OUTPUTS: source1_a.src source1_b.src >> $(EXTERNAL_UTIL_1) source1_a.src source1_b.src >> >> TASK2_OUTPUTS: source2_a.src source2_b.src >> $(EXTERNAL_UTIL_2) source2_a.src source2_b.src >> >> .GROUPTARGET: TASK1_OUTPUTS TASK2_OUTPUTS >> > > > Is it not sufficient to create an empty target?: > > task1.done: source1_a.src source1_b.src > $(EXTERNAL_UTIL_1) source1_a.src source1_b.src > touch $@ > > task2.done: source2_a.src source2_b.src > $(EXTERNAL_UTIL_2) source2_a.src source2_b.src > touch $@ > > If you need any of the files created by task 2, you just name task2.done > as the prerequisite. Or have I misunderstood?... > > In the example above, any dependencies of .GROUPTARGET would be a >> target-group. Each target group could be treated sort of like a >> conditional >> PHONY that would run if any of the group's members were out-of-date. >> > > Are you saying that $(EXTERNAL_UTIL_1) won't necessarily update all of > TASK1_OUTPUTS (otherwise, they would all be out-of-date together)? > > Cheers, > > Steven > > > _______________________________________________ > Help-make mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/help-make > -- You could help some brave and decent people to have access to uncensored news by making a donation at: http://www.thezimbabwean.co.uk/friends/ _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
