Message ID | 20200921232231.11543-1-jengelh@inai.de |
---|---|
State | New |
Headers | show |
Series | [iproute2] build: avoid make jobserver warnings | expand |
On Tue, 22 Sep 2020 01:22:31 +0200 Jan Engelhardt <jengelh@inai.de> wrote: > I observe: > > » make -j8 CCOPTS=-ggdb3 > lib > make[1]: warning: -j8 forced in submake: resetting jobserver mode. > make[1]: Nothing to be done for 'all'. > ip > make[1]: warning: -j8 forced in submake: resetting jobserver mode. > CC ipntable.o > > MFLAGS is a historic variable of some kind; removing it fixes the > jobserver issue. MFLAGS is a way to pass flags from original make into the sub-make. Not sure if it is used anywhere else.
On Tuesday 2020-09-22 02:19, Stephen Hemminger wrote: >> I observe: >> >> » make -j8 CCOPTS=-ggdb3 >> lib >> make[1]: warning: -j8 forced in submake: resetting jobserver mode. >> make[1]: Nothing to be done for 'all'. >> ip >> make[1]: warning: -j8 forced in submake: resetting jobserver mode. >> CC ipntable.o >> >> MFLAGS is a historic variable of some kind; removing it fixes the >> jobserver issue. > >MFLAGS is a way to pass flags from original make into the sub-make. MAKEFLAGS and MFLAGS are already exported by make (${MAKE} is magic methinks), so they need no explicit passing. You can check this by adding something like 'echo ${MAKEFLAGS}' to the lib/Makefile libnetlink.a target and then invoking e.g. `make -r` from the toplevel, and notice how -r shows up again in the submake.
On Tue, 22 Sep 2020 08:15:59 +0200 (CEST) Jan Engelhardt <jengelh@inai.de> wrote: > On Tuesday 2020-09-22 02:19, Stephen Hemminger wrote: > >> I observe: > >> > >> » make -j8 CCOPTS=-ggdb3 > >> lib > >> make[1]: warning: -j8 forced in submake: resetting jobserver mode. > >> make[1]: Nothing to be done for 'all'. > >> ip > >> make[1]: warning: -j8 forced in submake: resetting jobserver mode. > >> CC ipntable.o > >> > >> MFLAGS is a historic variable of some kind; removing it fixes the > >> jobserver issue. > > > >MFLAGS is a way to pass flags from original make into the sub-make. > > MAKEFLAGS and MFLAGS are already exported by make (${MAKE} is magic > methinks), so they need no explicit passing. You can check this by > adding something like 'echo ${MAKEFLAGS}' to the lib/Makefile > libnetlink.a target and then invoking e.g. `make -r` from the > toplevel, and notice how -r shows up again in the submake. For context: https://www.gnu.org/software/make/manual/html_node/Options_002fRecursion.html With your change does the options through the same? My concern is that this change might break how distros do their package builds, and cross compilation.
On Thursday 2020-09-24 18:11, Stephen Hemminger wrote: >> > >> >MFLAGS is a way to pass flags from original make into the sub-make. >> >> MAKEFLAGS and MFLAGS are already exported by make (${MAKE} is magic >> methinks), so they need no explicit passing. You can check this by >> adding something like 'echo ${MAKEFLAGS}' to the lib/Makefile >> libnetlink.a target and then invoking e.g. `make -r` from the >> toplevel, and notice how -r shows up again in the submake. > >With your change does the options through the same? Well yes.
On Thu, 24 Sep 2020 18:56:33 +0200 (CEST) Jan Engelhardt <jengelh@inai.de> wrote: > On Thursday 2020-09-24 18:11, Stephen Hemminger wrote: > >> > > >> >MFLAGS is a way to pass flags from original make into the sub-make. > >> > >> MAKEFLAGS and MFLAGS are already exported by make (${MAKE} is magic > >> methinks), so they need no explicit passing. You can check this by > >> adding something like 'echo ${MAKEFLAGS}' to the lib/Makefile > >> libnetlink.a target and then invoking e.g. `make -r` from the > >> toplevel, and notice how -r shows up again in the submake. > > > >With your change does the options through the same? > > Well yes. Ok, tested a number of cases, and this works for all of them. But, the patch is missing Signed-off-by which is required for iproute2. Please resend with DCO.
On Mon, 28 Sep 2020 21:08:01 +0200 Jan Engelhardt <jengelh@inai.de> wrote: > I observe: > > » make -j8 CCOPTS=-ggdb3 > lib > make[1]: warning: -j8 forced in submake: resetting jobserver mode. > make[1]: Nothing to be done for 'all'. > ip > make[1]: warning: -j8 forced in submake: resetting jobserver mode. > CC ipntable.o > > MFLAGS is a historic variable of some kind; removing it fixes the > jobserver issue. > > Signed-off-by: Jan Engelhardt <jengelh@inai.de> Applied.
diff --git a/Makefile b/Makefile index cadda235..5b040415 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ LDLIBS += $(LIBNETLINK) all: config.mk @set -e; \ for i in $(SUBDIRS); \ - do echo; echo $$i; $(MAKE) $(MFLAGS) -C $$i; done + do echo; echo $$i; $(MAKE) -C $$i; done .PHONY: clean clobber distclean check cscope version @@ -101,11 +101,11 @@ version: clean: @for i in $(SUBDIRS) testsuite; \ - do $(MAKE) $(MFLAGS) -C $$i clean; done + do $(MAKE) -C $$i clean; done clobber: touch config.mk - $(MAKE) $(MFLAGS) clean + $(MAKE) clean rm -f config.mk cscope.* distclean: clobber