automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-38-g


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-38-gc1ff56d
Date: Tue, 06 Oct 2009 20:37:19 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=c1ff56d0a9801ee70533b7f92e09260f341974ca

The branch, master has been updated
       via  c1ff56d0a9801ee70533b7f92e09260f341974ca (commit)
       via  2ecb79b74f368b4efe6e89f1b0dd9c2a69af4297 (commit)
       via  971878288bec797087215f7fb1e7c398ef2f3a1a (commit)
       via  674ee2f48686aa67507f9fa6dd67487f8a0e3b93 (commit)
       via  2f41d9740ce4765707936475c1c8d6d2eeef7f2f (commit)
       via  ffad481680a4e6a8f220c70f07b105c9f3f2dfdf (commit)
      from  a63fea495db54cfce8f9fbacc039e06090e55928 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c1ff56d0a9801ee70533b7f92e09260f341974ca
Merge: 2ecb79b74f368b4efe6e89f1b0dd9c2a69af4297 
971878288bec797087215f7fb1e7c398ef2f3a1a
Author: Ralf Wildenhues <address@hidden>
Date:   Tue Oct 6 22:09:37 2009 +0200

    Merge branch 'maint'

commit 2ecb79b74f368b4efe6e89f1b0dd9c2a69af4297
Merge: a63fea495db54cfce8f9fbacc039e06090e55928 
2f41d9740ce4765707936475c1c8d6d2eeef7f2f
Author: Ralf Wildenhues <address@hidden>
Date:   Tue Oct 6 22:09:27 2009 +0200

    Merge branch 'dr-cscope'
    
    * dr-cscope:
      Fixups and tests for cscope functionality.
      New target to generate cscope database.

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                    |    4 +
 ChangeLog                                     |   60 ++++++++++++++
 Makefile.in                                   |   67 +++++++++++-----
 NEWS                                          |    4 +
 THANKS                                        |    1 +
 automake.in                                   |   18 ++++-
 doc/Makefile.in                               |   43 +++++++---
 doc/automake.texi                             |   14 +++-
 lib/Automake/Makefile.in                      |   37 +++++++--
 lib/Automake/tests/Makefile.in                |    2 +
 lib/Makefile.in                               |   48 ++++++++---
 lib/am/Makefile.in                            |    2 +
 lib/am/tags.am                                |   40 +++++++++
 lib/compile                                   |    6 +-
 m4/Makefile.in                                |    2 +
 tests/Makefile.am                             |    4 +
 tests/Makefile.in                             |    6 ++
 tests/README                                  |    2 +-
 tests/{subobj3.test => ccnoco3.test}          |   64 +++++++++------
 tests/cscope.test                             |  108 +++++++++++++++++++++++++
 tests/{regex.test => cscope2.test}            |   16 +++-
 tests/{parallel-tests10.test => cscope3.test} |   34 +++-----
 22 files changed, 468 insertions(+), 114 deletions(-)
 copy tests/{subobj3.test => ccnoco3.test} (57%)
 create mode 100755 tests/cscope.test
 copy tests/{regex.test => cscope2.test} (73%)
 copy tests/{parallel-tests10.test => cscope3.test} (65%)

diff --git a/.gitignore b/.gitignore
index 81e5a98..716ef8b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,5 +7,9 @@ config.log
 config.status
 config.status.lineno
 configure.lineno
+cscope.files
+cscope.in.out
+cscope.out
+cscope.po.out
 tags
 TAGS
