From: Tom Tromey Date: Fri, 13 Feb 1998 06:04:25 +0000 (+0000) Subject: uniquify files passed to etags X-Git-Tag: v1.10.2~2996 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a3ef5dd03c98ff40df3c87dcc7e4f01efe80ad3;p=platform%2Fupstream%2Fautomake.git uniquify files passed to etags --- diff --git a/ChangeLog b/ChangeLog index abeef99..6e5ebc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ Thu Feb 12 22:27:05 1998 Tom Tromey + * tags.am (TAGS): Uniquify list of files. From Harlan Stenn. + * aclocal.in (scan_m4_files): Reverse-sort keys when constructing `search' function. From Johan Danielsson. diff --git a/Makefile.in b/Makefile.in index 39233a4..c02a011 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,6 @@ # Makefile.in generated automatically by automake 1.2d from Makefile.am -# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -100,10 +100,10 @@ TEXINFOS = automake.texi DATA = $(pkgdata_DATA) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ -Makefile.in NEWS THANKS TODO aclocal.in aclocal.m4 ansi2knr.1 \ -ansi2knr.c automake.in config.guess config.sub configure configure.in \ -elisp-comp install-sh mdate-sh missing mkinstalldirs stamp-vti \ -texinfo.tex version.texi ylwrap +Makefile.in NEWS README-alpha THANKS TODO aclocal.in aclocal.m4 \ +ansi2knr.1 ansi2knr.c automake.in config.guess config.sub configure \ +configure.in elisp-comp install-sh mdate-sh missing mkinstalldirs \ +stamp-vti texinfo.tex version.texi ylwrap DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) @@ -360,8 +360,12 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) list='$(SUBDIRS)'; for subdir in $$list; do \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ done; \ - test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$i] = 1; } \ + END { for (i in files) print $$i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: @@ -405,6 +409,10 @@ dist-all: distdir GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) distdir: $(DISTFILES) + @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \ + echo "NEWS not updated; not releasing" 1>&2; \ + exit 1; \ + fi -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) diff --git a/lib/am/tags.am b/lib/am/tags.am index ab23dbc..1777fa2 100644 --- a/lib/am/tags.am +++ b/lib/am/tags.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995, 1996, 1997, 1998 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 @@ -27,6 +27,11 @@ TAGS: @DIRS@ $(HEADERS) $(SOURCES) @CONFIG@ $(TAGS_DEPENDENCIES) $(LISP) SUBDIRS list='$(SUBDIRS)'; for subdir in $$list; do \ SUBDIRS test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ SUBDIRS done; \ +## Make sure the list of sources is unique. + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ ## Make sure we have something to run etags on. - test -z "$(ETAGS_ARGS)@CONFIG@$(SOURCES)$(HEADERS)$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags @CONFIG@ $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS) + test -z "$(ETAGS_ARGS)@CONFIG@$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags @CONFIG@ $$unique $(LISP) -o $$here/TAGS) diff --git a/m4/Makefile.in b/m4/Makefile.in index ba4bc06..77c5a75 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -1,6 +1,6 @@ # Makefile.in generated automatically by automake 1.2d from Makefile.am -# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/tags.am b/tags.am index ab23dbc..1777fa2 100644 --- a/tags.am +++ b/tags.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995, 1996, 1997, 1998 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 @@ -27,6 +27,11 @@ TAGS: @DIRS@ $(HEADERS) $(SOURCES) @CONFIG@ $(TAGS_DEPENDENCIES) $(LISP) SUBDIRS list='$(SUBDIRS)'; for subdir in $$list; do \ SUBDIRS test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ SUBDIRS done; \ +## Make sure the list of sources is unique. + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ ## Make sure we have something to run etags on. - test -z "$(ETAGS_ARGS)@CONFIG@$(SOURCES)$(HEADERS)$(LISP)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags @CONFIG@ $(SOURCES) $(HEADERS) $(LISP) -o $$here/TAGS) + test -z "$(ETAGS_ARGS)@CONFIG@$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags @CONFIG@ $$unique $(LISP) -o $$here/TAGS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 5ddf8b7..d28c408 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,6 +1,6 @@ # Makefile.in generated automatically by automake 1.2d from Makefile.am -# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved.