[PATCH] make tags / make ctags broken

Florian Schlichting fschlich at CIS.FU-Berlin.DE
Thu Jul 1 17:20:06 UTC 2010


On Wed, Jun 30, 2010 at 10:17:43AM -0700, Russ Allbery wrote:
> I suspect you're the first person to run that command in a while, so if
> there's now a better way that doesn't require Makefile infrastructure, I
> vote for just removing it.

this is my suggestion on how to do this. Note that my patch also removes
the etags target (only in the toplevel makefile), which is probably
still functional and thus not really necessary...

Florian


---
remove broken tags / ctags make targets

These targets have been broken for some time and wouldn't work with GNU
ctags anyway. Just do 'ctags -R' in the toplevel source directory and
put 'set tags=./tags,tags,/path/to/source/tags' in your .vimrc if you
want to use tags.
---
 Makefile            |    9 +++------
 Makefile.global.in  |    1 -
 authprogs/Makefile  |    3 ---
 backends/Makefile   |    8 +-------
 doc/Makefile        |    1 -
 doc/man/Makefile    |    1 -
 doc/pod/hacking.pod |    9 ++++-----
 expire/Makefile     |    8 +-------
 frontends/Makefile  |    8 +-------
 history/Makefile    |    3 ---
 include/Makefile    |    2 +-
 innd/Makefile       |    8 +-------
 innfeed/Makefile    |    5 +----
 lib/Makefile        |    3 ---
 nnrpd/Makefile      |    8 +-------
 site/Makefile       |    5 +----
 storage/Makefile    |    3 ---
 17 files changed, 15 insertions(+), 70 deletions(-)

diff --git a/Makefile b/Makefile
index ac05c9e..1dd0ceb 100644
--- a/Makefile
+++ b/Makefile
@@ -157,7 +157,7 @@ clobber realclean distclean:
 	    cd $$D && $(MAKE) $(FLAGS) distclean || exit 1 ; cd .. ; \
 	done
 	@echo ''
-	rm -f LIST.* Makefile.global TAGS tags config.cache config.log
+	rm -f LIST.* Makefile.global config.cache config.log
 	rm -f config.status libtool support/fixconfig support/fixscript
 	rm -f config.status.lineno configure.lineno
 
@@ -170,22 +170,19 @@ maintclean:
 	    cd $$D && $(MAKE) $(FLAGS) maintclean || exit 1 ; cd .. ; \
 	done
 	@echo ''
-	rm -f LIST.* Makefile.global TAGS tags config.cache config.log
+	rm -f LIST.* Makefile.global config.cache config.log
 	rm -f config.status libtool support/fixconfig support/fixscript
 	rm -f config.status.lineno configure.lineno
 	rm -f CHANGES ChangeLog inn*.tar.gz configure include/config.h.in
 	rm -rf $(TARDIR)
 
 ##  Other generic targets.
-bootstrap depend tags ctags profiled:
+bootstrap depend profiled:
 	@for D in $(ALLDIRS) ; do \
 	    echo '' ; \
 	    cd $$D && $(MAKE) $@ || exit 1 ; cd .. ; \
 	done
 