diff --git a/ChangeLog b/ChangeLog
index c76e559..b54cf75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,63 @@
+2009-10-06  Bruno Haible  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Fix 'compile' script to not call mv when target equals source.
+       * lib/compile: Don't attempt to move the generated file to its
+       target destination when it is already at the target destination.
+       Avoids an mv failure with subdir-objects.
+       * tests/ccnoco3.test: New test.
+       * tests/Makefile.am: Adjust.
+
+2009-10-01  Stefano Lattarini  <address@hidden>  (tiny change)
+
+       Fix recommended way to run automake's test scripts with Zsh.
+       * tests/README (Supported shells): Changed the recommended way
+       to run automake's test scripts with Zsh.  Now we tell to use
+       the Zsh's command line option `-o no_function_argzero', not
+       `--no-function-argzero', since the latter does not work with
+       versions 3.x of Zsh.
+
+2009-09-26  Ralf Wildenhues  <address@hidden>
+
+       Fixups and tests for cscope functionality.
+       It seems cscope is not able to take into account relative
+       file names of included cscope.files files, but it is able to
+       canonicalize file names containing '../' sequences.
+       This patch makes the cscope references relative again, and
+       fixes some corner cases.
+       * NEWS: Reword a bit.
+       * THANKS: Update.
+       * automake.in (handle_tags): Use $(am__cd).  Provide default
+       empty rule for the `cscope' target, for empty sources.
+       * lib/am/tags.am (cscopelist): Construct relative path to files
+       in $(srcdir) if $(srcdir) is relative.
+       [TOPDIR_P] (cscope): Do not depend on cscope-clean.  Only invoke
+       $(CSCOPE) if cscope.files is nonemtpy.
+       (clean-cscope): Rename from ...
+       (cscopeclean): ... this.
+       (cscope.files): Depend on clean-cscope.
+       (distclean-tags) [!TOPDIR_P]: No need to remove cscope files
+       here.
+       * tests/cscope.test, tests/cscope2.test, tests/cscope3.test: New
+       tests.
+       * tests/Makefile.am: Adjust.
+
+2009-09-25  Debarshi Ray  <address@hidden>
+
+       New target to generate cscope database.
+       * automake.in (handle_tags): Handle cscope.
+       * doc/automake.texi (Tags): Document cscope.
+       * lib/am/tags.am (CSCOPE): New macro.
+       [TOPDIR_P] (AM_RECURSIVE_TARGETS): Add cscope.
+       (cscope): New target.
+       (cscopeclean): Likewise.
+       (cscope.files): Likewise.
+       (cscopelist): Likewise.
+       (distclean-tags): Remove `cscope.out', `cscope.in.out',
+       `cscope.po.out' and `cscope.files'.
+       * NEWS: Update.
+       Based upon earlier patch from Jesse Barnes.
+
 2009-09-25  Ralf Wildenhues  <address@hidden>
 
        Use silent-rules for building the Automake package.
diff --git a/Makefile.in b/Makefile.in
index 3c21cbb..9dfaa4e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -95,9 +95,10 @@ RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive 
clean-recursive      \
   distclean-recursive maintainer-clean-recursive
 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
        $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
-       distdir dist dist-all distcheck
+       cscope distdir dist dist-all distcheck
 ETAGS = etags
 CTAGS = ctags
+CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
@@ -446,6 +447,10 @@ ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
        done
+cscopelist-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
cscopelist); \
+       done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -509,8 +514,32 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscope: cscope.files
+       test ! -s cscope.files \
+         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files 
$(CSCOPE_ARGS)
+
+clean-cscope:
+       -rm -f cscope.files
+
+cscope.files: clean-cscope cscopelist-recursive cscopelist
+
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
@@ -799,26 +828,26 @@ ps-am:
 uninstall-am: uninstall-binSCRIPTS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-       install-am install-exec-am install-strip tags-recursive \
-       uninstall-am
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+       cscopelist-recursive ctags-recursive install-am \
+       install-exec-am install-strip tags-recursive uninstall-am
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-       all all-am am--refresh check check-am clean clean-generic \
-       ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
-       dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
-       distcheck distclean distclean-generic distclean-tags \
-       distcleancheck distdir distuninstallcheck dvi dvi-am html \
-       html-am info info-am install install-am install-binSCRIPTS \
-       install-data install-data-am install-dvi install-dvi-am \
-       install-exec install-exec-am install-exec-hook install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       installdirs-am maintainer-clean maintainer-clean-generic \
-       mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
-       tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \
-       uninstall-hook
+       all all-am am--refresh check check-am clean clean-cscope \
+       clean-generic cscope cscopelist cscopelist-recursive ctags \
+       ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
+       dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
+       distclean distclean-generic distclean-tags distcleancheck \
+       distdir distuninstallcheck dvi dvi-am html html-am info \
+       info-am install install-am install-binSCRIPTS install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-exec-hook install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+       uninstall uninstall-am uninstall-binSCRIPTS uninstall-hook
 
 
 install-exec-hook:
