Skip to contentSkip to conversation

Makefile: Fix tag file generation targets

PATCH Applied Sergey Fedorov 2 participants 2 messages Jun 9, 2016 – Jun 13, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Fix tag file generation targets

From: Sergey Fedorov <[email protected]>

"ctags" produces a file named "tags", not "ctags". It doesn't look reasonable to use phony target name as a file name to remove. Just use exact file names to remove in "ctags" and "TAGS" target receipts.

---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index b8563db68677..61bf1bf9e2bb 100644
@@ -478,12 +478,12 @@ test speed: all
 
 .PHONY: ctags
 ctags:
-	rm -f $@
+	rm -f tags
 	find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
 
 .PHONY: TAGS
 TAGS:
-	rm -f $@
+	rm -f TAGS
 	find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
 
 cscope:
Signature · 1 line
1.9.1
#1 lore raw
Quoted 22 lines · Sergey Fedorov

From: Sergey Fedorov <[email protected]>

"ctags" produces a file named "tags", not "ctags". It doesn't look reasonable to use phony target name as a file name to remove. Just use exact file names to remove in "ctags" and "TAGS" target receipts.

---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +0 -1
index b8563db68677..61bf1bf9e2bb 100644
@@ -478,12 +478,12 @@ test speed: all
 
 .PHONY: ctags
 ctags:
-	rm -f $@

Makefile test speed: all · line 489

Quoted 10 lines
Makefile +2 -1
+	rm -f tags
 	find "$(SRC_PATH)" -name '*.[hc]' -exec ctags --append {} +
 
 .PHONY: TAGS
 TAGS:
-	rm -f $@
+	rm -f TAGS
 	find "$(SRC_PATH)" -name '*.[hc]' -exec etags --append {} +
 
 cscope:

Queued, thanks.

Paolo