Makefile: clean timestamp generation rule
create timestamp by rule without sideeffects. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
4b25966ab9
commit
6f329a5530
@ -4,24 +4,24 @@
|
|||||||
# Auto-generated header for tracing routines
|
# Auto-generated header for tracing routines
|
||||||
|
|
||||||
$(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
|
$(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
|
||||||
|
@cmp -s $< $@ || cp $< $@
|
||||||
$(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
$(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
||||||
$(call quiet-command,$(TRACETOOL) \
|
$(call quiet-command,$(TRACETOOL) \
|
||||||
--format=h \
|
--format=h \
|
||||||
--backend=$(TRACE_BACKEND) \
|
--backend=$(TRACE_BACKEND) \
|
||||||
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
||||||
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Auto-generated tracing routines (non-DTrace)
|
# Auto-generated tracing routines (non-DTrace)
|
||||||
|
|
||||||
ifneq ($(TRACE_BACKEND),dtrace)
|
ifneq ($(TRACE_BACKEND),dtrace)
|
||||||
$(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
|
$(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
|
||||||
|
@cmp -s $< $@ || cp $< $@
|
||||||
$(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
$(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
|
||||||
$(call quiet-command,$(TRACETOOL) \
|
$(call quiet-command,$(TRACETOOL) \
|
||||||
--format=c \
|
--format=c \
|
||||||
--backend=$(TRACE_BACKEND) \
|
--backend=$(TRACE_BACKEND) \
|
||||||
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
|
||||||
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
|
|
||||||
|
|
||||||
$(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
|
$(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user