utils: Add "test/zdtm/lib" directory definitions to tags file

Submitted by Kirill Tkhai on June 27, 2017, 9:51 a.m.

Details

Message ID 149855704138.19796.9926284112775278223.stgit@localhost.localdomain
State Accepted
Series "utils: Add "test/zdtm/lib" directory definitions to tags file"
Headers show

Commit Message

Kirill Tkhai June 27, 2017, 9:51 a.m.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 Makefile |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/Makefile b/Makefile
index a1dd656c7..cfc58709a 100644
--- a/Makefile
+++ b/Makefile
@@ -299,22 +299,23 @@  tar-name := $(shell echo $(head-name) | sed -e 's/^v//g')
 dist tar: criu-$(tar-name).tar.bz2 ;
 .PHONY: dist tar
 
+TAGS_FILES_REGEXP := . -name '*.[hcS]' ! -path './.*' \( ! -path './test/*' -o -path './test/zdtm/lib/*' \)
 tags:
 	$(call msg-gen, $@)
 	$(Q) $(RM) tags
-	$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' -print | xargs $(CTAGS) -a
+	$(Q) $(FIND) $(TAGS_FILES_REGEXP) -print | xargs $(CTAGS) -a
 .PHONY: tags
 
 etags:
 	$(call msg-gen, $@)
 	$(Q) $(RM) TAGS
-	$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' -print | xargs $(ETAGS) -a
+	$(Q) $(FIND) $(TAGS_FILES_REGEXP) -print | xargs $(ETAGS) -a
 .PHONY: etags
 
 
 cscope:
 	$(call msg-gen, $@)
-	$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' ! -type l -print > cscope.files
+	$(Q) $(FIND) $(TAGS_FILES_REGEXP) ! -type l -print > cscope.files
 	$(Q) $(CSCOPE) -bkqu
 .PHONY: cscope
 

Comments

Andrey Vagin June 27, 2017, 10:46 p.m.
Applied, thanks
On Tue, Jun 27, 2017 at 12:51:02PM +0300, Kirill Tkhai wrote:
> Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
>  Makefile |    7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index a1dd656c7..cfc58709a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -299,22 +299,23 @@ tar-name := $(shell echo $(head-name) | sed -e 's/^v//g')
>  dist tar: criu-$(tar-name).tar.bz2 ;
>  .PHONY: dist tar
>  
> +TAGS_FILES_REGEXP := . -name '*.[hcS]' ! -path './.*' \( ! -path './test/*' -o -path './test/zdtm/lib/*' \)
>  tags:
>  	$(call msg-gen, $@)
>  	$(Q) $(RM) tags
> -	$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' -print | xargs $(CTAGS) -a
> +	$(Q) $(FIND) $(TAGS_FILES_REGEXP) -print | xargs $(CTAGS) -a
>  .PHONY: tags
>  
>  etags:
>  	$(call msg-gen, $@)
>  	$(Q) $(RM) TAGS
> -	$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' -print | xargs $(ETAGS) -a
> +	$(Q) $(FIND) $(TAGS_FILES_REGEXP) -print | xargs $(ETAGS) -a
>  .PHONY: etags
>  
>  
>  cscope:
>  	$(call msg-gen, $@)
> -	$(Q) $(FIND) . -name '*.[hcS]' ! -path './.*' ! -path './test/*' ! -type l -print > cscope.files
> +	$(Q) $(FIND) $(TAGS_FILES_REGEXP) ! -type l -print > cscope.files
>  	$(Q) $(CSCOPE) -bkqu
>  .PHONY: cscope
>  
>