Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-03-05 Thread Satish Balay via Bug reports and discussion for GNU make
Thanks for all the suggestions. The code is not attempting to "change -j" - but have a "default" when the top-level is not invoked with '-j'. i.e: -'make' should use the default set in the makefile - make -j3' should use this value specified here [and ignore the default]. I'm reworking the

Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-03-05 Thread Paul Smith
On Tue, 2023-02-28 at 19:02 -0600, Satish Balay via Bug reports and discussion for GNU make wrote: > This usage works with make-4.4 [and older versions] - but not 4.4.1 > > balay@p1 /home/balay/tmp > $ cat makefile > all: > @MAKEFLAGS="-j1 ${MAKEFLAGS}" ${MAKE} -f makefile hello > hello:

Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-03-01 Thread Paul Smith
On Wed, 2023-03-01 at 13:05 -0600, Satish Balay wrote: > Perhaps my minimal test code is not an exact representation. However > this usage does work in our code-base. > > > > > > [balay@pj01 petsc]$ make --version |head -1 > GNU Make 4.3 > [balay@pj01 petsc]$ grep ^MAKE_NP configure.log >

Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-03-01 Thread Satish Balay via Bug reports and discussion for GNU make
Thanks for the responses - I'm yet to try some of the suggestions [and check if they are appropriate for my use case]. On Wed, 1 Mar 2023, Paul Smith wrote: > On Tue, 2023-02-28 at 22:34 -0600, Satish Balay via Bug reports and > discussion for GNU make wrote: > > And the reason we use the order

Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-03-01 Thread Paul Smith
On Tue, 2023-02-28 at 22:34 -0600, Satish Balay via Bug reports and discussion for GNU make wrote: > And the reason we use the order '-j8 ${MAKEFLAGS}' is so that we have > the following behavior': > > - invoking 'make' defaults to using a default of '-j8' > - invoking 'make -j4' gives: '-j8 -j4'

Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-03-01 Thread Dmitry Goncharov
On Tue, Feb 28, 2023 at 11:35 PM Satish Balay via Bug reports and discussion for GNU make wrote: > And the reason we use the order '-j8 ${MAKEFLAGS}' is so that we have the > following behavior': > > - invoking 'make' defaults to using a default of '-j8' > - invoking 'make -j4' gives: '-j8 -j4'

Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-03-01 Thread Edward Welbourne
On Feb 28 2023, Satish Balay via Bug reports and discussion for GNU make wrote: >> And the reason we use the order '-j8 ${MAKEFLAGS}' is so that we have the >> following behavior': Andreas Schwab (1 March 2023 10:15) wrote: > You need to write it as MAKEFLAGS="-j1 -${MAKEFLAGS}", so that the

Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-03-01 Thread Andreas Schwab
On Feb 28 2023, Satish Balay via Bug reports and discussion for GNU make wrote: > On Tue, 28 Feb 2023, Dmitry Goncharov wrote: > >> On Tue, Feb 28, 2023 at 8:41 PM Satish Balay via Bug reports and >> discussion for GNU make wrote: >> > $ cat makefile >> > all: >> > @MAKEFLAGS="-j1

Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-02-28 Thread Satish Balay via Bug reports and discussion for GNU make
On Tue, 28 Feb 2023, Dmitry Goncharov wrote: > On Tue, Feb 28, 2023 at 8:41 PM Satish Balay via Bug reports and > discussion for GNU make wrote: > > $ cat makefile > > all: > > @MAKEFLAGS="-j1 ${MAKEFLAGS}" ${MAKE} -f makefile hello > > hello: > > @echo Hello > > When you pass

Re: 4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-02-28 Thread Dmitry Goncharov
On Tue, Feb 28, 2023 at 8:41 PM Satish Balay via Bug reports and discussion for GNU make wrote: > $ cat makefile > all: > @MAKEFLAGS="-j1 ${MAKEFLAGS}" ${MAKE} -f makefile hello > hello: > @echo Hello When you pass --print-directory MAKEFLAGS has the value "w". When this makefile

4.4.1 breaks recursive invocation with --print-directory [when adding to MAKEFLAGS]

2023-02-28 Thread Satish Balay via Bug reports and discussion for GNU make
This usage works with make-4.4 [and older versions] - but not 4.4.1 Satish balay@p1 /home/balay/tmp $ cat makefile all: @MAKEFLAGS="-j1 ${MAKEFLAGS}" ${MAKE} -f makefile hello hello: @echo Hello balay@p1 /home/balay/tmp $ ./make-4.4/make --print-directory make: Entering