aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2013-05-23 15:19:38 +0200
committerJan Beulich <jbeulich@suse.com>2013-05-23 15:19:38 +0200
commit682949335b90b5fcf3a600d7067453b459a04af2 (patch)
treeeededf2daa3a4a341f8dd45c157b0a2d396f3de5
parent22de18bb89e776f77256653901a590aad9fc0a52 (diff)
downloadxen-682949335b90b5fcf3a600d7067453b459a04af2.tar.gz
xen-682949335b90b5fcf3a600d7067453b459a04af2.tar.bz2
xen-682949335b90b5fcf3a600d7067453b459a04af2.zip
tools: fix dependency file generation
There is a small set of places where files in subdirectories get compiled from the parent directory. Dependency file wise this is no problem as long as the files use names distinct without regard to the directories they sit in, and tools/console/ violates this (in having two main.c files). Hence we need to avoid losing the directory name, both to ensure the two compiler instances don't simultaneously write to the same file (happening of which is what triggered me looking into this) and to guarantee dependencies for all files will be seen by make on an incremental rebuild. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> master commit: 4d788e164d6556d931bc3e0a69e36b8cf7280794 master date: 2013-05-21 10:16:30 +0200
-rw-r--r--tools/Rules.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/Rules.mk b/tools/Rules.mk
index f7dda356b5..42a9cde305 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -45,7 +45,7 @@ X11_LDPATH = -L/usr/X11R6/$(LIBLEAFDIR)
CFLAGS += -D__XEN_TOOLS__
# Get gcc to generate the dependencies for us.
-CFLAGS += -MMD -MF .$(@F).d
+CFLAGS += -MMD -MF .$(if $(filter-out .,$(@D)),$(subst /,@,$(@D))@)$(@F).d
DEPS = .*.d
ifneq ($(XEN_OS),NetBSD)