diff options
author | Glenn Morris <[email protected]> | 2014-03-22 16:08:41 -0700 |
---|---|---|
committer | Glenn Morris <[email protected]> | 2014-03-22 16:08:41 -0700 |
commit | 10211d43fa7eddfd644f8f95650a691989611e8c (patch) | |
tree | 6e7bb047b65609e640c6b294964c7d4123b60958 /lib-src | |
parent | df199e5601dd89b94643946a3edcdabfafc53913 (diff) |
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.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog | 3 | ||||
-rw-r--r-- | lib-src/Makefile.in | 25 |
2 files changed, 17 insertions, 11 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 3472f54b0a..85c4b90d9f 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,8 @@ 2014-03-22 Glenn Morris <[email protected]> + * 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}) diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 7f22ee7260..91d13231f3 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -309,23 +309,26 @@ TAGS: etags${EXEEXT} 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 $@ |