diff --git a/NEWS b/NEWS
index 26a8b31..ef46ee7 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ New in 1.11a:
 
   - automake now generates silenced rules for texinfo outputs.
 
+* New targets:
+
+  - New `cscope' target to build a cscope database for the source tree.
+
 Bugs fixed in 1.11a:
 
 * Bugs introduced by 1.11:
diff --git a/THANKS b/THANKS
index 7b8664a..54615be 100644
--- a/THANKS
+++ b/THANKS
@@ -64,6 +64,7 @@ danbp                 address@hidden
 Daniel Jacobowitz      address@hidden
 Daniel Kahn Gillmor    address@hidden
 Daniel Richard G.      address@hidden
+Debarshi Ray           address@hidden
 Dave Brolley           address@hidden
 Dave Morrison          address@hidden
 David A. Swierczek     address@hidden
diff --git a/automake.in b/automake.in
index 25ba40d..bd5eb7b 100755
--- a/automake.in
+++ b/automake.in
@@ -3747,6 +3747,7 @@ sub handle_tags
 {
     my @tag_deps = ();
     my @ctag_deps = ();
+    my @cscope_deps = ();
     if (var ('SUBDIRS'))
     {
        $output_rules .= ("tags-recursive:\n"
@@ -3770,6 +3771,17 @@ sub handle_tags
        push (@ctag_deps, 'ctags-recursive');
        &depend ('.PHONY', 'ctags-recursive');
        &depend ('.MAKE', 'ctags-recursive');
+
+       $output_rules .= ("cscopelist-recursive:\n"
+                         . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do 
\\\n"
+                         # Never fail here if a subdir fails; it
+                         # isn't important.
+                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) 
\$\$subdir"
+                         . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n"
+                         . "\tdone\n");
+       push (@cscope_deps, 'cscopelist-recursive');
+       &depend ('.PHONY', 'cscopelist-recursive');
+       &depend ('.MAKE', 'cscopelist-recursive');
     }
 
     if (&saw_sources_p (1)
@@ -3792,7 +3804,8 @@ sub handle_tags
                                         new Automake::Location,
                                         CONFIG    => "@config",
                                         TAGSDIRS  => "@tag_deps",
-                                        CTAGSDIRS => "@ctag_deps");
+                                        CTAGSDIRS => "@ctag_deps",
+                                        CSCOPEDIRS => "@cscope_deps");
 
        set_seen 'TAGS_DEPENDENCIES';
     }
@@ -3807,8 +3820,9 @@ sub handle_tags
        # Otherwise, it would be possible for a top-level "make TAGS"
        # to fail because some subdirectory failed.
        $output_rules .= "tags: TAGS\nTAGS:\n\n";
-       # Ditto ctags.
+       # Ditto ctags and cscope.
        $output_rules .= "ctags: CTAGS\nCTAGS:\n\n";
+       $output_rules .= "cscope cscopelist:\n\n";
     }
 }
 
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 7b1ef22..5717c3c 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -561,6 +561,20 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscopelist:  $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -793,20 +807,21 @@ uninstall-man: uninstall-man1
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-aminfo \
-       clean-generic ctags dist-info distclean distclean-generic \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am \
-       install-dist_docDATA install-dvi install-dvi-am install-exec \
-       install-exec-am install-html install-html-am install-info \
-       install-info-am install-man install-man1 install-pdf \
-       install-pdf-am install-ps install-ps-am install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-aminfo maintainer-clean-generic \
-       maintainer-clean-vti mostlyclean mostlyclean-aminfo \
-       mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am tags \
-       uninstall uninstall-am uninstall-dist_docDATA uninstall-dvi-am \
-       uninstall-html-am uninstall-info-am uninstall-man \
-       uninstall-man1 uninstall-pdf-am uninstall-ps-am
+       clean-generic cscopelist ctags dist-info distclean \
+       distclean-generic distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dist_docDATA install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-man1 install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-aminfo \
+       maintainer-clean-generic maintainer-clean-vti mostlyclean \
+       mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
+       pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-dist_docDATA uninstall-dvi-am uninstall-html-am \
+       uninstall-info-am uninstall-man uninstall-man1 \
+       uninstall-pdf-am uninstall-ps-am
 
 $(dist_man1_MANS): $(top_srcdir)/configure.ac
 $(srcdir)/aclocal.1 $(srcdir)/automake.1:
diff --git a/doc/automake.texi b/doc/automake.texi
index f6633d8..4229dc0 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -312,7 +312,7 @@ Support for Test Suites
 
 Miscellaneous Rules
 
-* Tags::                        Interfacing to etags and mkid
+* Tags::                        Interfacing to cscope, etags and mkid
 * Suffixes::                    Handling new file extensions
 * Multilibs::                   Support for multilibs.
 
@@ -9320,7 +9320,7 @@ the @code{AM_INIT_AUTOMAKE} macro in @file{configure.ac}.
 There are a few rules and variables that didn't fit anywhere else.
 
 @menu
-* Tags::                        Interfacing to etags and mkid
+* Tags::                        Interfacing to cscope, etags and mkid
 * Suffixes::                    Handling new file extensions
 * Multilibs::                   Support for multilibs.
 @end menu
@@ -9382,6 +9382,14 @@ Automake will also generate an @code{ID} rule that will 
run
 directory-by-directory basis.
 @trindex id
 
+Similarly, the @code{cscope} rule will create a list of all the source
+files in the tree and run @command{cscope} to build an inverted index
+database.  The variable @code{CSCOPE} is the name of the program to invoke
+(by default @command{cscope}); @code{CSCOPEFLAGS} and
address@hidden can be used by the user to pass additional flags and
+file names respectively, while @code{AM_CSCOPEFLAGS} can be used by the
address@hidden
+
 Finally, Automake also emits rules to support the
 @uref{http://www.gnu.org/software/global/, GNU Global Tags program}.
 The @code{GTAGS} rule runs Global Tags and puts the
@@ -12906,4 +12914,4 @@ parentheses is the number of generated test cases.
 @c  LocalWords:  LTALLOCA MALLOC malloc memcmp strdup alloca libcompat xyz DFOO
 @c  LocalWords:  unprefixed buildable preprocessed DBAZ DDATADIR WARNINGCFLAGS
 @c  LocalWords:  LIBFOOCFLAGS LIBFOOLDFLAGS ftable testSubDir obj LIBTOOLFLAGS
address@hidden  LocalWords:  barexec Pinard's automatize initialize lzma xz
address@hidden  LocalWords:  barexec Pinard's automatize initialize lzma xz 
cscope
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index 0681cf8..9717941 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -394,6 +394,10 @@ ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
        done
+cscopelist-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
cscopelist); \
+       done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -457,6 +461,20 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -618,17 +636,18 @@ ps-am:
 
 uninstall-am: uninstall-dist_perllibDATA uninstall-nodist_perllibDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-       install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+       cscopelist-recursive ctags-recursive install-am install-strip \
+       tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-       all all-am check check-am clean clean-generic ctags \
-       ctags-recursive distclean distclean-generic distclean-tags \
-       distdir dvi dvi-am html html-am info info-am install \
-       install-am install-data install-data-am \
-       install-dist_perllibDATA install-dvi install-dvi-am \
-       install-exec install-exec-am install-html install-html-am \
-       install-info install-info-am install-man \
+       all all-am check check-am clean clean-generic cscopelist \
+       cscopelist-recursive ctags ctags-recursive distclean \
+       distclean-generic distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dist_perllibDATA install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
        install-nodist_perllibDATA install-pdf install-pdf-am \
        install-ps install-ps-am install-strip installcheck \
        installcheck-am installdirs installdirs-am maintainer-clean \
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 90550c0..7ab305f 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -281,6 +281,8 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
+cscope cscopelist:
+
 
 # To be appended to the command running the test.  Handle the stdout
 # and stderr redirection, and catch the exit status.
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 122b929..1d5d4cd 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -369,6 +369,10 @@ ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
ctags); \
        done
+cscopelist-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
cscopelist); \
+       done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -432,6 +436,20 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -593,22 +611,24 @@ ps-am:
 
 uninstall-am: uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-       install-am install-data-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+       cscopelist-recursive ctags-recursive install-am \
+       install-data-am install-strip tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
-       all all-am check check-am clean clean-generic ctags \
-       ctags-recursive distclean distclean-generic distclean-tags \
-       distdir dvi dvi-am html html-am info info-am install \
-       install-am install-data install-data-am install-data-hook \
-       install-dist_pkgvdataDATA install-dist_scriptDATA install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installcheck-local \
-       installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-       pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+       all all-am check check-am clean clean-generic cscopelist \
+       cscopelist-recursive ctags ctags-recursive distclean \
+       distclean-generic distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-data-hook install-dist_pkgvdataDATA \
+       install-dist_scriptDATA install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installcheck-local installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+       tags-recursive uninstall uninstall-am \
        uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA
 
 
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 8321d46..733bc68 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -276,6 +276,8 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
+cscope cscopelist:
+
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/lib/am/tags.am b/lib/am/tags.am
index 7463e2f..7fa75c9 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -134,6 +134,43 @@ GTAGS:
          && gtags -i $(GTAGS_ARGS) "$$here"
 
 
+## ------- ##
+## cscope  ##
+## ------- ##
+
+if %?TOPDIR_P%
+
+CSCOPE = cscope
+.PHONY: cscope clean-cscope
+AM_RECURSIVE_TARGETS += cscope
+
+cscope: cscope.files
+       test ! -s cscope.files \
+         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files 
$(CSCOPE_ARGS)
+
+clean-cscope:
+       -rm -f cscope.files
+
+cscope.files: clean-cscope %CSCOPEDIRS% cscopelist
+
+endif %?TOPDIR_P%
+
+.PHONY: cscopelist
+cscopelist: %CSCOPEDIRS% $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
+
 ## ---------- ##
 ## Cleaning.  ##
 ## ---------- ##
@@ -142,3 +179,6 @@ GTAGS:
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+if %?TOPDIR_P%
+       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+endif %?TOPDIR_P%
diff --git a/lib/compile b/lib/compile
index ec64c62..c0096a7 100755
--- a/lib/compile
+++ b/lib/compile
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand `-c -o'.
 
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2009-10-06.20; # UTC
 
 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
 # Foundation, Inc.
