summaryrefslogtreecommitdiff
path: root/lib/Makefile.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-08-05 18:41:20 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-08-05 19:36:09 -0700
commitd904cc83f3036db96107a3976cee1a0112547de6 (patch)
tree7186eee577f0112462a024368c014819c4055152 /lib/Makefile.in
parente5652268a993ad9117f7253553c143d60460eb8f (diff)
downloademacs-d904cc83f3036db96107a3976cee1a0112547de6.tar.gz
Use Gnulib regex for lib-src
Emacs regular expressions forked from everyone else long ago. This makes it official and should allow simplification later. etags.c now uses the glibc regex API, falling back on a Gnulib-supplied substitute lib/regex.c if necessary. Emacs proper now uses its own regular expression module. Although this patch may look dauntingly large, most of it was generated automatically by admin/merge-gnulib and contains an exact copy of the glibc regex source, and the by-hand changes do not grow the Emacs source code. * admin/merge-gnulib (GNULIB_MODULES): Add regex. (AVOIDED_MODULES): Add btowc, langinfo, lock, mbrtowc, mbsinit, nl_langinfo, wchar, wcrtomb, wctype-h. * lib-src/Makefile.in (regex-emacs.o): Remove; Gnulib does it now. (etags_deps, etags_libs): Remove regex-emacs.o. * lib-src/etags.c: Go back to including regex.h. (add_regex): Use unsigned char translation array, since glibc regex requires that. * lib/Makefile.in (not_emacs_OBJECTS, for_emacs_OBJECTS): New macros. (libegnu_a_OBJECTS): Use them, to avoid building e-regex.o. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/regcomp.c, lib/regex.c, lib/regex.h, lib/regex_internal.c: * lib/regex_internal.h, lib/regexec.c, m4/builtin-expect.m4: * m4/eealloc.m4, m4/glibc21.m4, m4/mbstate_t.m4, m4/regex.m4: New files, copied from Gnulib. * src/regex-emacs.h, src/conf_post.h: (RE_TRANSLATE_TYPE, RE_TRANSLATE, RE_TRANSLATE_P): Move from src/conf_post.h to src/regex-emacs.h, so that they don’t interfere with compiling lib/regex.c.
Diffstat (limited to 'lib/Makefile.in')
-rw-r--r--lib/Makefile.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 201f4b53836..b26db27423d 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -79,9 +79,15 @@ endif
Makefile: ../config.status $(srcdir)/Makefile.in
$(MAKE) -C .. src/$@
+# Object modules that need not be built for Emacs.
+# Emacs does not need e-regex.o (it has its own regex-emacs.c),
+# and building it would just waste time.
+not_emacs_OBJECTS = regex.o
+
libgnu_a_OBJECTS = $(gl_LIBOBJS) \
$(patsubst %.c,%.o,$(filter %.c,$(libgnu_a_SOURCES)))
-libegnu_a_OBJECTS = $(patsubst %.o,e-%.o,$(libgnu_a_OBJECTS))
+for_emacs_OBJECTS = $(filter-out $(not_emacs_OBJECTS),$(libgnu_a_OBJECTS))
+libegnu_a_OBJECTS = $(patsubst %.o,e-%.o,$(for_emacs_OBJECTS))
$(libegnu_a_OBJECTS) $(libgnu_a_OBJECTS): $(BUILT_SOURCES)