From 9f8501582f1c60c0a631a89499fb81d8f197fb30 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 12 Jan 2009 10:16:05 +0000 Subject: Use -MMD -MF in tools/* rather than -Wp,-M... If you use -MMD -MF then the correct .o filename is written to the .*.d file as the compiler driver arranges everything. This was done in 19010:275abe1c5d24 for the hypervisor. In this patch we do the same elsewhere in the xen-unstable tree, particularly tools/. Specifically: * Change tools/Rules.mk to add -MMD -MF ... to CFLAGS and set DEPS. * Remove -Wp,-MD... from every other Makefile * Remove setting of DEPS from every other Makefile * Ensure that every Makefile says -include $(DEPS) * Ensure that every Makefile's clean target removes $(DEPS) Some Makefiles were already halfway there, but often for a different variable name eg PROG_DEP. The variable name is now standardised in Rules.mk as DEPS. I have done a test build with this change, on Debian etch. Signed-off-by: Ian Jackson --- tools/libfsimage/Rules.mk | 4 +--- tools/libfsimage/common/Makefile | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'tools/libfsimage') diff --git a/tools/libfsimage/Rules.mk b/tools/libfsimage/Rules.mk index afc08bdaab..accbafef15 100644 --- a/tools/libfsimage/Rules.mk +++ b/tools/libfsimage/Rules.mk @@ -1,8 +1,6 @@ include $(XEN_ROOT)/tools/Rules.mk -DEPS = .*.d - -CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror -Wp,-MD,.$(@F).d +CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror LDFLAGS += -L../common/ PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile index 641bca53b3..48851acfa6 100644 --- a/tools/libfsimage/common/Makefile +++ b/tools/libfsimage/common/Makefile @@ -4,9 +4,6 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1.0 MINOR = 0 -CFLAGS += -Werror -Wp,-MD,.$(@F).d -DEPS = .*.d - LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU LDFLAGS = $(LDFLAGS-y) -- cgit v1.2.3