@@ -124,9 +124,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15
 ret=$?
 
 if test -f "$cofile"; then
-  mv "$cofile" "$ofile"
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
 elif test -f "${cofile}bj"; then
-  mv "${cofile}bj" "$ofile"
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
 fi
 
 rmdir "$lockdir"
diff --git a/m4/Makefile.in b/m4/Makefile.in
index b9946d6..7a04945 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -273,6 +273,8 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
+cscope cscopelist:
+
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7f6910b..6f3c6f4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -103,6 +103,7 @@ canon5.test \
 canon-name.test \
 ccnoco.test \
 ccnoco2.test \
+ccnoco3.test \
 check.test \
 check2.test \
 check3.test \
@@ -208,6 +209,9 @@ confsub.test \
 confvar.test \
 confvar2.test \
 copy.test \
+cscope.test \
+cscope2.test \
+cscope3.test \
 ctarget1.test \
 cxx.test \
 cxx2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index de86e68..a4e0491 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -344,6 +344,7 @@ canon5.test \
 canon-name.test \
 ccnoco.test \
 ccnoco2.test \
+ccnoco3.test \
 check.test \
 check2.test \
 check3.test \
@@ -449,6 +450,9 @@ confsub.test \
 confvar.test \
 confvar2.test \
 copy.test \
