diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-01-12 10:16:05 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-01-12 10:16:05 +0000 |
commit | 9f8501582f1c60c0a631a89499fb81d8f197fb30 (patch) | |
tree | 9f7b768cc4205e09038c454d339b871099a7c324 /tools/flask | |
parent | ceff4bb8a36948e4216022511b263831e7e7190f (diff) | |
download | xen-9f8501582f1c60c0a631a89499fb81d8f197fb30.tar.gz xen-9f8501582f1c60c0a631a89499fb81d8f197fb30.tar.bz2 xen-9f8501582f1c60c0a631a89499fb81d8f197fb30.zip |
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 <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/flask')
-rw-r--r-- | tools/flask/libflask/Makefile | 1 | ||||
-rw-r--r-- | tools/flask/loadpolicy/Makefile | 7 |
2 files changed, 2 insertions, 6 deletions
diff --git a/tools/flask/libflask/Makefile b/tools/flask/libflask/Makefile index 8c085b929b..c03fc8aca8 100644 --- a/tools/flask/libflask/Makefile +++ b/tools/flask/libflask/Makefile @@ -16,7 +16,6 @@ CFLAGS += $(INCLUDES) -I./include -I$(XEN_LIBXC) -I$(XEN_INCLUDE) # Get gcc to generate the dependencies for us. CFLAGS += -Wp,-MD,.$(@F).d LDFLAGS += -L. -DEPS = .*.d LIB_OBJS := $(patsubst %.c,%.o,$(SRCS)) PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS)) diff --git a/tools/flask/loadpolicy/Makefile b/tools/flask/loadpolicy/Makefile index 7c38525ba8..8b404214c2 100644 --- a/tools/flask/loadpolicy/Makefile +++ b/tools/flask/loadpolicy/Makefile @@ -7,9 +7,6 @@ LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask PROFILE=#-pg BASECFLAGS=-Wall -g -Werror -# Make gcc generate dependencies. -BASECFLAGS += -Wp,-MD,.$(@F).d -PROG_DEP = .*.d BASECFLAGS+= $(PROFILE) #BASECFLAGS+= -I$(XEN_ROOT)/tools BASECFLAGS+= $(CFLAGS_libxenctrl) @@ -39,7 +36,7 @@ $(CLIENTS_OBJS): $(CLIENTS_SRCS) clean: rm -f *.o *.opic *.so rm -f $(CLIENTS) - $(RM) $(PROG_DEP) + $(RM) $(DEPS) .PHONY: print-dir print-dir: @@ -54,7 +51,7 @@ install: all $(INSTALL_DIR) $(DESTDIR)$(SBINDIR) $(INSTALL_PROG) $(CLIENTS) $(DESTDIR)$(SBINDIR) --include $(PROG_DEP) +-include $(DEPS) # never delete any intermediate files. .SECONDARY: |