summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-01-08 23:29:26 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-01-08 23:29:26 -0800
commit84bbb1add53329f6059958a9609240aed336258c (patch)
tree2f2f464c03ac78ece67172df37222d017a1d5916
parente2900ac7f7c81e849dc59b2f60917668577e2837 (diff)
downloademacs-84bbb1add53329f6059958a9609240aed336258c.tar.gz
Use gnulib's getopt-gnu module.
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.in4
-rw-r--r--configure.in9
-rw-r--r--lib-src/Makefile.in42
-rwxr-xr-xmake-dist4
5 files changed, 25 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index 7680a11e6bd..38705ca334b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-01-09 Paul Eggert <eggert@cs.ucla.edu>
+ Use gnulib's getopt-gnu module.
+ * Makefile.in (GNULIB_MODULES): Add getopt-gnu.
+ (AUTOCONF_INPUTS): Remove getopt.m4; aclocal.m4 is a good-enough
+ representative of the dependencies.
+ * configure.in: Do not configure getopt, as gnulib does that now.
+ * make-dist: Do not worry about lib-src/getopt.h, as gnulib handles
+ getopt now, in lib.
+
Regenerate.
* arg-nonnull.h, c++defs.h, lib/mktime-internal.h, lib/mktime.c:
* lib/stddef.in.h, lib/time.h, lib/time.in.h, lib/time_r.c:
diff --git a/Makefile.in b/Makefile.in
index b4cc82c7089..439c3736a4e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -330,7 +330,7 @@ $(gnulib_srcdir):
# Update modules from gnulib, for maintainers, who should have it in
# $(gnulib_srcdir) (relative to $(srcdir) and should have build tools
# as per $(gnulib_srcdir)/DEPENDENCIES.
-GNULIB_MODULES = ftoastr mktime
+GNULIB_MODULES = ftoastr getopt-gnu mktime
GNULIB_TOOL_FLAGS = \
--import --no-changelog --no-vc-files --makefile-name=gnulib.mk
sync-from-gnulib: $(gnulib_srcdir)
@@ -401,7 +401,7 @@ Makefile: config.status $(srcdir)/src/config.in \
config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
./config.status --recheck
-AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/m4/getopt.m4 $(srcdir)/aclocal.m4
+AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/aclocal.m4
$(srcdir)/configure: $(AUTOCONF_INPUTS)
cd ${srcdir} && autoconf
diff --git a/configure.in b/configure.in
index 5ef67ce0e57..024d520315c 100644
--- a/configure.in
+++ b/configure.in
@@ -2657,15 +2657,6 @@ AC_FUNC_GETLOADAVG
AC_FUNC_FSEEKO
-# Configure getopt.
-m4_include([m4/getopt.m4])
-gl_GETOPT_IFELSE([
- gl_GETOPT_SUBSTITUTE_HEADER
- gl_PREREQ_GETOPT
- GETOPTOBJS='getopt.o getopt1.o'
-])
-AC_SUBST(GETOPTOBJS)
-
AC_FUNC_GETPGRP
# Configure gnulib.
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index fc404c5ae63..a689abdd31a 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -279,7 +279,7 @@ uninstall:
fi
mostlyclean:
- -rm -f core *.o getopt.h getopt.h-t
+ -rm -f core *.o
clean: mostlyclean
-rm -f ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL}
@@ -311,20 +311,6 @@ test-distrib${EXEEXT}: ${srcdir}/test-distrib.c
$(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c
./test-distrib ${srcdir}/testfile
-## We need the following in order to create a <getopt.h> when the system
-## does not have one that works with the given compiler.
-GETOPT_H = @GETOPT_H@
-getopt.h: getopt_.h
- cp $(srcdir)/getopt_.h $@-t
- mv $@-t $@
-
-GETOPTOBJS = @GETOPTOBJS@
-GETOPTDEPS = $(GETOPTOBJS) $(GETOPT_H)
-getopt.o: ${srcdir}/getopt.c $(GETOPT_H) ${srcdir}/gettext.h
- ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c
-getopt1.o: ${srcdir}/getopt1.c $(GETOPT_H)
- ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c
-
../lib/libgnu.a: ../src/config.h
cd ../lib && $(MAKE) libgnu.a
@@ -335,20 +321,20 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h
${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
${srcdir}/../src/regex.c
-etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h
+etags${EXEEXT}: ${srcdir}/etags.c $(REGEXPDEPS) ../src/config.h
$(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \
- -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) \
+ -DVERSION="\"${version}\"" ${srcdir}/etags.c \
$(REGEXPOBJ) $(LOADLIBES) -o etags
-ebrowse${EXEEXT}: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h
+ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ../src/config.h
$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \
- ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse
+ ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse
## 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 $(GETOPTOBJS) \
+ -DVERSION="\"${version}\"" ${srcdir}/etags.c \
$(REGEXPOBJ) $(LOADLIBES) -o ctags
profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h
@@ -358,11 +344,11 @@ make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h
$(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \
-o make-docfile
-movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS)
+movemail${EXEEXT}: movemail.o pop.o
$(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o \
- $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail
+ $(LOADLIBES) $(LIBS_MOVE) -o movemail
-movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H)
+movemail.o: ${srcdir}/movemail.c ../src/config.h
$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c
pop.o: ${srcdir}/pop.c ../src/config.h
@@ -371,19 +357,19 @@ pop.o: ${srcdir}/pop.c ../src/config.h
fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h
$(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail
-emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS)
- $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \
+emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h
+ $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \
-DVERSION="\"${version}\"" \
$(LOADLIBES) -o emacsclient
hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h
$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
-update-game-score${EXEEXT}: update-game-score.o $(GETOPTDEPS)
- $(CC) ${LINK_CFLAGS} update-game-score.o $(GETOPTOBJS) \
+update-game-score${EXEEXT}: update-game-score.o
+ $(CC) ${LINK_CFLAGS} update-game-score.o \
$(LOADLIBES) -o update-game-score
-update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h $(GETOPT_H)
+update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h
$(CC) -c ${CPP_CFLAGS} ${srcdir}/update-game-score.c \
-DHAVE_SHARED_GAME_DIR="\"$(gamedir)\""
diff --git a/make-dist b/make-dist
index 4227439c919..5c97628b5a5 100755
--- a/make-dist
+++ b/make-dist
@@ -384,9 +384,7 @@ echo "Making links to \`lib-src'"
ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src
ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src
ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src
- ln makefile.w32-in ../${tempdir}/lib-src
- cd ../${tempdir}/lib-src
- rm -f getopt.h)
+ ln makefile.w32-in ../${tempdir}/lib-src)
echo "Making links to \`m4'"
(cd m4