summaryrefslogtreecommitdiff
path: root/lib-src/Makefile.in
diff options
context:
space:
mode:
authorPaul Eggert <eggert@twinsun.com>2005-07-26 21:43:13 +0000
committerPaul Eggert <eggert@twinsun.com>2005-07-26 21:43:13 +0000
commit9eff9fe3e8ab53b7a8ad2c1633b0681beb3b655c (patch)
tree36f83598b89a1567622ee38b623f7888a4c2e904 /lib-src/Makefile.in
parent1c9916a1f9dc944ee733f5c77db39013123da8da (diff)
downloademacs-9eff9fe3e8ab53b7a8ad2c1633b0681beb3b655c.tar.gz
Merge gnulib getopt implementation into Emacs.
* Makefile.in (AUTOCONF_INPUTS): New macro. ($(srcdir)/configure, $(srcdir)/src/stamp-h.in): Depend on it, so that these files also depend on m4/getopt.m4. * configure.in: Configure getopt by including m4/getopt.m4, and configuring a getopt replacement if necessary. * make-dist: Add m4 subdirectory. Unlink lib-src/getopt.h. * m4/getopt.m4: New file. * lib-src/Makefile.in (mostlyclean): Remove getopt.h, getopt.h-t. (GETOPT_H): New macro, from gnulib. (getopt.h): New rule, from gnulib. (GETOPTOBJS): Now autoconfigured. (GETOPTDEPS): getopt.h is now autoconfigured. (getopt.o, getopt1.o): Depend on $(GETOPT_H), not ${srcdir}/getopt.h. (getopt.o): Depend on ${srcdir}/gettext.h. (movemail.o): Depend on $(GETOPT_H). * lib-src/getopt.c, lib-src/getopt1.c: Sync from gnulib. * lib-src/getopt_.h, lib-src/getopt_int.h, lib-src/gettext.h: New files, from gnulib. * lib-src/getopt.h: Removed (now is getopt_.h). * nt/inc/gettext.h: Remove; no longer needed now that lib-src/gettext.h exists. * src/s/cygwin.h (C_SWITCH_SYSTEM): Remove, since gettext.h is now part of lib-src.
Diffstat (limited to 'lib-src/Makefile.in')
-rw-r--r--lib-src/Makefile.in21
1 files changed, 14 insertions, 7 deletions
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 372983221a3..6fa89e728c6 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -1,5 +1,5 @@
# Makefile for lib-src subdirectory in GNU Emacs.
-# Copyright (C) 1985, 1987, 1988, 1993, 1994, 2002, 2003, 2004
+# Copyright (C) 1985, 1987, 1988, 1993, 1994, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -344,7 +344,7 @@ uninstall:
rm -f ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
mostlyclean:
- -rm -f core *.o
+ -rm -f core *.o getopt.h getopt.h-t
clean: mostlyclean
-rm -f ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL}
@@ -382,11 +382,18 @@ test-distrib${EXEEXT}: ${srcdir}/test-distrib.c
$(CC) ${ALL_CFLAGS} -o test-distrib ${srcdir}/test-distrib.c
./test-distrib ${srcdir}/testfile
-GETOPTOBJS = getopt.o getopt1.o
-GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
-getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
+/* We need the following in order to create a <getopt.h> when the system
+ doesn't 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 ${srcdir}/getopt.h
+getopt1.o: ${srcdir}/getopt1.c $(GETOPT_H)
${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c
#ifdef REGEXP_IN_LIBC
@@ -430,7 +437,7 @@ b2m${EXEEXT}: ${srcdir}/b2m.c ../src/config.h $(GETOPTDEPS)
movemail${EXEEXT}: movemail.o pop.o $(GETOPTDEPS)
$(CC) ${LINK_CFLAGS} ${MOVE_FLAGS} movemail.o pop.o $(GETOPTOBJS) $(LOADLIBES) $(LIBS_MAIL) $(LIBS_MOVE) -o movemail
-movemail.o: ${srcdir}/movemail.c ../src/config.h
+movemail.o: ${srcdir}/movemail.c ../src/config.h $(GETOPT_H)
$(CC) -c ${CPP_CFLAGS} -Demacs ${MOVE_FLAGS} ${srcdir}/movemail.c
pop.o: ${srcdir}/pop.c ../src/config.h