All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Makefile: A few fixes to tag generation
@ 2021-08-04 13:23 Peter Xu
  2021-08-04 13:23 ` [PATCH v2 1/2] Makefile: Fix gtags generation Peter Xu
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Peter Xu @ 2021-08-04 13:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	peterx, Paolo Bonzini

I didn't squash patch 1 because they fix different things at different places
(patch 1 removes the "meson" dir warning on master branch already for gtags).
Patch 2 is the same as posted previous on the list.

Please have a look, thanks.

Peter Xu (2):
  Makefile: Fix gtags generation
  Makefile: Fix cscope issues on MacOS and soft links

 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.31.1




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

* [PATCH v2 1/2] Makefile: Fix gtags generation
  2021-08-04 13:23 [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
@ 2021-08-04 13:23 ` Peter Xu
  2021-08-04 13:23 ` [PATCH v2 2/2] Makefile: Fix cscope issues on MacOS and soft links Peter Xu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Peter Xu @ 2021-08-04 13:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	peterx, Paolo Bonzini

We should use "-print" or otherwise all "-prone" is ignored.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 401c623a65..d39d3670de 100644
--- a/Makefile
+++ b/Makefile
@@ -250,7 +250,7 @@ gtags:
 		"GTAGS", "Remove old $@ files")
 	$(call quiet-command, 				\
 	        (cd $(SRC_PATH) && 			\
-		 $(find-src-path) | gtags -f -), 	\
+		 $(find-src-path) -print | gtags -f -),	\
 		"GTAGS", "Re-index $(SRC_PATH)")
 
 .PHONY: TAGS
-- 
2.31.1



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

* [PATCH v2 2/2] Makefile: Fix cscope issues on MacOS and soft links
  2021-08-04 13:23 [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
  2021-08-04 13:23 ` [PATCH v2 1/2] Makefile: Fix gtags generation Peter Xu
