diff options
| author | Victor Kaplansky | 2015-08-09 11:39:53 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin | 2015-08-13 13:08:24 +0200 |
| commit | 998b7b1db4f61ee2784d8e9050c3dda15abd4425 (patch) | |
| tree | dc56e6c221e78b42f2e5836f18ba205f323ddb9b /rules.mak | |
| parent | Update version for v2.4.0 release (diff) | |
| download | qemu-998b7b1db4f61ee2784d8e9050c3dda15abd4425.tar.gz qemu-998b7b1db4f61ee2784d8e9050c3dda15abd4425.tar.xz qemu-998b7b1db4f61ee2784d8e9050c3dda15abd4425.zip | |
make: fix where dependency *.d are stored.
In rules like "bar/%.o: %.c" there is a difference between $(*D) and
$(@D). $(*D) expands to '.', while $(@D) expands to 'bar'. It is
cleaner to generate *.d in the same directory where appropriate *.o
resides. This allows precise including of dependency info from .d files.
As a hack, we also touch two sources for generated *.hex files. Without
this hack, anyone doing "git pull; make" will not get *.hex rebuilt
correctly since the dependency file would be missing.
Signed-off-by: Victor Kaplansky <victork@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'rules.mak')
| -rw-r--r-- | rules.mak | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -17,7 +17,7 @@ MAKEFLAGS += -rR QEMU_CXXFLAGS = -D__STDC_LIMIT_MACROS $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls, $(QEMU_CFLAGS)) # Flags for dependency generation -QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d +QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d # Same as -I$(SRC_PATH) -I., but for the nested source/object directories QEMU_INCLUDES += -I$(<D) -I$(@D) |
