emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116847: Reduce duplication in lib-src etags/ctags r


From: Glenn Morris
Subject: [Emacs-diffs] trunk r116847: Reduce duplication in lib-src etags/ctags rules
Date: Sat, 22 Mar 2014 23:08:47 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116847
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2014-03-22 16:08:41 -0700
message:
  Reduce duplication in lib-src etags/ctags rules
  
  * lib-src/Makefile.in (etags_deps, etags_args): New, to reduce duplication.
  (etags${EXEEXT}, ctags${EXEEXT}): Use etags_deps, etags_args.
modified:
  lib-src/ChangeLog              changelog-20091113204419-o5vbwnq5f7feedwu-1608
  lib-src/Makefile.in            makefile.in-20091113204419-o5vbwnq5f7feedwu-475
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2014-03-22 23:06:29 +0000
+++ b/lib-src/ChangeLog 2014-03-22 23:08:41 +0000
@@ -1,5 +1,8 @@
 2014-03-22  Glenn Morris  <address@hidden>
 
+       * Makefile.in (etags_deps, etags_args): New, to reduce duplication.
+       (etags${EXEEXT}, ctags${EXEEXT}): Use etags_deps, etags_args.
+
        * Makefile.in (etags${EXEEXT}, ebrowse${EXEEXT}, ctags${EXEEXT})
        (profile${EXEEXT}, make-docfile${EXEEXT}, movemail${EXEEXT})
        (emacsclient${EXEEXT}, emacsclientw${EXEEXT}, hexl${EXEEXT})

=== modified file 'lib-src/Makefile.in'
--- a/lib-src/Makefile.in       2014-03-22 23:06:29 +0000
+++ b/lib-src/Makefile.in       2014-03-22 23:08:41 +0000
@@ -309,23 +309,26 @@
 regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h)
        ${CC} -c ${CPP_CFLAGS} ${srcdir}/../src/regex.c
 
-etags${EXEEXT}: ${srcdir}/etags.c regex.o $(NTLIB) $(config_h)
-       $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \
-         -DVERSION="\"${version}\"" ${srcdir}/etags.c \
-         regex.o $(LOADLIBES) $(NTLIB) -o $@
+
+etags_deps = ${srcdir}/etags.c regex.o $(NTLIB) $(config_h)
+etags_args = -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" \
+       ${srcdir}/etags.c regex.o $(LOADLIBES) $(NTLIB) -o $@
+
+etags${EXEEXT}: ${etags_deps}
+       $(CC) ${ALL_CFLAGS} ${etags_args}
+
+## FIXME?
+## Can't we use a symlink ctags -> etags, and make etags check for argv[0]?
+## Or a wrapper script that calls etags --ctags?
+ctags${EXEEXT}: ${etags_deps}
+       $(CC) ${ALL_CFLAGS} -DCTAGS ${etags_args}
+
 
 ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(NTLIB) \
                    $(config_h)
        $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \
          ${srcdir}/ebrowse.c $(LOADLIBES) $(NTLIB) -o $@
 
-## We depend on etags to assure that parallel makes do not write two
-## etags.o files on top of each other.
-ctags${EXEEXT}: etags${EXEEXT}
-       $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \
-         -DVERSION="\"${version}\"" ${srcdir}/etags.c \
-         regex.o $(LOADLIBES) $(NTLIB) -o $@
-
 profile${EXEEXT}: ${srcdir}/profile.c $(NTLIB) $(config_h)
        $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \
          $(LOADLIBES) $(NTLIB) $(LIB_CLOCK_GETTIME) -o $@


reply via email to

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