+cscope.test \
+cscope2.test \
+cscope3.test \
 ctarget1.test \
 cxx.test \
 cxx2.test \
@@ -1028,6 +1032,8 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
+cscope cscopelist:
+
 
 # To be appended to the command running the test.  Handle the stdout
 # and stderr redirection, and catch the exit status.
diff --git a/tests/README b/tests/README
index b264881..4068ad6 100644
--- a/tests/README
+++ b/tests/README
@@ -57,7 +57,7 @@ Supported shells
   no easy workaround.  Thus, if you want to run a test script, say
   foo.test, with Zsh, you *can't* simply do `zsh foo.test', but you
   *must* resort to:
-    zsh --no-function-argzero foo.test
+    zsh -o no_function_argzero foo.test
 
   Note that this problem does not occur if zsh is executed through a
   symlink with a basename of `sh', since in that case it starts
diff --git a/tests/subobj3.test b/tests/ccnoco3.test
similarity index 57%
copy from tests/subobj3.test
copy to tests/ccnoco3.test
index a4ba765..2e9cd37 100755
--- a/tests/subobj3.test
+++ b/tests/ccnoco3.test
@@ -1,6 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006  Free Software
-# Foundation, Inc.
+# Copyright (C) 2001, 2002, 2008, 2009  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,51 +14,68 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test of subdir objects with C++.
+# Test to make sure `compile' doesn't call 'mv SRC SRC'.
 
 required=gcc
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(sub/hello.c)
-dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(hello,0.23)
+cat >> configure.in << 'END'
 AC_PROG_CC
