mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 07:22:34 +00:00
perf tools: Fix dependency for version file creation
The version generated by perf may not be correct by just changing the head commit, like this: $ git log --pretty=format:"%H" -n 1 b5d9d4708a24ac1889a30e9aedf8af8d73102139 $ perf -v perf version 5.16.gb5d9d4708a24 $ git reset --hard HEAD^ HEAD is now at 629f520b265f $ make ... $ ./perf -v perf version 5.16.gb5d9d4708a24 The dependency to building PERF-VERSION-FILE should also include ORIG_HEAD, as this changes when changing the head commit (while HEAD does not). Signed-off-by: John Garry <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Robert Richter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
cd6382d827
commit
4e666cdb06
@@ -691,7 +691,7 @@ $(OUTPUT)common-cmds.h: $(wildcard Documentation/perf-*.txt)
|
||||
$(SCRIPTS) : % : %.sh
|
||||
$(QUIET_GEN)$(INSTALL) '[email protected]' '$(OUTPUT)$@'
|
||||
|
||||
$(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD
|
||||
$(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD ../../.git/ORIG_HEAD
|
||||
$(Q)$(SHELL_PATH) util/PERF-VERSION-GEN $(OUTPUT)
|
||||
$(Q)touch $(OUTPUT)PERF-VERSION-FILE
|
||||
|
||||
@@ -1144,7 +1144,7 @@ endif
|
||||
# then force version regeneration:
|
||||
#
|
||||
ifeq ($(wildcard ../../.git/HEAD),)
|
||||
GIT-HEAD-PHONY = ../../.git/HEAD
|
||||
GIT-HEAD-PHONY = ../../.git/HEAD ../../.git/ORIG_HEAD
|
||||
else
|
||||
GIT-HEAD-PHONY =
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user