]> code.delx.au - gnu-emacs/commitdiff
Support TAGS targets in the w32 build.
authorEli Zaretskii <eliz@gnu.org>
Fri, 1 Oct 2010 11:45:16 +0000 (13:45 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 1 Oct 2010 11:45:16 +0000 (13:45 +0200)
 nt/makefile.w32-in (frc, TAGS, TAGS-gmake, TAGS-nmake): New targets.
 emacs-src.tags: New file.
 src/makefile.w32-in (TAGS, frc, TAGS-LISP, ../nt/TAGS, tags)
 (TAGS-gmake, TAGS-nmake, TAGS-LISP-gmake, TAGS-LISP-nmake)
 (nt-TAGS-gmake, nt-TAGS-nmake): New targets.
 lisp/makefile.w32-in (DEST, TAGS, TAGS-LISP, TAGS-nmake)
 (TAGS-LISP-nmake, TAGS-gmake, TAGS-LISP-gmake, TAGS-SH)
 (TAGS-LISP-SH, TAGS-CMD, TAGS-LISP-CMD): New targets.
 lib-src/makefile.w32-in (tags, TAGS): New targets.

lib-src/ChangeLog
lib-src/makefile.w32-in
lisp/ChangeLog
lisp/makefile.w32-in
nt/ChangeLog
nt/emacs-src.tags [new file with mode: 0644]
nt/makefile.w32-in
src/ChangeLog
src/makefile.w32-in

index 33036c92ffd5e800694d08958317eb3870511e05..3d8a022229677a01c253cd6f95d1054884121632 100644 (file)
@@ -1,3 +1,7 @@
+2010-10-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * makefile.w32-in (tags, TAGS): New targets.
+
 2010-09-30  Juanma Barranquero  <lekktu@gmail.com>
 
        * emacsclient.c (get_server_config): Don't read Emacs pid from
index 552dd1349fc652561a612c89693af6ccd2ebca4e..6d881dbc174c33c6b56a071d79138bfb613fe258 100644 (file)
@@ -378,6 +378,12 @@ cleanall:  clean
 getopt.h:              getopt_.h
                        $(CP) $(ALL_DEPS) $@
 
+### TAGS ###
+
+tags: TAGS
+TAGS: $(BLD)/etags.exe *.c *.h
+       $(BLD)/etags.exe *.c *.h
+
 ### DEPENDENCIES ###
 
 EMACS_ROOT     = ..
index d145ebcf0c7adf77ccb16789e60d497850a57b85..fb364f9651ea867f05d86a4b9e70703fc7444856 100644 (file)
@@ -1,3 +1,9 @@
+2010-10-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * makefile.w32-in (DEST, TAGS, TAGS-LISP, TAGS-nmake)
+       (TAGS-LISP-nmake, TAGS-gmake, TAGS-LISP-gmake, TAGS-SH)
+       (TAGS-LISP-SH, TAGS-CMD, TAGS-LISP-CMD): New targets.
+
 2010-10-01  Glenn Morris  <rgm@gnu.org>
 
        * obsolete/sc.el: Remove file.
index 43328a9e46a5c66edfb667c8223cbefbcb19cf4d..cd76ffa290a3752967ee2aa2d36b6215582c2f95 100644 (file)
@@ -50,7 +50,11 @@ LC_ALL = C
 
 lisptagsfiles1 = $(lisp)/*.el
 lisptagsfiles2 = $(lisp)/*/*.el
-ETAGS = "../lib-src/$(BLD)/etags"
+lisptagsfiles3 = $(lisp)/*/*/*.el
+lisptagsfiles4 = $(lisp)/*/*/*/*.el
+ETAGS = "../lib-src/$(BLD)/etags.exe"
+## $(DEST) is overridden by ../src/makefile.w32-in.
+DEST=$(lisp)
 
 # Automatically generated autoload files, apart from lisp/loaddefs.el.
 LOADDEFS = $(lisp)/calendar/cal-loaddefs.el \
@@ -244,11 +248,42 @@ cvs-update: bzr-update
 update-authors:
        $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
 
-TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
-       $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
+TAGS: TAGS-$(MAKETYPE)
 
-TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
-       $(ETAGS) -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2)
+TAGS-LISP: TAGS-LISP-$(MAKETYPE)
+
+TAGS-nmake:
+       echo This target is not supported with NMake
+       exit -1
+
+TAGS-LISP-nmake:
+       echo This target is not supported with NMake
+       exit -1
+
+TAGS-gmake: TAGS-$(SHELLTYPE)
+
+TAGS-LISP-gmake: TAGS-LISP-$(SHELLTYPE)
+
+TAGS-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
+       - $(DEL) TAGS
+       for dir in . $(WINS_UPDATES); do \
+         $(ETAGS) -a $(lisp)/$$dir/*.el; \
+       done
+
+TAGS-LISP-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
+       - $(DEL) $(DEST)/TAGS-LISP
+       for dir in . $(WINS_UPDATES); do \
+         $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/$$dir/*.el; \
+       done
+
+TAGS-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
+       - $(DEL) TAGS
+       for %%d in (. $(WINS_UPDATES)) do $(ETAGS) -a $(lisp)/%%d/*.el
+
+TAGS-LISP-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
+       - $(DEL) $(DEST)/TAGS-LISP
+       for %%d in (. $(WINS_UPDATES)) do \
+         $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/%%d/*.el
 
 .SUFFIXES: .elc .el
 
index 25c274c4f9a88cc95c286511eda1e4ebfe3fc55d..71097e32181095ff7cf8d50652dbdbc4b5236d53 100644 (file)
@@ -1,5 +1,7 @@
 2010-10-01  Eli Zaretskii  <eliz@gnu.org>
 
+       * makefile.w32-in (frc, TAGS, TAGS-gmake, TAGS-nmake): New targets.
+
        * gmake.defs: Add a comment with a single quote to fix
        fontification.  (Bug#7102)
 
diff --git a/nt/emacs-src.tags b/nt/emacs-src.tags
new file mode 100644 (file)
index 0000000..8c18713
--- /dev/null
@@ -0,0 +1,6 @@
+  This file defines the regular expressions for etags to look for
+  in the src directory.  It is used by the w32 build to work around
+  the annoyances of quoting command-line arguments with various
+  w32 shell.
+
+/[     ]*DEFVAR_[A-Z_  (]+"\([^"]+\)"/
index b0f5edb28a21c24190fe9b9fd7ec9c0bb36dc0fd..f328cd6a9f9f4861d9b2ce25d6910eebcb812372 100644 (file)
@@ -417,3 +417,16 @@ maintainer-clean-other-dirs-gmake:
 \r
 realclean: cleanall\r
        - $(DEL_TREE) ../bin\r
+\r
+TAGS: TAGS-$(MAKETYPE)\r
+\r
+frc:\r
+TAGS-gmake: frc\r
+       ../lib-src/$(BLD)/etags $(CURDIR)/*.c\r
+       $(MAKE) $(MFLAGS) -C ../src TAGS TAGS-LISP\r
+       $(MAKE) $(MFLAGS) -C ../lib-src TAGS\r
+\r
+TAGS-nmake:\r
+       echo This target is not supported with NMake\r
+\r
+.PHONY: frc\r
index 05d7d4336ae252a1199c3bbee1b1563dfc9512d8..1d337527effb9e86613ad8c7c2e3b6a14de99239 100644 (file)
@@ -1,3 +1,9 @@
+2010-10-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * makefile.w32-in (TAGS, frc, TAGS-LISP, ../nt/TAGS, tags)
+       (TAGS-gmake, TAGS-nmake, TAGS-LISP-gmake, TAGS-LISP-nmake)
+       (nt-TAGS-gmake, nt-TAGS-nmake): New targets.
+
 2010-09-30  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * xml.c (parse_string): Use const.
index 752a3c211b37623f4b8e8a863fb5734df7719baf..daa6ed521988aaf9bcbe72f596561591874f563c 100644 (file)
@@ -293,6 +293,51 @@ cleanall:  clean
        - $(DEL_TREE) oo
        - $(DEL_TREE) oo-spd
 
+## Arrange to make a tags table TAGS-LISP for ../lisp,
+## plus TAGS for the C files, which includes ../lisp/TAGS by reference.
+##
+## This works only with GNU Make.
+
+TAGS: $(OBJ0) $(OBJ1) $(WIN32OBJ)
+       $(MAKE) $(MFLAGS) TAGS-$(MAKETYPE)
+
+TAGS-LISP: $(OBJ0) $(OBJ1) $(WIN32OBJ)
+       $(MAKE) $(MFLAGS) TAGS-LISP-$(MAKETYPE)
+
+TAGS-gmake:
+       ../lib-src/$(BLD)/etags.exe --include=TAGS-LISP --include=../nt/TAGS \
+         --regex=@../nt/emacs-src.tags \
+         $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ0))
+       ../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \
+         $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(OBJ1))
+       ../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \
+         $(patsubst $(BLD)%.$(O),$(CURDIR)%.c,$(WIN32OBJ)) $(CURDIR)/*.h
+
+TAGS-nmake:
+       echo This target is not supported with NMake
+       exit -1
+
+frc:
+TAGS-LISP-gmake: frc
+       $(MAKE) $(MFLAGS) -C ../lisp TAGS-LISP DEST=../src
+
+TAGS-LISP-nmake:
+       echo This target is not supported with NMake
+       exit -1
+
+../nt/TAGS: frc
+       $(MAKE) $(MFLAGS) nt-TAGS-$(MAKETYPE)
+
+nt-TAGS-gmake:
+       $(MAKE) $(MFLAGS) -C ../nt TAGS
+
+nt-TAGS-nmake:
+       echo This target is not supported with NMake
+       exit -1
+
+tags: TAGS TAGS-LISP ../nt/TAGS
+.PHONY: tags
+
 ### DEPENDENCIES ###
 
 EMACS_ROOT = ..