Skip to content

Commit

Permalink
trace: rebuild generated-events.o when configuration changes
Browse files Browse the repository at this point in the history
Make sure to rebuild generated-events.o when ./configure options change.
This prevents linker errors when a stale generated-events.o gets linked
with code compiled against fresh headers.  For example, try building
with ./configure --enable-trace-backend=stderr followed by ./configure
--enable-trace-backend=dtrace.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
stefanhaRH committed Mar 28, 2013
1 parent c6f18b9 commit a7373b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trace/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ $(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)

$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp
$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
$(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events
$(call quiet-command,$(TRACETOOL) \
--format=events-c \
Expand Down

0 comments on commit a7373b1

Please sign in to comment.