Re: Quirk with rules producing multiple output files

2013-04-28 Thread Paul Smith
On Fri, 2013-04-12 at 13:41 +0200, Reinier Post wrote: Hmm, indeed: | /tmp % cat Makefile | %.1:; echo $*.1 for $@ $@ | %.e.1 %.f.1:; echo $*.1 for $@ $@ | %.c.1 %.d.1:; for f in $*.c.1 $*.d.1; do echo $$f for $@ $$f; done | %.ab.2: %.a.1 %.b.1; cat $+ $@ | %.cd.2: %.c.1 %.d.1; cat $+

Re: Quirk with rules producing multiple output files

2013-04-12 Thread Reinier Post
On Thu Apr 11 12:47:56 2013, psm...@gnu.org (Paul Smith) wrote: On Thu, 2013-04-11 at 12:14 +0200, Reinier Post wrote: It's just a shorthand for writing a lot of identical rules; it does NOT mean that a single invocation if the rule will generate all three targets, which is what you are

Re: Quirk with rules producing multiple output files

2013-04-12 Thread Roger Pepitone
How come it only reran the rule once the second time? All three targets were invalid. On Fri, Apr 12, 2013 at 6:41 AM, Reinier Post reinp...@win.tue.nl wrote: On Thu Apr 11 12:47:56 2013, psm...@gnu.org (Paul Smith) wrote: On Thu, 2013-04-11 at 12:14 +0200, Reinier Post wrote: It's just

Re: Quirk with rules producing multiple output files

2013-04-11 Thread Reinier Post
On Thu Apr 4 16:17:58 2013, psm...@gnu.org (Paul Smith) wrote: This is expected behavior. A rule like: foo bar: @echo $@ is exactly the same thing, to make, as writing: foo: @echo $@ bar: @echo $@ It's just a shorthand for writing

Re: Quirk with rules producing multiple output files

2013-04-11 Thread Paul Smith
On Thu, 2013-04-11 at 12:14 +0200, Reinier Post wrote: It's just a shorthand for writing a lot of identical rules; it does NOT mean that a single invocation if the rule will generate all three targets, which is what you are expecting. Incidentally: other workflow/inference languages can

Re: Quirk with rules producing multiple output files

2013-04-11 Thread Tim Murphy
There are commercial emulations of GNU make that can handle multiple outputs. I don't want to plug them because that might be annoying. It's just worth mentioning that it can be done. Regards, Tim On 11 April 2013 11:14, Reinier Post reinp...@win.tue.nl wrote: On Thu Apr 4 16:17:58 2013,

Re: Quirk with rules producing multiple output files

2013-04-11 Thread David Sankel
On Thu, Apr 11, 2013 at 12:31 PM, Tim Murphy tnmur...@gmail.com wrote: There are commercial emulations of GNU make that can handle multiple outputs. I don't want to plug them because that might be annoying. It's just worth mentioning that it can be done. Can you provide an example of what

Re: Quirk with rules producing multiple output files

2013-04-11 Thread Tim Murphy
Hi, The example that I'm familiar with has had to invent a way to specify various special features without affecting make syntax - in other words similar to the kind of problem that gmake itself faces. I think you may see discussions about it earlier in this or other gmake mailing lists but it's

Re: Quirk with rules producing multiple output files

2013-04-04 Thread Paul Smith
On Wed, 2013-04-03 at 21:24 -0500, Roger Pepitone wrote: TEST_TEXTS := test1.txt test2.txt test3.txt $(TEST_TEXTS) : xtest.txt echo Rebuilding $@ touch $(TEST_TEXTS) xtest: $(TEST_TEXTS)

Re: Quirk with rules producing multiple output files

2013-04-03 Thread Roger Pepitone
On Sun, Mar 10, 2013 at 12:19 PM, Roger Pepitone rogerpepitone.1...@gmail.com wrote: ## TEST_TEXTS := test1.txt test2.txt test3.txt $(TEST_TEXTS) : xtest.txt echo Rebuilding $@ touch $(TEST_TEXTS) xtest: $(TEST_TEXTS) clean-xtest:

Quirk with rules producing multiple output files

2013-03-10 Thread Roger Pepitone
## TEST_TEXTS := test1.txt test2.txt test3.txt $(TEST_TEXTS) : xtest.txt echo Rebuilding $@ touch $(TEST_TEXTS) xtest: $(TEST_TEXTS) clean-xtest: rm $(TEST_TEXTS) ## make clean-xtest make xtest