Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-14 Thread Henrik Carlqvist
On Mon, 14 Sep 2020 12:15:58 +0200 Bruno Haible wrote: > Henrik Carlqvist wrote: > > 2) Don't mention some of the extra targets: > > === > > all : copy1 > > > > copy1: Makefile > > install -c -m 644 Makefile copy1 > > install -c -m 644 Makefile

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-14 Thread Bruno Haible
Henrik Carlqvist wrote: > 2) Don't mention some of the extra targets: > === > all : copy1 > > copy1: Makefile > install -c -m 644 Makefile copy1 > install -c -m 644 Makefile copy2 > install -c -m 644 Makefile copy3 > install -c -m

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-13 Thread Henrik Carlqvist
On Sun, 13 Sep 2020 20:07:27 +0100 Bruno Haible wrote: > Continuing this thread from May 2019 > : > The problem was: > > How can a rule that generates multiple files be formulated so > that it works with parallel make? > >

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-13 Thread Bruno Haible
Hi Paul, > There is a straightforward and portable way to do this even with > traditional make, it's just not as nice (but, nicer than changing all > the recipes to use test IMO! :)). > > If you have a rule like this: > > ... : > > > where generates all targets with one

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-13 Thread Paul Smith
On Sun, 2020-09-13 at 15:08 -0400, Paul Smith wrote: > ... : .sentinel ; > > .sentinel: > > @touch $@ Just to be clear, you don't have to use ".sentinel" you can use any target name, and obviously you must use a different name for each "grouping" of targets that needs

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-13 Thread Bruno Haible
> === > all : copy1 copy2 copy3 copy4 > > copy1: Makefile > { test -f copy1 && test ! copy1 -ot Makefile; } || { rm -f copy4; > $(MAKE) copies; } > copy2: copy1 > { test -f copy2 && test ! copy2 -ot copy1; } || { rm -f copy4; $(MAKE) > copies;

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-13 Thread Paul Smith
On Sun, 2020-09-13 at 20:55 +0200, Bruno Haible wrote: > How can a rule that generates multiple files be formulated so > that it works with parallel make? > > For example, a rule that invokes bison, or a rule that invokes > a different Makefile. For simplicity, here, use a rule that > creates

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-13 Thread Howard Chu
Bruno Haible wrote: > Continuing this thread from May 2019 > : > The problem was: > > How can a rule that generates multiple files be formulated so > that it works with parallel make? > > For example, a rule that invokes

Re: "make -jN" requires mechanical changes to a Makefile [SOLVED]

2020-09-13 Thread Bruno Haible
Continuing this thread from May 2019 : The problem was: How can a rule that generates multiple files be formulated so that it works with parallel make? For example, a rule that invokes bison, or a rule that invokes a