ia64/xen-unstable
changeset 19011:275abe1c5d24
Auto-build dependency files in hypervisor build tree.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Jan 08 13:08:37 2009 +0000 (2009-01-08) |
parents | 292919f61238 |
children | 7df072566b8c |
files | xen/Rules.mk xen/arch/ia64/Makefile xen/arch/ia64/Rules.mk xen/arch/x86/Makefile xen/arch/x86/Rules.mk xen/arch/x86/boot/Makefile xen/arch/x86/mm/Makefile xen/arch/x86/mm/hap/Makefile xen/arch/x86/mm/shadow/Makefile xen/arch/x86/x86_64/Makefile xen/common/Makefile xen/common/compat/Makefile |
line diff
1.1 --- a/xen/Rules.mk Thu Jan 08 11:32:39 2009 +0000 1.2 +++ b/xen/Rules.mk Thu Jan 08 13:08:37 2009 +0000 1.3 @@ -34,21 +34,8 @@ override TARGET_ARCH := $(shell echo 1.4 1.5 TARGET := $(BASEDIR)/xen 1.6 1.7 -HDRS := $(wildcard *.h) 1.8 -HDRS += $(wildcard $(BASEDIR)/include/xen/*.h) 1.9 -HDRS += $(wildcard $(BASEDIR)/include/xen/hvm/*.h) 1.10 -HDRS += $(wildcard $(BASEDIR)/include/public/*.h) 1.11 -HDRS += $(wildcard $(BASEDIR)/include/public/*/*.h) 1.12 -HDRS += $(wildcard $(BASEDIR)/include/compat/*.h) 1.13 -HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h) 1.14 -HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h) 1.15 - 1.16 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk 1.17 1.18 -# Do not depend on auto-generated header files. 1.19 -AHDRS := $(filter-out %/include/xen/compile.h,$(HDRS)) 1.20 -HDRS := $(filter-out %/asm-offsets.h,$(AHDRS)) 1.21 - 1.22 # Note that link order matters! 1.23 ALL_OBJS-y += $(BASEDIR)/common/built_in.o 1.24 ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o 1.25 @@ -77,12 +64,14 @@ AFLAGS-y += -D__ASSEMBLY_ 1.26 1.27 ALL_OBJS := $(ALL_OBJS-y) 1.28 1.29 -CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y)) 1.30 +CFLAGS_tmp := $(strip $(CFLAGS) $(CFLAGS-y)) 1.31 +CFLAGS = $(CFLAGS_tmp) -Wp,-MD,.$(@F).d 1.32 1.33 # Most CFLAGS are safe for assembly files: 1.34 # -std=gnu{89,99} gets confused by #-prefixed end-of-line comments 1.35 -AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y)) 1.36 -AFLAGS += $(patsubst -std=gnu%,,$(CFLAGS)) 1.37 +AFLAGS_tmp := $(strip $(AFLAGS) $(AFLAGS-y)) 1.38 +AFLAGS_tmp += $(patsubst -std=gnu%,,$(CFLAGS_tmp)) 1.39 +AFLAGS = $(AFLAGS_tmp) -Wp,-MD,.$(@F).d 1.40 1.41 # LDFLAGS are only passed directly to $(LD) 1.42 LDFLAGS := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT)) 1.43 @@ -103,6 +92,8 @@ obj-y := $(patsubst %/,%/built-in.o,$ 1.44 1.45 subdir-all := $(subdir-y) $(subdir-n) 1.46 1.47 +DEPS = .*.d 1.48 + 1.49 built_in.o: $(obj-y) 1.50 $(LD) $(LDFLAGS) -r -o $@ $^ 1.51 1.52 @@ -115,19 +106,21 @@ FORCE: 1.53 1.54 .PHONY: clean 1.55 clean:: $(addprefix _clean_, $(subdir-all)) 1.56 - rm -f *.o *~ core 1.57 + rm -f *.o *~ core $(DEPS) 1.58 _clean_%/: FORCE 1.59 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean 1.60 1.61 -%.o: %.c $(HDRS) Makefile 1.62 +%.o: %.c Makefile 1.63 $(CC) $(CFLAGS) -c $< -o $@ 1.64 1.65 -%.o: %.S $(AHDRS) Makefile 1.66 +%.o: %.S Makefile 1.67 $(CC) $(AFLAGS) -c $< -o $@ 1.68 1.69 -%.i: %.c $(HDRS) Makefile 1.70 +%.i: %.c Makefile 1.71 $(CPP) $(CFLAGS) $< -o $@ 1.72 1.73 # -std=gnu{89,99} gets confused by # as an end-of-line comment marker 1.74 -%.s: %.S $(AHDRS) Makefile 1.75 +%.s: %.S Makefile 1.76 $(CPP) $(AFLAGS) $< -o $@ 1.77 + 1.78 +-include $(DEPS)
2.1 --- a/xen/arch/ia64/Makefile Thu Jan 08 11:32:39 2009 +0000 2.2 +++ b/xen/arch/ia64/Makefile Thu Jan 08 13:08:37 2009 +0000 2.3 @@ -29,11 +29,11 @@ subdir-y += linux-xen 2.4 # Headers do not depend on auto-generated header, but object files do. 2.5 $(ALL_OBJS): $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h 2.6 2.7 -asm-offsets.s: asm-offsets.c $(HDRS) \ 2.8 +asm-offsets.s: asm-offsets.c \ 2.9 $(BASEDIR)/include/asm-ia64/.offsets.h.stamp 2.10 $(CC) $(CFLAGS) -DGENERATE_ASM_OFFSETS -DIA64_TASK_SIZE=0 -S -o $@ $< 2.11 2.12 -asm-xsi-offsets.s: asm-xsi-offsets.c $(HDRS) 2.13 +asm-xsi-offsets.s: asm-xsi-offsets.c 2.14 $(CC) $(CFLAGS) -S -o $@ $< 2.15 2.16 $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h: asm-xsi-offsets.s 2.17 @@ -61,7 +61,7 @@ asm-xsi-offsets.s: asm-xsi-offsets.c $(H 2.18 touch $@ 2.19 2.20 # I'm sure a Makefile wizard would know a better way to do this 2.21 -xen.lds.s: xen/xen.lds.S $(HDRS) 2.22 +xen.lds.s: xen/xen.lds.S 2.23 $(CC) -E $(CPPFLAGS) -P -DXEN $(AFLAGS) \ 2.24 -o xen.lds.s xen/xen.lds.S 2.25
3.1 --- a/xen/arch/ia64/Rules.mk Thu Jan 08 11:32:39 2009 +0000 3.2 +++ b/xen/arch/ia64/Rules.mk Thu Jan 08 13:08:37 2009 +0000 3.3 @@ -73,18 +73,3 @@ CFLAGS += -DCONFIG_XEN_IA64_DISABLE_OPTV 3.4 endif 3.5 3.6 LDFLAGS := -g 3.7 - 3.8 -# Additionnal IA64 include dirs. 3.9 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-null/asm/*.h) 3.10 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-null/asm/sn/*.h) 3.11 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-null/linux/*.h) 3.12 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-xen/asm/*.h) 3.13 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-xen/asm/sn/*.h) 3.14 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux-xen/linux/*.h) 3.15 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux/*.h) 3.16 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux/asm-generic/*.h) 3.17 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux/asm/*.h) 3.18 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/linux/byteorder/*.h) 3.19 -HDRS += $(wildcard $(BASEDIR)/include/asm-ia64/hvm/*.h) 3.20 - 3.21 -HDRS := $(filter-out %/include/asm-ia64/asm-xsi-offsets.h,$(HDRS))
4.1 --- a/xen/arch/x86/Makefile Thu Jan 08 11:32:39 2009 +0000 4.2 +++ b/xen/arch/x86/Makefile Thu Jan 08 13:08:37 2009 +0000 4.3 @@ -78,10 +78,10 @@ ALL_OBJS := $(BASEDIR)/arch/x86/boot/bui 4.4 $(@D)/.$(@F).1.o -o $@ 4.5 rm -f $(@D)/.$(@F).[0-9]* 4.6 4.7 -asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS) 4.8 +asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c 4.9 $(CC) $(CFLAGS) -S -o $@ $< 4.10 4.11 -xen.lds: $(TARGET_SUBARCH)/xen.lds.S $(HDRS) 4.12 +xen.lds: $(TARGET_SUBARCH)/xen.lds.S 4.13 $(CC) -P -E -Ui386 $(AFLAGS) -o $@ $< 4.14 4.15 boot/mkelf32: boot/mkelf32.c 4.16 @@ -90,4 +90,4 @@ boot/mkelf32: boot/mkelf32.c 4.17 .PHONY: clean 4.18 clean:: 4.19 rm -f asm-offsets.s xen.lds boot/*.o boot/*~ boot/core boot/mkelf32 4.20 - rm -f $(BASEDIR)/.xen-syms.[0-9]* 4.21 + rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d
5.1 --- a/xen/arch/x86/Rules.mk Thu Jan 08 11:32:39 2009 +0000 5.2 +++ b/xen/arch/x86/Rules.mk Thu Jan 08 13:08:37 2009 +0000 5.3 @@ -51,10 +51,5 @@ x86_32 := n 5.4 x86_64 := y 5.5 endif 5.6 5.7 -HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/*.h) 5.8 -HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/svm/*.h) 5.9 -HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/vmx/*.h) 5.10 -HDRS += $(wildcard $(BASEDIR)/include/asm-x86/mach-*/*.h) 5.11 - 5.12 # Require GCC v3.4+ (to avoid issues with alignment constraints in Xen headers) 5.13 $(call cc-ver-check,CC,0x030400,"Xen requires at least gcc-3.4")
6.1 --- a/xen/arch/x86/boot/Makefile Thu Jan 08 11:32:39 2009 +0000 6.2 +++ b/xen/arch/x86/boot/Makefile Thu Jan 08 13:08:37 2009 +0000 6.3 @@ -1,4 +1,1 @@ 6.4 obj-y += head.o 6.5 - 6.6 -head.o: head.S $(TARGET_SUBARCH).S trampoline.S mem.S video.S \ 6.7 - cmdline.S edd.S wakeup.S
7.1 --- a/xen/arch/x86/mm/Makefile Thu Jan 08 11:32:39 2009 +0000 7.2 +++ b/xen/arch/x86/mm/Makefile Thu Jan 08 13:08:37 2009 +0000 7.3 @@ -7,5 +7,5 @@ obj-y += guest_walk_2.o 7.4 obj-y += guest_walk_3.o 7.5 obj-$(x86_64) += guest_walk_4.o 7.6 7.7 -guest_walk_%.o: guest_walk.c $(HDRS) Makefile 7.8 +guest_walk_%.o: guest_walk.c Makefile 7.9 $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@
8.1 --- a/xen/arch/x86/mm/hap/Makefile Thu Jan 08 11:32:39 2009 +0000 8.2 +++ b/xen/arch/x86/mm/hap/Makefile Thu Jan 08 13:08:37 2009 +0000 8.3 @@ -7,5 +7,5 @@ obj-y += p2m-ept.o 8.4 guest_levels = $(subst level,,$(filter %level,$(subst ., ,$(subst _, ,$(1))))) 8.5 guest_walk_defns = -DGUEST_PAGING_LEVELS=$(call guest_levels,$(1)) 8.6 8.7 -guest_walk_%level.o: guest_walk.c $(HDRS) Makefile 8.8 +guest_walk_%level.o: guest_walk.c Makefile 8.9 $(CC) $(CFLAGS) $(call guest_walk_defns,$(@F)) -c $< -o $@
9.1 --- a/xen/arch/x86/mm/shadow/Makefile Thu Jan 08 11:32:39 2009 +0000 9.2 +++ b/xen/arch/x86/mm/shadow/Makefile Thu Jan 08 13:08:37 2009 +0000 9.3 @@ -1,5 +1,5 @@ 9.4 obj-$(x86_32) += common.o guest_2.o guest_3.o 9.5 obj-$(x86_64) += common.o guest_2.o guest_3.o guest_4.o 9.6 9.7 -guest_%.o: multi.c $(HDRS) Makefile 9.8 +guest_%.o: multi.c Makefile 9.9 $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@
10.1 --- a/xen/arch/x86/x86_64/Makefile Thu Jan 08 11:32:39 2009 +0000 10.2 +++ b/xen/arch/x86/x86_64/Makefile Thu Jan 08 13:08:37 2009 +0000 10.3 @@ -14,16 +14,3 @@ obj-$(CONFIG_COMPAT) += physdev.o 10.4 obj-$(CONFIG_COMPAT) += platform_hypercall.o 10.5 obj-$(CONFIG_COMPAT) += cpu_idle.o 10.6 obj-$(CONFIG_COMPAT) += cpufreq.o 10.7 - 10.8 -ifeq ($(CONFIG_COMPAT),y) 10.9 -# extra dependencies 10.10 -compat.o: ../compat.c 10.11 -domctl.o: ../domctl.c 10.12 -mm.o: compat/mm.c 10.13 -physdev.o: ../physdev.c 10.14 -platform_hypercall.o: ../platform_hypercall.c 10.15 -sysctl.o: ../sysctl.c 10.16 -traps.o: compat/traps.c 10.17 -cpu_idle.o: ../acpi/cpu_idle.c 10.18 -cpufreq.o: ../../../drivers/cpufreq/cpufreq.c 10.19 -endif
11.1 --- a/xen/common/Makefile Thu Jan 08 11:32:39 2009 +0000 11.2 +++ b/xen/common/Makefile Thu Jan 08 13:08:37 2009 +0000 11.3 @@ -42,13 +42,3 @@ subdir-$(x86_64) += hvm 11.4 subdir-$(ia64) += hvm 11.5 11.6 subdir-y += libelf 11.7 - 11.8 -# Object file contains changeset and compiler information. 11.9 -version.o: $(BASEDIR)/include/xen/compile.h 11.10 - 11.11 -ifeq ($(CONFIG_COMPAT),y) 11.12 -# extra dependencies 11.13 -grant_table.o: compat/grant_table.c 11.14 -schedule.o: compat/schedule.c 11.15 -xenoprof.o: compat/xenoprof.c 11.16 -endif
12.1 --- a/xen/common/compat/Makefile Thu Jan 08 11:32:39 2009 +0000 12.2 +++ b/xen/common/compat/Makefile Thu Jan 08 13:08:37 2009 +0000 12.3 @@ -3,7 +3,3 @@ obj-y += kernel.o 12.4 obj-y += memory.o 12.5 obj-y += multicall.o 12.6 obj-y += xlat.o 12.7 - 12.8 -# extra dependencies 12.9 -kernel.o: ../kernel.c 12.10 -multicall.o: ../multicall.c