On Sun, Aug 23, 2020 at 12:25:17PM -0000, GitLab Bridge on behalf of prarit wrote: > diff --git a/Makefile.rhelver b/Makefile.dist > similarity index 78% > rename from Makefile.rhelver > rename to Makefile.dist > index 8fceabade7c8..1b3b3ca89bf3 100644 > --- a/Makefile.rhelver > +++ b/Makefile.dist > @@ -43,3 +43,20 @@ ifneq ("$(ZSTREAM)", "yes") > RHEL_RELEASE:=$(RHEL_RELEASE).$(EARLY_YRELEASE) > endif > endif > + > +no-dot-config-targets += dist-% distg-% > + > +ifneq ($(filter dist-% distg-%,$(MAKECMDGOALS)),) > +_OUTPUT := "." > +# this section is needed in order to make O= to work > +ifeq ("$(origin O)", "command line") > + _OUTPUT := "$(abspath $(O))" > + _EXTRA_ARGS := O=$(_OUTPUT) > +endif > +endif We can fix this later, but I believe the above filter can be removed now that we are processing the whole top-level Makefile instead of skipping it like before. /me goes to test that theory with: make mrproper # clean things up mkdir output make O=output dist-configs Ok, so that fails. Before your change it works. So I was right about the above code as being redundant as it now adds an extra '/output' to a path with '/output' already in there. That is the first problem. We can remove that hunk. The second problem is, it enters <path>/output and can't find the redhat/ area (which is obviously not there). Soo... > + > +dist-%:: > + $(MAKE) -C redhat $(@) $(_EXTRA_ARGS) > + > +distg-%:: > + $(MAKE) -C redhat $(@) $(_EXTRA_ARGS) adding $(srctree) above "make -C $(srctree)/redhat ..." makes things better. but that leads to a third problem. When you 'cd configs' to run process_configs.sh, it barfs because it can't ../scripts/mkmakefile (as part of the 'make oldefconfig' command in that script). I tried adding a 'make -f ../${srctree}/Makefile olddefconfig' mimicing other script behaviours, but to no avail. At this point I give up and have to move on to other things. I hate to nack this but it is an unforseen regression. Sorry I didn't catch this sooner. I am scratching my head how all this was working originally before your change. Maybe the O= path needs to be updated to add a layer of '../' in front to handle the cd into configs. Ok, it seems like process_configs.sh 'switch_to_toplevel' was causing some issues. I changed it to it stopped inside the redhat/, thinking the srctree and objtree vars would work correctly. Now 'make O=output dist-configs' _completes_, but it thinks redhat/ is the output area and overwrites redhat/Makefile with the dummy Makefile that belongs on output. Alright, I have spent waaay to much time on this... Here is my current patch on top of yours on where I am. Again a simple: make mrproper mkdir output make O=output dist-configs will duplicate everything I see. Cheers, Don diff --git a/Makefile.dist b/Makefile.dist index 1b3b3ca89bf3..30caa1921a1d 100644 --- a/Makefile.dist +++ b/Makefile.dist @@ -46,17 +46,8 @@ endif no-dot-config-targets += dist-% distg-% -ifneq ($(filter dist-% distg-%,$(MAKECMDGOALS)),) -_OUTPUT := "." -# this section is needed in order to make O= to work -ifeq ("$(origin O)", "command line") - _OUTPUT := "$(abspath $(O))" - _EXTRA_ARGS := O=$(_OUTPUT) -endif -endif - dist-%:: - $(MAKE) -C redhat $(@) $(_EXTRA_ARGS) + $(MAKE) -C $(srctree)/redhat $(@) $(_EXTRA_ARGS) distg-%:: - $(MAKE) -C redhat $(@) $(_EXTRA_ARGS) + $(MAKE) -C $(srctree)/redhat $(@) $(_EXTRA_ARGS) diff --git a/redhat/configs/process_configs.sh b/redhat/configs/process_configs.sh index 14773fef2410..43efbe8ca565 100755 --- a/redhat/configs/process_configs.sh +++ b/redhat/configs/process_configs.sh @@ -30,8 +30,7 @@ switch_to_toplevel() path="$(pwd)" while test -n "$path" do - test -e $path/MAINTAINERS && \ - test -d $path/drivers && \ + test -e $path/Makefile.cross && \ break path="$(dirname $path)" @@ -203,9 +202,10 @@ function process_configs() # This arch is intentionally left blank continue fi + echo "Inside $(pwd)" echo -n "Processing $cfg ... " - make ARCH=$arch KCONFIG_CONFIG=$cfgorig listnewconfig >& .listnewconfig + make -C ${srctree} ARCH=$arch KCONFIG_CONFIG=$cfgorig listnewconfig >& .listnewconfig grep -E 'CONFIG_' .listnewconfig > .newoptions if test -n "$NEWOPTIONS" && test -s .newoptions then @@ -230,7 +230,7 @@ function process_configs() rm .listnewconfig - make ARCH=$arch KCONFIG_CONFIG=$cfgorig olddefconfig > /dev/null || exit 1 + make -C ${srctree} ARCH=$arch KCONFIG_CONFIG=$cfgorig olddefconfig > /dev/null || exit 1 echo "# $arch" > ${cfgtmp} cat "${cfgorig}" >> ${cfgtmp} if test -n "$CHECKOPTIONS" diff --git a/scripts/mkmakefile b/scripts/mkmakefile index 1cb174751429..6689ed1f6331 100755 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile @@ -7,6 +7,7 @@ # Usage # $1 - Kernel src directory +echo "mkmakefile: $(pwd)" > /tmp/don.script if [ "${quiet}" != "silent_" ]; then echo " GEN Makefile" fi _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx