X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=rules.mak;h=44997458da40573eb765704d0235f75a65759e48;hb=9a949b94f60ee48ca0fbb5dc263c7ee77b75149f;hp=fe0c881a3a091741032b71e31c3218cba84c167a;hpb=837d1f978224f7e7b020c71ffb10b291952cc596;p=qemu.git diff --git a/rules.mak b/rules.mak index fe0c881a3..44997458d 100644 --- a/rules.mak +++ b/rules.mak @@ -15,17 +15,33 @@ MAKEFLAGS += -rR QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d # Same as -I$(SRC_PATH) -I., but for the nested source/object directories -QEMU_CFLAGS += -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 @@ -70,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 $(TARGET_DIR)$*.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: