Updated, for consistency. Regards, Stefano
From 7292a5e31cca3be31d8f44be87949e54da7af9e1 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> 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 45c5da8..4f37852 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-06-21 Stefano Lattarini <stefano.lattar...@gmail.com> + 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