[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC v2] xen/arm: build: add missed dependency for head.S
On Tue, Jun 07, 2016 at 12:34:43PM +0800, Wei Chen wrote: > In current Xen build rules, the build system will only check the > dependencies in current folder and obj-y generated dependencies > in other folder. > > But Makefile may add some objects to ALL_OBJS. These objects may > be not in the same folder as Makefile. Use arch/arm/Makefile as > an example: > ALL_OBJS := $(TARGET_SUBARCH)/head.o > > The head.o is not in the same folder as Makefile and is not listed > in obj-y. So, when we update the header files that had been included > in head.S. The build system would not check the dependency of head.S. > The head.S would not be re-compiled. > > In this patch, we will get objects added by Makefile and add their > dependencies to check list. > > Signed-off-by: Wei Chen <Wei.Chen@xxxxxxxxxx> > --- > v1 -> v2: > - Use a generic method instead of changing Makefiles > --- > xen/Rules.mk | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/xen/Rules.mk b/xen/Rules.mk > index 961d533..fb3087c 100644 > --- a/xen/Rules.mk > +++ b/xen/Rules.mk > @@ -95,12 +95,21 @@ include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk > include Makefile > > DEPS = .*.d > + > +# In obj-y and ALL_OBJS, there may have some objects are not in the You are missing a verb here. I think you mean to say 'there may be some objects which are not in the' > +# same folder as Makefile, so we have to use gendep to generate > +# dependencies for them. > +DEP_OBJS = $(obj-y) > + > +# Extract objects from ALL_OBJS added by Makefile. > +DEP_OBJS += $(filter-out %built_in.o,$(ALL_OBJS)) > + > define gendep > ifneq ($(1),$(subst /,:,$(1))) > DEPS += $(dir $(1)).$(notdir $(1)).d > endif > endef > -$(foreach o,$(filter-out %/,$(obj-y)),$(eval $(call gendep,$(o)))) > +$(foreach o,$(filter-out %/,$(DEP_OBJS)),$(eval $(call gendep,$(o)))) > > # Ensure each subdirectory has exactly one trailing slash. > subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n) $(subdir-))) > -- > 2.7.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxx > http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |