Skip to content

Commit 998b7b1

Browse files
vkaplansmstsirkin
authored andcommitted
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 <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 5c79ae3 commit 998b7b1

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

hw/i386/acpi-dsdt.dsl

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ DefinitionBlock (
4343

4444
#include "acpi-dsdt-hpet.dsl"
4545

46-
4746
/****************************************************************
4847
* PIIX4 PM
4948
****************************************************************/

hw/i386/q35-acpi-dsdt.dsl

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* Based on acpi-dsdt.dsl, but heavily modified for q35 chipset.
2323
*/
2424

25+
2526
ACPI_EXTRACT_ALL_CODE Q35AcpiDsdtAmlCode
2627

2728
DefinitionBlock (

rules.mak

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ MAKEFLAGS += -rR
1717
QEMU_CXXFLAGS = -D__STDC_LIMIT_MACROS $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls, $(QEMU_CFLAGS))
1818

1919
# Flags for dependency generation
20-
QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
20+
QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d
2121

2222
# Same as -I$(SRC_PATH) -I., but for the nested source/object directories
2323
QEMU_INCLUDES += -I$(<D) -I$(@D)

0 commit comments

Comments
 (0)