xen/arm: build: add missed dependency for head.S
authorWei Chen <wei.chen@linaro.org>
Fri, 3 Jun 2016 10:07:13 +0000 (18:07 +0800)
committerWei Liu <wei.liu2@citrix.com>
Wed, 8 Jun 2016 15:20:42 +0000 (16:20 +0100)
When we update the header files that had been included in head.S.
The build system would not re-compile the head.S. Because in the
build rules, the dependencies are setting to .*.d (eg. DEPS = .*.d)
files in the same folder as Makefile.

But head.S is very special, it was used by the Makefile in the parent
folder: "ALL_OBJS := $(TARGET_SUBARCH)/head.o".

In this case, the build system could not find the dependency in DEPS.
When we update the header files, the build system is unware of this
update. If we re-build the Xen without doing make clean or touching
the head.S, the build system will not recompile the head.S.

Signed-off-by: Wei Chen <Wei.Chen@linaro.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen/Rules.mk
xen/arch/arm/Makefile

index dded8b6f8ab48551a27ff54c77d98708cc3fa8f0..9d1820a87c1df6df65f6a1a6df318b25e48bbc80 100644 (file)
@@ -88,9 +88,10 @@ LDFLAGS += $(LDFLAGS-y)
 
 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
 
+DEPS = .*.d
+
 include Makefile
 
-DEPS = .*.d
 define gendep
     ifneq ($(1),$(subst /,:,$(1)))
         DEPS += $(dir $(1)).$(notdir $(1)).d
index af4d0e10104af3cc3d27c3d29f483f4a836dc8bc..9e38da39572320b0354450bed6823bbbf2320db6 100644 (file)
@@ -51,6 +51,8 @@ endif
 
 ALL_OBJS := $(TARGET_SUBARCH)/head.o $(ALL_OBJS)
 
+DEPS += $(TARGET_SUBARCH)/.head.o.d
+
 $(TARGET): $(TARGET)-syms $(TARGET).axf
        $(OBJCOPY) -O binary -S $< $@
 ifeq ($(CONFIG_ARM_64),y)