xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [XTF PATCH] Makefile: introduce gtags target
@ 2016-09-27 16:39 Wei Liu
  2016-09-27 16:45 ` Andrew Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Liu @ 2016-09-27 16:39 UTC (permalink / raw)
  To: Xen-devel; +Cc: andrew.cooper3, Wei Liu

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 .gitignore |  3 +++
 Makefile   | 10 +++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index f69e7fc..28c7874 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,6 @@
 /selftests/test-*
 /tests/*/test-*
 /tests/*/info.json
+/GPATH
+/GRTAGS
+/GTAGS
diff --git a/Makefile b/Makefile
index 17d784e..6767f72 100644
--- a/Makefile
+++ b/Makefile
@@ -50,11 +50,19 @@ install:
 		$(MAKE) -C $$D install; \
 	done
 
+define all_sources
+    ( find include/ arch/ common/ tests/ -name "*.[hcsS]" )
+endef
+
 .PHONY: cscope
 cscope:
-	find include/ arch/ common/ tests/ -name "*.[hcsS]" > cscope.files
+	$(all_sources) > cscope.files
 	cscope -b -q -k
 
+.PHONY: gtags
+gtags:
+	$(all_sources) | gtags -f -
+
 .PHONY: clean
 clean:
 	find . \( -name "*.o" -o -name "*.d" -o -name "*.lds" \) -delete
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [XTF PATCH] Makefile: introduce gtags target
  2016-09-27 16:39 [XTF PATCH] Makefile: introduce gtags target Wei Liu
@ 2016-09-27 16:45 ` Andrew Cooper
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2016-09-27 16:45 UTC (permalink / raw)
  To: Wei Liu, Xen-devel

On 27/09/16 17:39, Wei Liu wrote:
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> ---
>  .gitignore |  3 +++
>  Makefile   | 10 +++++++++-
>  2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/.gitignore b/.gitignore
> index f69e7fc..28c7874 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -11,3 +11,6 @@
>  /selftests/test-*
>  /tests/*/test-*
>  /tests/*/info.json
> +/GPATH
> +/GRTAGS
> +/GTAGS
> diff --git a/Makefile b/Makefile
> index 17d784e..6767f72 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -50,11 +50,19 @@ install:
>  		$(MAKE) -C $$D install; \
>  	done
>  
> +define all_sources
> +    ( find include/ arch/ common/ tests/ -name "*.[hcsS]" )

Why the subshell?  It doesn't look necessary.

Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

> +endef
> +
>  .PHONY: cscope
>  cscope:
> -	find include/ arch/ common/ tests/ -name "*.[hcsS]" > cscope.files
> +	$(all_sources) > cscope.files
>  	cscope -b -q -k
>  
> +.PHONY: gtags
> +gtags:
> +	$(all_sources) | gtags -f -
> +
>  .PHONY: clean
>  clean:
>  	find . \( -name "*.o" -o -name "*.d" -o -name "*.lds" \) -delete


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-27 16:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-27 16:39 [XTF PATCH] Makefile: introduce gtags target Wei Liu
2016-09-27 16:45 ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).