# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1231420117 0
# Node ID 275abe1c5d24009e8a3ffa11cf4685085314cb81
# Parent 292919f6123823916f1274f3d512794f72f3e903
Auto-build dependency files in hypervisor build tree.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/Rules.mk | 35 ++++++++++++++---------------------
xen/arch/ia64/Makefile | 6 +++---
xen/arch/ia64/Rules.mk | 15 ---------------
xen/arch/x86/Makefile | 6 +++---
xen/arch/x86/Rules.mk | 5 -----
xen/arch/x86/boot/Makefile | 3 ---
xen/arch/x86/mm/Makefile | 2 +-
xen/arch/x86/mm/hap/Makefile | 2 +-
xen/arch/x86/mm/shadow/Makefile | 2 +-
xen/arch/x86/x86_64/Makefile | 13 -------------
xen/common/Makefile | 10 ----------
xen/common/compat/Makefile | 4 ----
12 files changed, 23 insertions(+), 80 deletions(-)
diff -r 292919f61238 -r 275abe1c5d24 xen/Rules.mk
--- a/xen/Rules.mk Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/Rules.mk Thu Jan 08 13:08:37 2009 +0000
@@ -34,20 +34,7 @@ override TARGET_ARCH := $(shell echo
TARGET := $(BASEDIR)/xen
-HDRS := $(wildcard *.h)
-HDRS += $(wildcard $(BASEDIR)/include/xen/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/xen/hvm/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/public/*/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/compat/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
-
include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
-
-# Do not depend on auto-generated header files.
-AHDRS := $(filter-out %/include/xen/compile.h,$(HDRS))
-HDRS := $(filter-out %/asm-offsets.h,$(AHDRS))
# Note that link order matters!
ALL_OBJS-y += $(BASEDIR)/common/built_in.o
@@ -77,12 +64,14 @@ AFLAGS-y += -D__ASSEMBLY_
ALL_OBJS := $(ALL_OBJS-y)
-CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
+CFLAGS_tmp := $(strip $(CFLAGS) $(CFLAGS-y))
+CFLAGS = $(CFLAGS_tmp) -Wp,-MD,.$(@F).d
# Most CFLAGS are safe for assembly files:
# -std=gnu{89,99} gets confused by #-prefixed end-of-line comments
-AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
-AFLAGS += $(patsubst -std=gnu%,,$(CFLAGS))
+AFLAGS_tmp := $(strip $(AFLAGS) $(AFLAGS-y))
+AFLAGS_tmp += $(patsubst -std=gnu%,,$(CFLAGS_tmp))
+AFLAGS = $(AFLAGS_tmp) -Wp,-MD,.$(@F).d
# LDFLAGS are only passed directly to $(LD)
LDFLAGS := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
@@ -103,6 +92,8 @@ obj-y := $(patsubst %/,%/built-in.o,$
subdir-all := $(subdir-y) $(subdir-n)
+DEPS = .*.d
+
built_in.o: $(obj-y)
$(LD) $(LDFLAGS) -r -o $@ $^
@@ -115,19 +106,21 @@ FORCE:
.PHONY: clean
clean:: $(addprefix _clean_, $(subdir-all))
- rm -f *.o *~ core
+ rm -f *.o *~ core $(DEPS)
_clean_%/: FORCE
$(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
-%.o: %.c $(HDRS) Makefile
+%.o: %.c Makefile
$(CC) $(CFLAGS) -c $< -o $@
-%.o: %.S $(AHDRS) Makefile
+%.o: %.S Makefile
$(CC) $(AFLAGS) -c $< -o $@
-%.i: %.c $(HDRS) Makefile
+%.i: %.c Makefile
$(CPP) $(CFLAGS) $< -o $@
# -std=gnu{89,99} gets confused by # as an end-of-line comment marker
-%.s: %.S $(AHDRS) Makefile
+%.s: %.S Makefile
$(CPP) $(AFLAGS) $< -o $@
+
+-include $(DEPS)
diff -r 292919f61238 -r 275abe1c5d24 xen/arch/ia64/Makefile
--- a/xen/arch/ia64/Makefile Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/arch/ia64/Makefile Thu Jan 08 13:08:37 2009 +0000
@@ -29,11 +29,11 @@ subdir-y += linux-xen
# Headers do not depend on auto-generated header, but object files do.
$(ALL_OBJS): $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h
-asm-offsets.s: asm-offsets.c $(HDRS) \
+asm-offsets.s: asm-offsets.c \
$(BASEDIR)/include/asm-ia64/.offsets.h.stamp
$(CC) $(CFLAGS) -DGENERATE_ASM_OFFSETS -DIA64_TASK_SIZE=0 -S -o $@ $<
-asm-xsi-offsets.s: asm-xsi-offsets.c $(HDRS)
+asm-xsi-offsets.s: asm-xsi-offsets.c
$(CC) $(CFLAGS) -S -o $@ $<
$(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h: asm-xsi-offsets.s
@@ -61,7 +61,7 @@ asm-xsi-offsets.s: asm-xsi-offsets.c $(H
touch $@
# I'm sure a Makefile wizard would know a better way to do this
-xen.lds.s: xen/xen.lds.S $(HDRS)
+xen.lds.s: xen/xen.lds.S
$(CC) -E $(CPPFLAGS) -P -DXEN $(AFLAGS) \
-o xen.lds.s xen/xen.lds.S
diff -r 292919f61238 -r 275abe1c5d24 xen/arch/ia64/Rules.mk
--- a/xen/arch/ia64/Rules.mk Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/arch/ia64/Rules.mk Thu Jan 08 13:08:37 2009 +0000
@@ -73,18 +73,3 @@ endif
endif
LDFLAGS := -g
-
-# Additionnal IA64 include dirs.
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-null/asm/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-null/asm/sn/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-null/linux/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-xen/asm/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-xen/asm/sn/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-xen/linux/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux/asm-generic/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux/asm/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux/byteorder/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/hvm/*.h)
-
-HDRS := $(filter-out %/include/asm-ia64/asm-xsi-offsets.h,$(HDRS))
diff -r 292919f61238 -r 275abe1c5d24 xen/arch/x86/Makefile
--- a/xen/arch/x86/Makefile Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/arch/x86/Makefile Thu Jan 08 13:08:37 2009 +0000
@@ -78,10 +78,10 @@ ALL_OBJS := $(BASEDIR)/arch/x86/boot/bui
$(@D)/.$(@F).1.o -o $@
rm -f $(@D)/.$(@F).[0-9]*
-asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS)
+asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c
$(CC) $(CFLAGS) -S -o $@ $<
-xen.lds: $(TARGET_SUBARCH)/xen.lds.S $(HDRS)
+xen.lds: $(TARGET_SUBARCH)/xen.lds.S
$(CC) -P -E -Ui386 $(AFLAGS) -o $@ $<
boot/mkelf32: boot/mkelf32.c
@@ -90,4 +90,4 @@ boot/mkelf32: boot/mkelf32.c
.PHONY: clean
clean::
rm -f asm-offsets.s xen.lds boot/*.o boot/*~ boot/core boot/mkelf32
- rm -f $(BASEDIR)/.xen-syms.[0-9]*
+ rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d
diff -r 292919f61238 -r 275abe1c5d24 xen/arch/x86/Rules.mk
--- a/xen/arch/x86/Rules.mk Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/arch/x86/Rules.mk Thu Jan 08 13:08:37 2009 +0000
@@ -51,10 +51,5 @@ x86_64 := y
x86_64 := y
endif
-HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/svm/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/vmx/*.h)
-HDRS += $(wildcard $(BASEDIR)/include/asm-x86/mach-*/*.h)
-
# Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers)
$(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")
diff -r 292919f61238 -r 275abe1c5d24 xen/arch/x86/boot/Makefile
--- a/xen/arch/x86/boot/Makefile Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/arch/x86/boot/Makefile Thu Jan 08 13:08:37 2009 +0000
@@ -1,4 +1,1 @@ obj-y += head.o
obj-y += head.o
-
-head.o: head.S $(TARGET_SUBARCH).S trampoline.S mem.S video.S \
- cmdline.S edd.S wakeup.S
diff -r 292919f61238 -r 275abe1c5d24 xen/arch/x86/mm/Makefile
--- a/xen/arch/x86/mm/Makefile Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/arch/x86/mm/Makefile Thu Jan 08 13:08:37 2009 +0000
@@ -7,5 +7,5 @@ obj-y += guest_walk_3.o
obj-y += guest_walk_3.o
obj-$(x86_64) += guest_walk_4.o
-guest_walk_%.o: guest_walk.c $(HDRS) Makefile
+guest_walk_%.o: guest_walk.c Makefile
$(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@
diff -r 292919f61238 -r 275abe1c5d24 xen/arch/x86/mm/hap/Makefile
--- a/xen/arch/x86/mm/hap/Makefile Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/arch/x86/mm/hap/Makefile Thu Jan 08 13:08:37 2009 +0000
@@ -7,5 +7,5 @@ guest_levels = $(subst level,,$(filter
guest_levels = $(subst level,,$(filter %level,$(subst ., ,$(subst _, ,$(1)))))
guest_walk_defns = -DGUEST_PAGING_LEVELS=$(call guest_levels,$(1))
-guest_walk_%level.o: guest_walk.c $(HDRS) Makefile
+guest_walk_%level.o: guest_walk.c Makefile
$(CC) $(CFLAGS) $(call guest_walk_defns,$(@F)) -c $< -o $@
diff -r 292919f61238 -r 275abe1c5d24 xen/arch/x86/mm/shadow/Makefile
--- a/xen/arch/x86/mm/shadow/Makefile Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/arch/x86/mm/shadow/Makefile Thu Jan 08 13:08:37 2009 +0000
@@ -1,5 +1,5 @@ obj-$(x86_32) += common.o guest_2.o gues
obj-$(x86_32) += common.o guest_2.o guest_3.o
obj-$(x86_64) += common.o guest_2.o guest_3.o guest_4.o
-guest_%.o: multi.c $(HDRS) Makefile
+guest_%.o: multi.c Makefile
$(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@
diff -r 292919f61238 -r 275abe1c5d24 xen/arch/x86/x86_64/Makefile
--- a/xen/arch/x86/x86_64/Makefile Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/arch/x86/x86_64/Makefile Thu Jan 08 13:08:37 2009 +0000
@@ -14,16 +14,3 @@ obj-$(CONFIG_COMPAT) += platform_hyperca
obj-$(CONFIG_COMPAT) += platform_hypercall.o
obj-$(CONFIG_COMPAT) += cpu_idle.o
obj-$(CONFIG_COMPAT) += cpufreq.o
-
-ifeq ($(CONFIG_COMPAT),y)
-# extra dependencies
-compat.o: ../compat.c
-domctl.o: ../domctl.c
-mm.o: compat/mm.c
-physdev.o: ../physdev.c
-platform_hypercall.o: ../platform_hypercall.c
-sysctl.o: ../sysctl.c
-traps.o: compat/traps.c
-cpu_idle.o: ../acpi/cpu_idle.c
-cpufreq.o: ../../../drivers/cpufreq/cpufreq.c
-endif
diff -r 292919f61238 -r 275abe1c5d24 xen/common/Makefile
--- a/xen/common/Makefile Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/common/Makefile Thu Jan 08 13:08:37 2009 +0000
@@ -42,13 +42,3 @@ subdir-$(ia64) += hvm
subdir-$(ia64) += hvm
subdir-y += libelf
-
-# Object file contains changeset and compiler information.
-version.o: $(BASEDIR)/include/xen/compile.h
-
-ifeq ($(CONFIG_COMPAT),y)
-# extra dependencies
-grant_table.o: compat/grant_table.c
-schedule.o: compat/schedule.c
-xenoprof.o: compat/xenoprof.c
-endif
diff -r 292919f61238 -r 275abe1c5d24 xen/common/compat/Makefile
--- a/xen/common/compat/Makefile Thu Jan 08 11:32:39 2009 +0000
+++ b/xen/common/compat/Makefile Thu Jan 08 13:08:37 2009 +0000
@@ -3,7 +3,3 @@ obj-y += memory.o
obj-y += memory.o
obj-y += multicall.o
obj-y += xlat.o
-
-# extra dependencies
-kernel.o: ../kernel.c
-multicall.o: ../multicall.c
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|