-TAGS etags:
-	etags */*.c */*.h */*/*.c */*/*.h
-
 
 ##  Run the test suite.
 check test tests:
diff --git a/Makefile.global.in b/Makefile.global.in
index 3b24629..5666885 100644
--- a/Makefile.global.in
+++ b/Makefile.global.in
@@ -187,7 +187,6 @@ LIBOBJS		= @LIBOBJS@
 AWK		= @AWK@
 BZIP2		= @BZIP2@
 COMPRESS	= @COMPRESS@
-CTAGS		= ctags -t -w
 GZIP		= @GZIP@
 LEX		= @LEX@
 LN_S		= @LN_S@
diff --git a/authprogs/Makefile b/authprogs/Makefile
index 01bc4d2..0760c92 100644
--- a/authprogs/Makefile
+++ b/authprogs/Makefile
@@ -33,9 +33,6 @@ clean clobber distclean maintclean:
 	rm -f *.o $(ALL)
 	rm -rf .libs
 
-tags ctags: $(SOURCES)
-	$(CTAGS) $(SOURCES) ../lib/*.c ../include/*.h
-
 profiled:
 	$(MAKEPROFILING) all
 
diff --git a/backends/Makefile b/backends/Makefile
index f49c74f..e49c9a6 100644
--- a/backends/Makefile
+++ b/backends/Makefile
@@ -53,19 +53,13 @@ install-root:
 
 bootstrap: $(MAN)
 
-clean:
+clean clobber distclean:
 	rm -f *.o $(ALL)
 	rm -rf .libs
 
-clobber distclean: clean
-	rm -f tags
-
 maintclean: distclean
 	rm -f $(MAN)
 
-tags ctags: $(SOURCES)
-	$(CTAGS) $(SOURCES)
-
 profiled:
 	$(MAKEPROFILING) all
 
diff --git a/doc/Makefile b/doc/Makefile
index 8f86486..d4dc546 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -19,7 +19,6 @@ DIRS = pod man
 all:
 	cd pod && $(MAKE) all || exit 1 ; cd ..
 
-tags ctags:
 profiled:
 depend:
 
diff --git a/doc/man/Makefile b/doc/man/Makefile
index 1017701..720b0a7 100644
--- a/doc/man/Makefile
+++ b/doc/man/Makefile
@@ -34,7 +34,6 @@ SEC8	= actsync.8 archive.8 batcher.8 buffchan.8 ckpasswd.8 \
 
 all:
 clobber clean distclean:
-tags ctags:
 profiled:
 
 install: install-man1 install-man3 install-man3pm install-man5 install-man8
diff --git a/doc/pod/hacking.pod b/doc/pod/hacking.pod
index c3e4bb6..bb19418 100644
--- a/doc/pod/hacking.pod
+++ b/doc/pod/hacking.pod
@@ -280,11 +280,10 @@ There are also variables set for each of the installation directories that
 INN uses, for use in building the list of installed paths to files.
 
 Each subdirectory makefile should have the targets C<all> (the default),
-C<clean>, C<clobber>/C<distclean>, C<install>, C<tags>, and C<profiled>.
-The C<tags> target generates B<vi> tags files, and the C<profiled> target
-generates a profiling version of the programs (although this hasn't been
-tested much).  These rules should be present and empty in those
-directories where they don't apply.
+C<clean>, C<clobber>/C<distclean>, C<install>, and C<profiled>.  The
+C<profiled> target generates a profiling version of the programs (although
+this hasn't been tested much).  These rules should be present and empty in
+those directories where they don't apply.
 
 Be sure to test compiling with both static and dynamic libraries and make
 sure that all the libtool support works correctly.  All linking steps, and
diff --git a/expire/Makefile b/expire/Makefile
index 5785b72..ba9ad6e 100644
--- a/expire/Makefile
+++ b/expire/Makefile
@@ -27,17 +27,11 @@ install: all
 
 bootstrap:
 
-clean:
+clean clobber distclean maintclean:
 	rm -f *.o $(ALL)
 	rm -f profiled expirep
 	rm -rf .libs
 
-clobber distclean maintclean: clean
-	rm -f tags
-
-tags ctags: $(SOURCES)
-	$(CTAGS) $(SOURCES)
-
 
 ##  Compilation rules.
 
diff --git a/frontends/Makefile b/frontends/Makefile
index 9b7e94d..bc7f0f1 100644
--- a/frontends/Makefile
+++ b/frontends/Makefile
@@ -44,19 +44,13 @@ install: all
 
 bootstrap: $(MAN)
 
-clean:
+clean clobber distclean:
 	rm -f *.o $(ALL)
 	rm -rf .libs
 
-clobber distclean: clean
-	rm -f tags
-
 maintclean: distclean
 	rm -f $(MAN)
 
-tags ctags: $(SOURCES)
-	$(CTAGS) $(SOURCES)
-
 profiled:
 	$(MAKEPROFILING) all
 
diff --git a/history/Makefile b/history/Makefile
index 70263f2..b09c12d 100644
--- a/history/Makefile
+++ b/history/Makefile
@@ -38,9 +38,6 @@ clean clobber distclean:
 maintclean: distclean
 	rm -f Make.methods hismethods.c hismethods.h
 
-tags ctags: $(SOURCES)
-	$(CTAGS) $(SOURCES) ../include/*.h
-
 $(FIXSCRIPT):
 	@echo Run configure before running make.  See INSTALL for details.
 	@exit 1
diff --git a/include/Makefile b/include/Makefile
index 82ed7dd..5a53eab 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -24,7 +24,7 @@ clean:
 clobber distclean maintclean: clean
 	rm -f $(EXTRA)
 
-depend tags ctags:
+depend:
 
 profiled: all
 
diff --git a/innd/Makefile b/innd/Makefile
index f41d7c1..09c1cd3 100644
--- a/innd/Makefile
+++ b/innd/Makefile
@@ -26,16 +26,10 @@ install: all
 
 bootstrap:
 
-clean:
+clean clobber distclean maintclean:
 	rm -f *.o $(ALL) inndp
 	rm -rf .libs
 
-clobber distclean maintclean: clean
-	rm -f tags
-
-tags ctags: $(SOURCES) $(EXTRASOURCES)
-	$(CTAGS) $(SOURCES) $(EXTRASOURCES) ../lib/*.c innd.h ../include/*.h
-
 
 ##  Compilation rules.
 
diff --git a/innfeed/Makefile b/innfeed/Makefile
index 68d96fd..ea7b29d 100644
--- a/innfeed/Makefile
+++ b/innfeed/Makefile
@@ -37,14 +37,11 @@ clean:
 	rm -rf .libs
 
 clobber distclean: clean 
-	rm -f tags y.tab.c y.tab.h lex.yy.c
+	rm -f y.tab.c y.tab.h lex.yy.c
 
 maintclean: distclean
 	rm -f config_l.c config_y.c config_y.h
 
-tags: $(SOURCES) $(INCLUDES)
-	$(CTAGS) $(SOURCES) $(INCLUDES)
-
 $(FIXSCRIPT):
 	@echo Run configure before running make.  See INSTALL for details.
 	@exit 1
diff --git a/lib/Makefile b/lib/Makefile
index 2dd2fd6..a9d59ca 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -45,9 +45,6 @@ clean clobber distclean maintclean:
 	rm -f libinn_pure_*.a .pure
 	rm -rf .libs
 
-tags ctags: $(SOURCES)
-	$(CTAGS) $(SOURCES) ../include/*.h
-
 libinn.la: $(OBJECTS) $(LOBJECTS)
 	$(LIBLD) $(LDFLAGS) -o $@ $(LOBJECTS) $(LIBS) \
 	    -rpath $(PATHLIB) -version-info 2:0:0
diff --git a/nnrpd/Makefile b/nnrpd/Makefile
index cedad0e..c4b677d 100644
--- a/nnrpd/Makefile
+++ b/nnrpd/Makefile
@@ -25,16 +25,10 @@ install: all
 
 bootstrap:
 
-clean:
+clean clobber distclean maintclean:
 	rm -f *.o $(ALL) nnrpdp profiled
 	rm -rf .libs
 
-clobber distclean maintclean: clean
-	rm -f tags
-
-tags ctags: $(SOURCES) $(INCLUDES)
-	$(CTAGS) $(SOURCES) $(INCLUDES) ../lib/*.c ../include/*.h
-
 
 ##  Compilation rules.
 
diff --git a/site/Makefile b/site/Makefile
index 3ba8b83..5545025 100644
--- a/site/Makefile
+++ b/site/Makefile
@@ -159,10 +159,7 @@ clean:
 	done
 
 clobber distclean maintclean:
-	rm -f $(ALL) tags profiled config update
-
-tags ctags:
-	cp /dev/null tags
+	rm -f $(ALL) profiled config update
 
 profiled:
 	cp /dev/null profiled
diff --git a/storage/Makefile b/storage/Makefile
index f2904b4..f9b167b 100644
--- a/storage/Makefile
+++ b/storage/Makefile
@@ -42,9 +42,6 @@ clean clobber distclean:
 maintclean: distclean
 	rm -f Make.methods methods.c methods.h ovmethods.c ovmethods.h
 
-tags ctags: $(SOURCES)
-	$(CTAGS) $(SOURCES) ../include/*.h ../include/inn/*.h
-
 $(FIXSCRIPT):
 	@echo Run configure before running make.  See INSTALL for details.
 	@exit 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5557 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/inn-workers/attachments/20100701/d62a242e/attachment.bin>


More information about the inn-workers mailing list