@ 2021-08-04 13:23 ` Peter Xu
  2021-09-07 16:55 ` [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Peter Xu @ 2021-08-04 13:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	peterx, Paolo Bonzini

This patch fixes actually two issues with 'make cscope'.

Firstly, it fixes the command for MacOS "find" command as MacOS will append the
full path of "$(SRC_PATH)/" before each found entry, then after the final "./"
replacement trick it'll look like (e.g., "qapi/qmp-dispatch.c"):

  /qapi/qmp-dispatch.c

Which will point to the root directory instead.

Fix it by simply remove the "/" in "$(SRC_PATH)/" of "find-src-path", then
it'll work for at least both Linux and MacOS.

The other OS-independent issue is to start proactively ignoring soft links when
generating tags, otherwise by default on master branch we'll see this error
when "make cscope":

cscope: cannot find file subprojects/libvhost-user/include/atomic.h

This patch should fix the two issues altogether.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index d39d3670de..eeb21f0e6a 100644
--- a/Makefile
+++ b/Makefile
@@ -229,7 +229,8 @@ distclean: clean
 	rm -f linux-headers/asm
 	rm -Rf .sdk
 
-find-src-path = find "$(SRC_PATH)/" -path "$(SRC_PATH)/meson" -prune -o \( -name "*.[chsS]" -o -name "*.[ch].inc" \)
+find-src-path = find "$(SRC_PATH)" -path "$(SRC_PATH)/meson" -prune -o \
+	-type l -prune -o \( -name "*.[chsS]" -o -name "*.[ch].inc" \)
 
 .PHONY: ctags
 ctags:
-- 
2.31.1



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

* Re: [PATCH v2 0/2] Makefile: A few fixes to tag generation
  2021-08-04 13:23 [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
  2021-08-04 13:23 ` [PATCH v2 1/2] Makefile: Fix gtags generation Peter Xu
  2021-08-04 13:23 ` [PATCH v2 2/2] Makefile: Fix cscope issues on MacOS and soft links Peter Xu
@ 2021-09-07 16:55 ` Peter Xu
  2021-09-22 16:08   ` Peter Xu
  2021-10-15  1:37 ` Peter Xu
  2021-10-15  8:33 ` Paolo Bonzini
  4 siblings, 1 reply; 7+ messages in thread
From: Peter Xu @ 2021-09-07 16:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Paolo Bonzini

On Wed, Aug 04, 2021 at 09:23:26AM -0400, Peter Xu wrote:
> I didn't squash patch 1 because they fix different things at different places
> (patch 1 removes the "meson" dir warning on master branch already for gtags).
> Patch 2 is the same as posted previous on the list.
> 
> Please have a look, thanks.
> 
> Peter Xu (2):
>   Makefile: Fix gtags generation
>   Makefile: Fix cscope issues on MacOS and soft links
> 
>  Makefile | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Ping - Anyone would like to pick this up?   Even on linux I still see:

cscope: cannot find file subprojects/libvhost-user/include/atomic.h

Thanks,

-- 
Peter Xu



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

* Re: [PATCH v2 0/2] Makefile: A few fixes to tag generation
  2021-09-07 16:55 ` [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
@ 2021-09-22 16:08   ` Peter Xu
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Xu @ 2021-09-22 16:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Paolo Bonzini

On Tue, Sep 07, 2021 at 12:55:09PM -0400, Peter Xu wrote:
> On Wed, Aug 04, 2021 at 09:23:26AM -0400, Peter Xu wrote:
> > I didn't squash patch 1 because they fix different things at different places
> > (patch 1 removes the "meson" dir warning on master branch already for gtags).
> > Patch 2 is the same as posted previous on the list.
> > 
> > Please have a look, thanks.
> > 
> > Peter Xu (2):
> >   Makefile: Fix gtags generation
> >   Makefile: Fix cscope issues on MacOS and soft links
> > 
> >  Makefile | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> Ping - Anyone would like to pick this up?   Even on linux I still see:
> 
> cscope: cannot find file subprojects/libvhost-user/include/atomic.h

Ping?

-- 
Peter Xu



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

* Re: [PATCH v2 0/2] Makefile: A few fixes to tag generation
  2021-08-04 13:23 [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
                   ` (2 preceding siblings ...)
  2021-09-07 16:55 ` [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
@ 2021-10-15  1:37 ` Peter Xu
  2021-10-15  8:33 ` Paolo Bonzini
  4 siblings, 0 replies; 7+ messages in thread
From: Peter Xu @ 2021-10-15  1:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Marc-André Lureau,
	Philippe Mathieu-Daudé,
	Paolo Bonzini

On Wed, Aug 04, 2021 at 09:23:26AM -0400, Peter Xu wrote:
> I didn't squash patch 1 because they fix different things at different places
> (patch 1 removes the "meson" dir warning on master branch already for gtags).
> Patch 2 is the same as posted previous on the list.
> 
> Please have a look, thanks.

Ping again..  comments welcomed..

-- 
Peter Xu



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

* Re: [PATCH v2 0/2] Makefile: A few fixes to tag generation
  2021-08-04 13:23 [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
                   ` (3 preceding siblings ...)
  2021-10-15  1:37 ` Peter Xu
@ 2021-10-15  8:33 ` Paolo Bonzini
  4 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2021-10-15  8:33 UTC (permalink / raw)
  To: Peter Xu, qemu-devel
  Cc: Marc-André Lureau, Alex Bennée, Philippe Mathieu-Daudé

On 04/08/21 15:23, Peter Xu wrote:
> I didn't squash patch 1 because they fix different things at different places
> (patch 1 removes the "meson" dir warning on master branch already for gtags).
> Patch 2 is the same as posted previous on the list.
> 
> Please have a look, thanks.
> 
> Peter Xu (2):
>    Makefile: Fix gtags generation
>    Makefile: Fix cscope issues on MacOS and soft links
> 
>   Makefile | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 

Queued, thanks!

Paolo



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

end of thread, other threads:[~2021-10-15  9:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 13:23 [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
2021-08-04 13:23 ` [PATCH v2 1/2] Makefile: Fix gtags generation Peter Xu
2021-08-04 13:23 ` [PATCH v2 2/2] Makefile: Fix cscope issues on MacOS and soft links Peter Xu
2021-09-07 16:55 ` [PATCH v2 0/2] Makefile: A few fixes to tag generation Peter Xu
2021-09-22 16:08   ` Peter Xu
2021-10-15  1:37 ` Peter Xu
2021-10-15  8:33 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.