[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [XEN PATCH v2 04/12] xen/build: extract clean target from Rules.mk
On 17.01.2020 11:53, Anthony PERARD wrote: > From: Anthony PERARD <anthony.perard@xxxxxxxxx> > > Most of the code executed by Rules.mk isn't necessary for the clean > target, especially not the CFLAGS. This make running make clean much > faster. > > This extract the code into a different Makefile. It doesn't want to > include Config.mk either so variables DEPS_RM and DEPS_INCLUDE are > extracted from Config.mk as well. DEPS_INCLUDE is put into > Kbuild.include so it could be use by other Makefiles. "extracted" makes it sound as if the intention was to move things, yet ... > --- > xen/Rules.mk | 13 ------------- > xen/scripts/Kbuild.include | 7 ++++++- > xen/scripts/Makefile.clean | 33 +++++++++++++++++++++++++++++++++ > 3 files changed, 39 insertions(+), 14 deletions(-) ... ./Config.mk doesn't get touched at all. I guess there are reasons for this, but I consider it dangerous to leave independent definitions of the same variables in disconnected places. What if one side gets updated without noticing the other? > --- /dev/null > +++ b/xen/scripts/Makefile.clean > @@ -0,0 +1,33 @@ > +# SPDX-License-Identifier: GPL-2.0 > +# ========================================================================== > +# Cleaning up > +# ========================================================================== > + > +clean:: > + > +include $(BASEDIR)/scripts/Kbuild.include > + > +include Makefile > + > +# Figure out what we need to build from the various variables s/build/clean/ ? > +# ========================================================================== > +__subdir-y := $(filter %/, $(obj-y)) > +subdir-y += $(__subdir-y) > +subdir-n := $(subdir-n) $(subdir-) \ > + $(filter %/, $(obj-n) $(obj-)) > +subdir-all := $(subdir-y) $(subdir-n) Same remark as for the earlier patch regarding __subdir-y and the use of tabs. Additionally please use consistent indentation of := / += within this block. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |