diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-05-21 10:16:30 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-05-21 10:16:30 +0200 |
commit | 4d788e164d6556d931bc3e0a69e36b8cf7280794 (patch) | |
tree | 648d5ba1a4da7261e759660c1b23c298ca97a070 /tools/Rules.mk | |
parent | 3fa7fb8b86b89167153fa457b27620436d648969 (diff) | |
download | xen-4d788e164d6556d931bc3e0a69e36b8cf7280794.tar.gz xen-4d788e164d6556d931bc3e0a69e36b8cf7280794.tar.bz2 xen-4d788e164d6556d931bc3e0a69e36b8cf7280794.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>
Diffstat (limited to 'tools/Rules.mk')
-rw-r--r-- | tools/Rules.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/Rules.mk b/tools/Rules.mk index 3f03a315c4..13d8fc13b3 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -62,7 +62,7 @@ SHLIB_libxenlight = -Wl,-rpath-link=$(XEN_XENLIGHT) 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 ($(FILE_OFFSET_BITS),) |