X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=rules.mak;h=44997458da40573eb765704d0235f75a65759e48;hb=a7d6b9f084765a834110bb9a2a0329b1a96de792;hp=a28494679a6dd9e07cd6f1ffc1fe78ae92585c83;hpb=4dd533aa03d6844f61e95558d75d8dbec72d899c;p=qemu.git diff --git a/rules.mak b/rules.mak index a28494679..44997458d 100644 --- a/rules.mak +++ b/rules.mak @@ -14,24 +14,47 @@ MAKEFLAGS += -rR # Flags for dependency generation 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$(/dev/null 2>&1 && echo OK), $2, $3) -VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.texi %.sh +VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.texi %.sh %.rc set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1))) # find-in-path @@ -64,12 +87,16 @@ TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py # Generate timestamp files for .h include files -%.h: %.h-timestamp - @test -f $@ || cp $< $@ +config-%.h: config-%.h-timestamp + @cmp $< $@ >/dev/null 2>&1 || cp $< $@ + +config-%.h-timestamp: config-%.mak + $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, " GEN $(TARGET_DIR)config-$*.h") -%.h-timestamp: %.mak - $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, " GEN $*.h") - @cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h +.PHONY: clean-timestamp +clean-timestamp: + rm -f *.timestamp +clean: clean-timestamp # will delete the target of a rule if commands exit with a nonzero exit status .DELETE_ON_ERROR: