From b553d81d145477ad07e3eb264fc1748d8da1a33d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 13 Feb 1998 06:04:23 +0000 Subject: [PATCH] uniquify files passed to etags --- ChangeLog | 2 ++ Makefile.in | 22 +++++++++++++++------- lib/am/tags.am | 11 ++++++++--- m4/Makefile.in | 2 +- tags.am | 11 ++++++++--- tests/Makefile.in | 2 +- 6 files changed, 35 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index abeef993..6e5ebc2e 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 39233a40..c02a0111 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 ab23dbc2..1777fa2c 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 ba4bc06d..77c5a75e 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 ab23dbc2..1777fa2c 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 5ddf8b74..d28c408a 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. -- 2.43.5