-AC_PROG_CC_STDC
 AM_PROG_CC_C_O
-AM_C_PROTOTYPES
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
-bin_PROGRAMS = hello
-hello_SOURCES = sub/hello.c
+bin_PROGRAMS = wish
+wish_SOURCES = a.c
 END
 
 mkdir sub
-cat > sub/hello.c << 'END'
+
+cat > a.c << 'END'
 #include <stdio.h>
-int
-main (int argc, char *argv[])
+
+int main ()
 {
-   printf ("yeah, yeah\n");
-   return 0;
+  printf ("hi\n");
 }
 END
 
+cat > Mycomp << 'END'
+#!/bin/sh
+
+case " "$* in
+ *\ -c*\ -o* | *\ -o*\ -c*)
+    exit 1
+    ;;
+esac
+
+exec gcc "$@"
+END
+
+chmod +x Mycomp
+
 # Ignore user CFLAGS.
 CFLAGS=
 export CFLAGS
 
-# We use gcc and not gcc -traditional as the latter fails on some
-# Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
-./configure
-ANSI2KNR=./ansi2knr U=_ $MAKE -e
-./hello
+$AUTOMAKE --copy --add-missing
+
+mkdir build
+cd build
+
+# Make sure the compiler doesn't understand `-c -o'
+CC=`pwd`/../Mycomp
+export CC
+
+../configure
+$MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'mv.*the same file' stderr && Exit 1
+
+Exit 0
diff --git a/tests/cscope.test b/tests/cscope.test
new file mode 100755
index 0000000..5beee5b
--- /dev/null
+++ b/tests/cscope.test
@@ -0,0 +1,108 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test cscope functionality.
+
+required=
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_FC
+AM_PROG_GCJ
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+mkdir sub sub/subsub
+
+cat >Makefile.am <<'END'
+SUBDIRS = sub
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c bar.cpp baz.f90
+lisp_LISP = foo.el
+EXTRA_DIST = foo.el
+END
+
+cat >sub/Makefile.am <<'END'
+bin_PROGRAMS = bar
+bar_SOURCES = subsub/dist.c
+nodist_bar_SOURCES = subsub/gen.c
+subsub/gen.c:
+       $(MKDIR_P) subsub
+       echo 'int generated_subsub () { return 0; }' > $@
+CLEANFILES = subsub/gen.c
+END
+
+echo 'int foo_func () { return 0; }' > foo.c
+echo 'int main () { return 0; }' > bar.cpp
+cat > baz.f90 <<'END'
+      subroutine baz
+      end
+END
+: >foo.el
+echo 'int main () { return 0; }' > sub/subsub/dist.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+mkdir build
+cd build
+../configure || Exit 77
+
+$MAKE -n cscope
+
+: ${CSCOPE=cscope}
+( $CSCOPE --version ) >/dev/null 2>&1 || Exit 77
+
+$MAKE cscope 2>stderr
+cat stderr >&2
+grep 'cannot find file' stderr && Exit 1
+
+test -f cscope.files
+$FGREP foo.c cscope.files
+$FGREP bar.cpp cscope.files
+$FGREP sub/subsub/dist.c cscope.files
+$FGREP sub/subsub/gen.c cscope.files
+
+cp cscope.files cscope.files1
+$MAKE cscope
+diff cscope.files cscope.files1
+
+$MAKE distclean
+test ! -f cscope.files
+test ! -f cscope.out
+test ! -f cscope.in.out
+test ! -f cscope.po.out
+
+
+`pwd`/../configure || Exit 77
+
+$MAKE cscope 2>stderr
+cat stderr >&2
+grep 'cannot find file' stderr && Exit 1
+$MAKE distclean
+
+cd ..
+./configure
+$MAKE distcheck
+
+:
diff --git a/tests/regex.test b/tests/cscope2.test
similarity index 73%
copy from tests/regex.test
copy to tests/cscope2.test
index babd92a..801457f 100755
--- a/tests/regex.test
+++ b/tests/cscope2.test
@@ -1,9 +1,9 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2009  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# the Free Software Foundation; either version 3, or (at your option)
 # any later version.
 #
 # This program is distributed in the hope that it will be useful,
