automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/3] Fix cscope w.r.t. VPATH rewrites.


From: Stefano Lattarini
Subject: [PATCH 2/3] Fix cscope w.r.t. VPATH rewrites.
Date: Sat, 19 Jun 2010 17:08:13 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

* lib/am/tags.am (cscopelist): Take into account the possibility
that a source file is an absolute path, due to VPATH rewrite.
This fixes bugs on Solaris make, so that the tests cscope.test,
cscopec.test and cscopecxx.test now works with that make too.
---
 ChangeLog      |    6 ++++++
 lib/am/tags.am |   17 ++++++++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)
From 8334dab1a3c97de0a672816a461517207c131b21 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Sat, 19 Jun 2010 11:57:19 +0200
Subject: [PATCH 2/3] Fix cscope w.r.t. VPATH rewrites.

* lib/am/tags.am (cscopelist): Take into account the possibility
that a source file is an absolute path, due to VPATH rewrite.
This fixes bugs on Solaris make, so that the tests cscope.test,
cscopec.test and cscopecxx.test now works with that make too.
---
 ChangeLog      |    6 ++++++
 lib/am/tags.am |   17 ++++++++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1e8d358..ca0ccd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-06-19  Stefano Lattarini  <address@hidden>
 
+       Fix cscope w.r.t. VPATH rewrites.
+       * lib/am/tags.am (cscopelist): Take into account the possibility
+       that a source file is an absolute path, due to VPATH rewrite.
+       This fixes bugs on Solaris make, so that the tests cscope.test,
+       cscopec.test and cscopecxx.test now works with that make too.
+
        Refactor and extend tests on cscope functionality.
        * tests/cscope.test: Improve and normalize generation and names
        of source files.
diff --git a/lib/am/tags.am b/lib/am/tags.am
index 7fa75c9..e561fde 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -163,11 +163,18 @@ cscopelist: %CSCOPEDIRS% $(HEADERS) $(SOURCES) $(LISP)
          *) sdir=$(subdir)/$(srcdir) ;; \
        esac; \
        for i in $$list; do \
-         if test -f "$$i"; then \
-           echo "$(subdir)/$$i"; \
-         else \
-           echo "$$sdir/$$i"; \
-         fi; \
+         case $$i in \
+## Yes, source and/or header files can be absolute path, e.g. when make
+## perform a VPATH rewrite.
+           /*) \
+             echo "$$i";; \
+           *) \
+             if test -f "$$i"; then \
+               echo "$(subdir)/$$i"; \
+             else \
+               echo "$$sdir/$$i"; \
+             fi;; \
+         esac; \
        done >> $(top_builddir)/cscope.files
 
 
-- 
1.6.5


reply via email to

[Prev in Thread] Current Thread [Next in Thread]