diff options
| author | Paul Eggert | 2011-01-08 23:29:26 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-01-08 23:29:26 -0800 |
| commit | 84bbb1add53329f6059958a9609240aed336258c (patch) | |
| tree | 2f2f464c03ac78ece67172df37222d017a1d5916 | |
| parent | e2900ac7f7c81e849dc59b2f60917668577e2837 (diff) | |
| download | emacs-84bbb1add53329f6059958a9609240aed336258c.tar.gz emacs-84bbb1add53329f6059958a9609240aed336258c.zip | |
Use gnulib's getopt-gnu module.
| -rw-r--r-- | ChangeLog | 8 | ||||
| -rw-r--r-- | Makefile.in | 4 | ||||
| -rw-r--r-- | configure.in | 9 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 42 | ||||
| -rwxr-xr-x | make-dist | 4 |
5 files changed, 25 insertions, 42 deletions
| @@ -1,5 +1,13 @@ | |||
| 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-01-09 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | Use gnulib's getopt-gnu module. | ||
| 4 | * Makefile.in (GNULIB_MODULES): Add getopt-gnu. | ||
| 5 | (AUTOCONF_INPUTS): Remove getopt.m4; aclocal.m4 is a good-enough | ||
| 6 | representative of the dependencies. | ||
| 7 | * configure.in: Do not configure getopt, as gnulib does that now. | ||
| 8 | * make-dist: Do not worry about lib-src/getopt.h, as gnulib handles | ||
| 9 | getopt now, in lib. | ||
| 10 | |||
| 3 | Regenerate. | 11 | Regenerate. |
| 4 | * arg-nonnull.h, c++defs.h, lib/mktime-internal.h, lib/mktime.c: | 12 | * arg-nonnull.h, c++defs.h, lib/mktime-internal.h, lib/mktime.c: |
| 5 | * lib/stddef.in.h, lib/time.h, lib/time.in.h, lib/time_r.c: | 13 | * 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): | |||
| 330 | # Update modules from gnulib, for maintainers, who should have it in | 330 | # Update modules from gnulib, for maintainers, who should have it in |
| 331 | # $(gnulib_srcdir) (relative to $(srcdir) and should have build tools | 331 | # $(gnulib_srcdir) (relative to $(srcdir) and should have build tools |
| 332 | # as per $(gnulib_srcdir)/DEPENDENCIES. | 332 | # as per $(gnulib_srcdir)/DEPENDENCIES. |
| 333 | GNULIB_MODULES = ftoastr mktime | 333 | GNULIB_MODULES = ftoastr getopt-gnu mktime |
| 334 | GNULIB_TOOL_FLAGS = \ | 334 | GNULIB_TOOL_FLAGS = \ |
| 335 | --import --no-changelog --no-vc-files --makefile-name=gnulib.mk | 335 | --import --no-changelog --no-vc-files --makefile-name=gnulib.mk |
| 336 | sync-from-gnulib: $(gnulib_srcdir) | 336 | sync-from-gnulib: $(gnulib_srcdir) |
| @@ -401,7 +401,7 @@ Makefile: config.status $(srcdir)/src/config.in \ | |||
| 401 | config.status: ${srcdir}/configure ${srcdir}/lisp/version.el | 401 | config.status: ${srcdir}/configure ${srcdir}/lisp/version.el |
| 402 | ./config.status --recheck | 402 | ./config.status --recheck |
| 403 | 403 | ||
| 404 | AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/m4/getopt.m4 $(srcdir)/aclocal.m4 | 404 | AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/aclocal.m4 |
| 405 | 405 | ||
| 406 | $(srcdir)/configure: $(AUTOCONF_INPUTS) | 406 | $(srcdir)/configure: $(AUTOCONF_INPUTS) |
| 407 | cd ${srcdir} && autoconf | 407 | 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 | |||
| 2657 | 2657 | ||
| 2658 | AC_FUNC_FSEEKO | 2658 | AC_FUNC_FSEEKO |
| 2659 | 2659 | ||
| 2660 | # Configure getopt. | ||
| 2661 | m4_include([m4/getopt.m4]) | ||
| 2662 | gl_GETOPT_IFELSE([ | ||
| 2663 | gl_GETOPT_SUBSTITUTE_HEADER | ||
| 2664 | gl_PREREQ_GETOPT | ||
| 2665 | GETOPTOBJS='getopt.o getopt1.o' | ||
| 2666 | ]) | ||
| 2667 | AC_SUBST(GETOPTOBJS) | ||
| 2668 | |||
| 2669 | AC_FUNC_GETPGRP | 2660 | AC_FUNC_GETPGRP |
| 2670 | 2661 | ||
| 2671 | # Configure gnulib. | 2662 | # 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: | |||
| 279 | fi | 279 | fi |
| 280 | 280 | ||
| 281 | mostlyclean: | 281 | mostlyclean: |
| 282 | -rm -f core *.o getopt.h getopt.h-t | 282 | -rm -f core *.o |
| 283 | 283 | ||
| 284 | clean: mostlyclean | 284 | clean: mostlyclean |
| 285 | -rm -f ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} | 285 | -rm -f ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} |
| @@ -311,20 +311,6 @@ test-distrib${EXEEXT}: ${srcdir}/test-distrib.c | |||
| 311 | $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c | 311 | $(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c |
| 312 | ./test-distrib ${srcdir}/testfile | 312 | ./test-distrib ${srcdir}/testfile |
| 313 | 313 | ||
| 314 | ## We need the following in order to create a <getopt.h> when the system | ||
| 315 | ## does not have one that works with the given compiler. | ||
| 316 | GETOPT_H = @GETOPT_H@ | ||
| 317 | getopt.h: getopt_.h | ||
| 318 | cp $(srcdir)/getopt_.h $@-t | ||
| 319 | mv $@-t $@ | ||
| 320 | |||
| 321 | GETOPTOBJS = @GETOPTOBJS@ | ||
| 322 | GETOPTDEPS = $(GETOPTOBJS) $(GETOPT_H) | ||
| 323 | getopt.o: ${srcdir}/getopt.c $(GETOPT_H) ${srcdir}/gettext.h | ||
| 324 | ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c | ||
| 325 | getopt1.o: ${srcdir}/getopt1.c $(GETOPT_H) | ||
| 326 | ${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c | ||
| 327 | |||
| 328 | ../lib/libgnu.a: ../src/config.h | 314 | ../lib/libgnu.a: ../src/config.h |
| 329 | cd ../lib && $(MAKE) libgnu.a | 315 | cd ../lib && $(MAKE) libgnu.a |
| 330 | 316 | ||
| @@ -335,20 +321,20 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h ../src/config.h | |||
| 335 | ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ | 321 | ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \ |
| 336 | ${srcdir}/../src/regex.c | 322 | ${srcdir}/../src/regex.c |
| 337 | 323 | ||
| 338 | etags${EXEEXT}: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXPDEPS) ../src/config.h | 324 | etags${EXEEXT}: ${srcdir}/etags.c $(REGEXPDEPS) ../src/config.h |
| 339 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ | 325 | $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \ |
| 340 | -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) \ | 326 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ |
| 341 | $(REGEXPOBJ) $(LOADLIBES) -o etags | 327 | $(REGEXPOBJ) $(LOADLIBES) -o etags |
| 342 | 328 | ||
| 343 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c $(GETOPTDEPS) ../src/config.h | 329 | ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ../src/config.h |
| 344 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ | 330 | $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ |
| 345 | ${srcdir}/ebrowse.c $(GETOPTOBJS) $(LOADLIBES) -o ebrowse | 331 | ${srcdir}/ebrowse.c $(LOADLIBES) -o ebrowse |
| 346 | 332 | ||
| 347 | ## We depend on etags to assure that parallel makes do not write two | 333 | ## We depend on etags to assure that parallel makes do not write two |
| 348 | ## etags.o files on top of each other. | 334 | ## etags.o files on top of each other. |
| 349 | ctags${EXEEXT}: etags${EXEEXT} | 335 | ctags${EXEEXT}: etags${EXEEXT} |
| 350 | $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ | 336 | $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \ |
| 351 | -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) \ | 337 | -DVERSION="\"${version}\"" ${srcdir}/etags.c \ |
| 352 | $(REGEXPOBJ) $(LOADLIBES) -o ctags | 338 | $(REGEXPOBJ) $(LOADLIBES) -o ctags |
| 353 | 339 | ||
| 354 | profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h | 340 | profile${EXEEXT}: ${srcdir}/profile.c ../src/config.h |
| @@ -358,11 +344,11 @@ make-docfile${EXEEXT}: ${srcdir}/make-docfile.c ../src/config.h | |||
| 358 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ | 344 | $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) \ |
| 359 | -o make-docfile | 345 | -o make-docfile |
| 360 | 346 | ||
| 361 | movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS) | 347 | movemail${EXEEXT}: movemail.o pop.o |
| 362 | $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o \ | 348 | $(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o \ |
| 363 | $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MOVE) -o movemail | 349 | $(LOADLIBES) $(LIBS_MOVE) -o movemail |
| 364 | 350 | ||
| 365 | movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H) | 351 | movemail.o: ${srcdir}/movemail.c ../src/config.h |
| 366 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c | 352 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c |
| 367 | 353 | ||
| 368 | pop.o: ${srcdir}/pop.c ../src/config.h | 354 | pop.o: ${srcdir}/pop.c ../src/config.h |
| @@ -371,19 +357,19 @@ pop.o: ${srcdir}/pop.c ../src/config.h | |||
| 371 | fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h | 357 | fakemail${EXEEXT}: ${srcdir}/fakemail.c ../src/config.h |
| 372 | $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail | 358 | $(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail |
| 373 | 359 | ||
| 374 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h $(GETOPTDEPS) | 360 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c ../src/config.h |
| 375 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(GETOPTOBJS) \ | 361 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ |
| 376 | -DVERSION="\"${version}\"" \ | 362 | -DVERSION="\"${version}\"" \ |
| 377 | $(LOADLIBES) -o emacsclient | 363 | $(LOADLIBES) -o emacsclient |
| 378 | 364 | ||
| 379 | hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h | 365 | hexl${EXEEXT}: ${srcdir}/hexl.c ../src/config.h |
| 380 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl | 366 | $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl |
| 381 | 367 | ||
| 382 | update-game-score${EXEEXT}: update-game-score.o $(GETOPTDEPS) | 368 | update-game-score${EXEEXT}: update-game-score.o |
| 383 | $(CC) ${LINK_CFLAGS} update-game-score.o $(GETOPTOBJS) \ | 369 | $(CC) ${LINK_CFLAGS} update-game-score.o \ |
| 384 | $(LOADLIBES) -o update-game-score | 370 | $(LOADLIBES) -o update-game-score |
| 385 | 371 | ||
| 386 | update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h $(GETOPT_H) | 372 | update-game-score.o: ${srcdir}/update-game-score.c ../src/config.h |
| 387 | $(CC) -c ${CPP_CFLAGS} ${srcdir}/update-game-score.c \ | 373 | $(CC) -c ${CPP_CFLAGS} ${srcdir}/update-game-score.c \ |
| 388 | -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" | 374 | -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" |
| 389 | 375 | ||
| @@ -384,9 +384,7 @@ echo "Making links to \`lib-src'" | |||
| 384 | ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src | 384 | ln [a-zA-Z]*.[ch] ../${tempdir}/lib-src |
| 385 | ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src | 385 | ln ChangeLog Makefile.in README testfile vcdiff ../${tempdir}/lib-src |
| 386 | ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src | 386 | ln grep-changelog rcs2log rcs-checkin ../${tempdir}/lib-src |
| 387 | ln makefile.w32-in ../${tempdir}/lib-src | 387 | ln makefile.w32-in ../${tempdir}/lib-src) |
| 388 | cd ../${tempdir}/lib-src | ||
| 389 | rm -f getopt.h) | ||
| 390 | 388 | ||
| 391 | echo "Making links to \`m4'" | 389 | echo "Making links to \`m4'" |
| 392 | (cd m4 | 390 | (cd m4 |