@@ -14,17 +14,23 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure AM_WITH_REGEX compiles and runs.
+# The `cscope' target should not fail if there are no sources.
 
+required=
 . ./defs || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
-AM_WITH_REGEX
+AC_OUTPUT
 END
+: >Makefile.am
 
 $ACLOCAL
 $AUTOCONF
+$AUTOMAKE
+
 ./configure
-./configure --without-regex
+$MAKE cscope
+
+:
diff --git a/tests/parallel-tests10.test b/tests/cscope3.test
similarity index 65%
copy from tests/parallel-tests10.test
copy to tests/cscope3.test
index 2642c7a..04e85c3 100755
--- a/tests/parallel-tests10.test
+++ b/tests/cscope3.test
@@ -3,7 +3,7 @@
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# the Free Software Foundation; either version 3, or (at your option)
 # any later version.
 #
 # This program is distributed in the hope that it will be useful,
@@ -14,34 +14,28 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check parallel-tests features:
-# - trailing whitespace in TESTS
-# GNU make 3.80 may expand trailing white space to `.log'.
+# The `cscope' target should not fail if there are no sources in a subdir.
+# In practice this means `cscope' should not be invoked if cscope.files
+# is empty.
+
+required=cscope
+. ./defs || Exit 1
 
-. ./defs-p || Exit 1
 set -e
 
 cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
-
-cat > Makefile.am << 'END'
-TESTS = foo $(BAR)
-BAR =
-END
-
-cat >foo <<'END'
-#! /bin/sh
-exit 0
-END
-
-chmod +x ./foo
+mkdir sub
+echo 'SUBDIRS = sub' >Makefile.am
+: >sub/Makefile.am
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+$AUTOMAKE
 
 ./configure
-$MAKE check
+$MAKE cscope
 
-Exit 0
+:


hooks/post-receive
-- 
GNU Automake




reply via email to

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