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

[bug #59093] Segmentation fault regression in make 4.3 vs. 4.2.1

2020-09-13 Thread Paul D. Smith
Follow-up Comment #4, bug #59093 (project make): Of course another solution is to work on reducing the stack needed by make. None of this will be cheap of course. Some ideas: switch more places from alloca() to malloc(), and/or convert some algorithms from recursive function calls to loops. I

[bug #59093] Segmentation fault regression in make 4.3 vs. 4.2.1

2020-09-13 Thread Paul D. Smith
Follow-up Comment #3, bug #59093 (project make): I don't think I agree with this change. It's one thing for make to increase it's own stack size, but it's not good for make to be resetting the stack size of processes it starts. That could result in all sorts of issues. If the user invokes make