perf tools: Fix tags target rebuilding
PATCH 1/1 perf tools: Fix tags target rebuilding
Once the tags file is generated it's never rebuilt until it's removed by hand.
The reason is that the Makefile does not treat tags as a target but as a file to be rebuilt.
Adding tags as PHONY target into the Makefile.
--- tools/perf/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tools/perf/Makefile +3 -1
@@ -61,7 +61,7 @@ endef # # Needed if no target specified: # -all: +all tags: $(print_msg) $(make)
@@ -77,3 +77,5 @@ clean: %: $(print_msg) $(make) + +.PHONY: tags
Signature · 1 line
1.8.3.1
Quoted 27 lines · Jiri Olsa
Once the tags file is generated it's never rebuilt until it's removed by hand.
The reason is that the
Makefiledoes not treat tags as a target but as a file to be rebuilt.Adding tags as PHONY target into the
Makefile.Signed-off-by Jiri Olsa <[email protected]>Cc Ingo Molnar <[email protected]>Cc Frederic Weisbecker <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Namhyung Kim <[email protected]>Cc Mike Galbraith <[email protected]>Cc Stephane Eranian <[email protected]>Cc David Ahern <[email protected]>Cc Adrian Hunter <[email protected]>Cc Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)tools/perf/Makefile +0
-0
tools/perf/Makefile endef · line 64
Quoted 5 lines
tools/perf/Makefile +1
-1@@ -61,7 +61,7 @@ endef # # Needed if no target specified: # -all: +all tags:
Obviously the change invalidates the comment above.
tools/perf/Makefile clean: · line 81
Quoted 9 lines
tools/perf/Makefile +2
-0$(print_msg) $(make)@@ -77,3 +77,5 @@ clean: %: $(print_msg) $(make) + +.PHONY: tags
Note that there's also a TAGS file that uses etags - which probably needs similar treatment.
Also note that we have duplicate code for this in Makefile.perf already. Would it be possible to pass through this there and keep the main Makefile is just a thin, minimal wrapper that adds default parallelism, etc?
Thanks,
Ingo
Quoted 25 lines · Ingo Molnar
Quoted 22 lines · Jiri Olsa
Once the tags file is generated it's never rebuilt until it's removed by hand.
The reason is that the
Makefiledoes not treat tags as a target but as a file to be rebuilt.Adding tags as PHONY target into the
Makefile.Signed-off-by Jiri Olsa <[email protected]>Cc Ingo Molnar <[email protected]>Cc Frederic Weisbecker <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Namhyung Kim <[email protected]>Cc Mike Galbraith <[email protected]>Cc Stephane Eranian <[email protected]>Cc David Ahern <[email protected]>Cc Adrian Hunter <[email protected]>Cc Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 12 lines
tools/perf/Makefile endef · line 64
Quoted 10 lines
tools/perf/Makefile +1
-1@@ -61,7 +61,7 @@ endef # # Needed if no target specified: # -all: +all tags:Obviously the change invalidates the comment above.
ugh, haven't noticed that comment ;-)
Quoted 4 lines
Quoted 4 lines
tools/perf/Makefile +0
-0$(print_msg) $(make)
Quoted 9 lines
tools/perf/Makefile clean: · line 81
Quoted 6 lines
tools/perf/Makefile +2
-0@@ -77,3 +77,5 @@ clean: %: $(print_msg) $(make) + +.PHONY: tagsNote that there's also a TAGS file that uses etags - which probably needs similar treatment.
yes
Quoted 5 lines
Also note that we have duplicate code for this in Makefile.perf already. Would it be possible to pass through this there and keep the main
Makefileis just a thin, minimal wrapper that adds default parallelism, etc?
well, thats what I actually tried to do.. pass the processing to the Makefile.perf otherwise it stops in Makefile
I guess you want some generic way of doing that
jirka
Quoted 63 lines · Jiri Olsa
Quoted 25 lines · Ingo Molnar
Quoted 22 lines · Jiri Olsa
Once the tags file is generated it's never rebuilt until it's removed by hand.
The reason is that the
Makefiledoes not treat tags as a target but as a file to be rebuilt.Adding tags as PHONY target into the
Makefile.Signed-off-by Jiri Olsa <[email protected]>Cc Ingo Molnar <[email protected]>Cc Frederic Weisbecker <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Namhyung Kim <[email protected]>Cc Mike Galbraith <[email protected]>Cc Stephane Eranian <[email protected]>Cc David Ahern <[email protected]>Cc Adrian Hunter <[email protected]>Cc Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)Quoted 12 lines
tools/perf/Makefile endef · line 64
Quoted 10 lines
tools/perf/Makefile +1
-1@@ -61,7 +61,7 @@ endef # # Needed if no target specified: # -all: +all tags:Obviously the change invalidates the comment above.
ugh, haven't noticed that comment ;-)
Quoted 4 lines
Quoted 4 lines
tools/perf/Makefile +0
-0$(print_msg) $(make)Quoted 9 lines
tools/perf/Makefile clean: · line 81
Quoted 6 lines
tools/perf/Makefile +2
-0@@ -77,3 +77,5 @@ clean: %: $(print_msg) $(make) + +.PHONY: tagsNote that there's also a TAGS file that uses etags - which probably needs similar treatment.
yes
Quoted 5 lines
Also note that we have duplicate code for this in Makefile.perf already. Would it be possible to pass through this there and keep the main
Makefileis just a thin, minimal wrapper that adds default parallelism, etc?
Quoted 5 lines
well, thats what I actually tried to do.. pass the processing to the Makefile.perf otherwise it stops in
MakefileI guess you want some generic way of doing that
If it's just these two phony targets that need to be in the main makefile then I guess your approach is the simplest one and we should do it like that instead of complicating the interface. If it gets messier in the future we can reconsider?
Thanks,
Ingo
PATCH v2 1/1 perf tools: Fix tags/TAGS targets rebuilding
Quoted 4 lines · Ingo Molnar
Quoted 1 line · Jiri Olsa
On Tue, Nov 26, 2013 at 12:31:08PM +0100, Ingo Molnar wrote:
SNIP
Quoted 10 lines
Quoted 10 lines
Quoted 5 lines
Also note that we have duplicate code for this in Makefile.perf already. Would it be possible to pass through this there and keep the main
Makefileis just a thin, minimal wrapper that adds default parallelism, etc?well, thats what I actually tried to do.. pass the processing to the Makefile.perf otherwise it stops in
Makefile
Quoted 7 lines
Quoted 1 line
I guess you want some generic way of doing that
If it's just these two phony targets that need to be in the main makefile then I guess your approach is the simplest one and we should do it like that instead of complicating the interface. If it gets messier in the future we can reconsider?
sounds good, pelase check v2
thanks,
jirka
---
Once the tags/TAGS file is generated it's never rebuilt until it's removed by hand.
The reason is that the Makefile does not treat tags/TAGS as targets but as files and thus won't rebuilt them once they are in place.
Adding PHONY tags/TAGS targets into Makefile.
--- tools/perf/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
tools/perf/Makefile +4 -1
@@ -60,8 +60,11 @@ endef # # Needed if no target specified: +# (Except for tags and TAGS targets. The reason is that the +# Makefile does not treat tags/TAGS as targets but as files +# and thus won't rebuilt them once they are in place.) # -all: +all tags TAGS:
$(print_msg) $(make)
@@ -77,3 +80,5 @@ clean:
%:
$(print_msg) $(make)
+
+.PHONY: tags TAGS
Signature · 1 line
1.8.3.1
Re: [PATCHv2] perf tools: Fix tags/TAGS targets rebuilding
Quoted 61 lines · Jiri Olsa
Quoted 4 lines · Ingo Molnar
Quoted 1 line · Jiri Olsa
On Tue, Nov 26, 2013 at 12:31:08PM +0100, Ingo Molnar wrote:
SNIP
Quoted 10 lines
Quoted 10 lines
Quoted 5 lines
Also note that we have duplicate code for this in Makefile.perf already. Would it be possible to pass through this there and keep the main
Makefileis just a thin, minimal wrapper that adds default parallelism, etc?well, thats what I actually tried to do.. pass the processing to the Makefile.perf otherwise it stops in
MakefileQuoted 7 lines
Quoted 1 line
I guess you want some generic way of doing that
If it's just these two phony targets that need to be in the main makefile then I guess your approach is the simplest one and we should do it like that instead of complicating the interface. If it gets messier in the future we can reconsider?
sounds good, pelase check v2
thanks,
jirka---
Once the tags/TAGS file is generated it's never rebuilt until it's removed by hand.The reason is that the
Makefiledoes not treat tags/TAGS as targets but as files and thus won't rebuilt them once they are in place.Adding PHONY tags/TAGS targets into
Makefile.Signed-off-by Jiri Olsa <[email protected]>Cc Ingo Molnar <[email protected]>Cc Frederic Weisbecker <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Namhyung Kim <[email protected]>Cc Mike Galbraith <[email protected]>Cc Stephane Eranian <[email protected]>Cc David Ahern <[email protected]>Cc Adrian Hunter <[email protected]>Cc Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)tools/perf/Makefile +0
-0
tools/perf/Makefile endef · line 65
Quoted 6 lines
tools/perf/Makefile +3
-0@@ -60,8 +60,11 @@ endef # # Needed if no target specified: +# (Except for tags and TAGS targets. The reason is that the +# Makefile does not treat tags/TAGS as targets but as files +# and thus won't rebuilt them once they are in place.)
s/rebuilt/rebuild
Btw., could we perhaps change the targets to 'ctags' and 'etags' instead? (That will make it natural to add 'gtags' in the future, should anyone want that.)
Thanks,
Ingo
Re: [PATCHv2] perf tools: Fix tags/TAGS targets rebuilding
On Tue, Nov 26, 2013 at 05:13:16PM +0100, Ingo Molnar wrote:
SNIP
Quoted 9 lines
tools/perf/Makefile endef · line 65
Quoted 6 lines
#
# Needed if no target specified:tools/perf/Makefile +3
-0+# (Except for tags and TAGS targets. The reason is that the +# Makefile does not treat tags/TAGS as targets but as files +# and thus won't rebuilt them once they are in place.)s/rebuilt/rebuild
Quoted 3 lines
Btw., could we perhaps change the targets to 'ctags' and 'etags' instead? (That will make it natural to add 'gtags' in the future, should anyone want that.)
my fingers vote against removing 'make tags' (and cscope) dont care much about the rest though.. ;-)
jirka
Ingo Molnar
Acked-byRe: [PATCHv2] perf tools: Fix tags/TAGS targets rebuilding
Quoted 13 lines · Jiri Olsa
On Tue, Nov 26, 2013 at 05:13:16PM +0100, Ingo Molnar wrote:
SNIP
Quoted 9 lines
tools/perf/Makefile endef · line 65
Quoted 6 lines
#
# Needed if no target specified:tools/perf/Makefile +3
-0+# (Except for tags and TAGS targets. The reason is that the +# Makefile does not treat tags/TAGS as targets but as files +# and thus won't rebuilt them once they are in place.)s/rebuilt/rebuild
Quoted 6 lines
Quoted 3 lines
Btw., could we perhaps change the targets to 'ctags' and 'etags' instead? (That will make it natural to add 'gtags' in the future, should anyone want that.)
my fingers vote against removing 'make tags' (and cscope) dont care much about the rest though.. ;-)
Okay, fair enough, and 'tags/TAGS' targets is also what the main kernel build system uses - so I concur. For your updated v2 patch:
Thanks,
Ingo
Re: [PATCHv2] perf tools: Fix tags/TAGS targets rebuilding
In reply to Jiri OlsaEm Wed, Nov 27, 2013 at 12:16:50AM +0100, Jiri Olsa escreveu:
Quoted 13 lines · Ingo Molnar
SNIP
Quoted 9 lines
tools/perf/Makefile endef · line 65
Quoted 6 lines
#
# Needed if no target specified:tools/perf/Makefile +3
-0+# (Except for tags and TAGS targets. The reason is that the +# Makefile does not treat tags/TAGS as targets but as files +# and thus won't rebuilt them once they are in place.)s/rebuilt/rebuild
Quoted 6 lines
Quoted 3 lines
Btw., could we perhaps change the targets to 'ctags' and 'etags' instead? (That will make it natural to add 'gtags' in the future, should anyone want that.)
my fingers vote against removing 'make tags' (and cscope) dont care much about the rest though.. ;-)
Ditto, please leave 'make tags', just like that kernel.
- Arnaldo
tip-bot for Jiri Olsa
merge bot[tip:perf/core] perf tools: Fix tags/TAGS targets rebuilding
In reply to Jiri Olsaperf tools: Fix tags/TAGS targets rebuilding
Commit-ID: 26286141a43251bed548349efbf60b61f1c433e8 Gitweb: http://git.kernel.org/tip/26286141a43251bed548349efbf60b61f1c433e8 Author: Jiri Olsa <[email protected]> AuthorDate: Tue, 26 Nov 2013 13:54:12 +0100 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 27 Nov 2013 16:47:14 -0300
perf tools: Fix tags/TAGS targets rebuilding
Once the tags/TAGS file is generated it's never rebuilt until it's removed by hand.
The reason is that the Makefile does not treat tags/TAGS as targets but as files and thus won't rebuilt them once they are in place.
Adding PHONY tags/TAGS targets into Makefile.
--- tools/perf/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
tools/perf/Makefile +6 -1
@@ -60,8 +60,11 @@ endef # # Needed if no target specified: +# (Except for tags and TAGS targets. The reason is that the +# Makefile does not treat tags/TAGS as targets but as files +# and thus won't rebuilt them once they are in place.) # -all: +all tags TAGS: $(print_msg) $(make)
@@ -77,3 +80,5 @@ clean: %: $(print_msg) $(make) + +.PHONY: tags TAGS