diff lib-src/Makefile.in.in @ 149:538048ae2ab8 r20-3b1

Import from CVS: tag r20-3b1
author cvs
date Mon, 13 Aug 2007 09:36:16 +0200
parents cca96a509cfe
children 59463afc5666
line wrap: on
line diff
--- a/lib-src/Makefile.in.in	Mon Aug 13 09:35:15 2007 +0200
+++ b/lib-src/Makefile.in.in	Mon Aug 13 09:36:16 2007 +0200
@@ -37,11 +37,15 @@
 #undef NeXT
 #undef mips
 #undef i386
+#undef linux
 
 /* ==================== Things "configure" will edit ==================== */
 
 CC=@CC@
+CPP=@CPP@
 CFLAGS=@CFLAGS@
+CPPFLAGS=@CPPFLAGS@
+LDFLAGS=@LDFLAGS@
 ALLOCA=@ALLOCA@
 YACC=@YACC@
 LN_S=@LN_S@
@@ -101,13 +105,13 @@
 
 /* Things that a user might actually run,
    which should be installed in bindir. */
-INSTALLABLES = etags ctags emacsclient b2m gnuclient gnuattach gnudoit
+INSTALLABLES = etags ctags b2m gnuclient gnuattach gnudoit
 INSTALLABLE_SCRIPTS = rcs-checkin pstogif install-sid send-pr
 
 /* Things that Emacs runs internally, or during the build process,
    which should not be installed in bindir. */
 UTILITIES= make-path wakeup profile make-docfile digest-doc \
-	sorted-doc movemail cvtmail fakemail yow emacsserver hexl \
+	sorted-doc movemail cvtmail fakemail yow hexl \
 	gnuserv mmencode
 /* These need to be conditional on I18N3
 	make-msgfile make-po */
@@ -241,41 +245,54 @@
 #define BLESSMAIL
 #endif
 
-#if defined (HAVE_SOCKS)
-#define LIB_SOCKS -lsocks
-#else
-#define LIB_SOCKS
-#endif
+/* #if defined (HAVE_SOCKS) */
+/* #define LIB_SOCKS -lsocks */
+/* #else */
+/* #define LIB_SOCKS */
+/* #endif */
 
-LOADLIBES=LIBS_SYSTEM LIBS_MACHINE LIB_SOCKS LD_SWITCH_SITE
-LOAD_X_LIBES=LD_SWITCH_X_SITE LD_SWITCH_X_SYSTEM
-C_SWITCH_X=C_SWITCH_X_SITE C_SWITCH_X_SYSTEM C_SWITCH_SITE
+c_switch_general=@c_switch_general@
+c_switch_window_system=@c_switch_window_system@
+c_switch_all=@c_switch_all@
+ld_switch_general=@ld_switch_general@
+ld_switch_window_system=@ld_switch_window_system@
+ld_switch_all=@ld_switch_all@
+ld_libs_general=@ld_libs_general@
+ld_libs_window_system=@ld_libs_window_system@
+ld_libs_all=@ld_libs_all@
 
-/* We need to #define emacs to get the right versions of some files.
-   Some other files - those shared with other GNU utilities - need
-   HAVE_CONFIG_H #defined before they know they can take advantage of
-   the information in ../src/config.h.  */
-ALL_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \
-   -DSTDC_HEADERS -I. -I../src -I${srcdir} -I${srcdir}/../src \
-   ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
-BASE_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -DHAVE_CONFIG_H -DSTDC_HEADERS \
-    -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
-LINK_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \
-   -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS}
-CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \
-   -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
-/* Formerly -Demacs was missing, but it is needed to suppress the
-   defining of malloc to xmalloc.  [Yes it is fucked up.  Blame FSF
-   for this.] */
-ALLOCA_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \
-   -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
+/* LOADLIBES=LIBS_SYSTEM LIBS_MACHINE LIB_SOCKS LD_SWITCH_SITE */
+/* LOAD_X_LIBES=LD_SWITCH_X_SITE LD_SWITCH_X_SYSTEM */
+/* C_SWITCH_X=C_SWITCH_X_SITE C_SWITCH_X_SYSTEM C_SWITCH_SITE */
+LOADLIBES=$(ld_switch_general) $(ld_libs_general)
+LOAD_X_LIBES=$(ld_switch_window_system)
+C_SWITCH_X=$(c_switch_window_system)
+
+/* We need to #define emacs to get the right versions of some files. */
+
+lib_src_cppflags =  -Demacs -I../src -I${srcdir} -I${srcdir}/../src $(CPPFLAGS)
+cflags  = $(CFLAGS) $(lib_src_cppflags) $(c_switch_general)
+ldflags = $(ld_switch_general) $(LDFLAGS) $(ld_libs_general)
+
+/* CPP_CFLAGS =  $(c_switch_general) -Demacs -DHAVE_CONFIG_H \ */
+/*    -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} */
+/* BASE_CFLAGS = -DHAVE_CONFIG_H \ */
+/*     -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} */
+/* ALL_CFLAGS = $(BASE_CFLAGS) -Demacs */
+/* LINK_CFLAGS = $(ALL_CFLAGS) -Demacs -DHAVE_CONFIG_H \ */
+/*    -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS} */
+/*   Formerly -Demacs was missing, but it is needed to suppress the */
+/*    defining of malloc to xmalloc.  [Yes it is fucked up.  Blame FSF */
+/*    for this.] */
+/* ALLOCA_CFLAGS = -Demacs -DHAVE_CONFIG_H \ */
+/*    -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS} */
 
 /* This is the default compilation command.
    But we should never rely on it, because some make version
    failed to find it for getopt.o.
    Using an explicit command made it work.  */
 .c.o:
-	${CC} -c ${CPP_CFLAGS} $<
+	${CC} -c $(cflags) $<
 
 all: ${UTILITIES} ${INSTALLABLES} ${SCRIPTS}
 
@@ -394,9 +411,9 @@
 GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
 GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
 getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
-	${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt.c
+	${CC} -c $(cflags) ${srcdir}/getopt.c
 getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h
-	${CC} -c ${CPP_CFLAGS} ${srcdir}/getopt1.c
+	${CC} -c $(cflags) ${srcdir}/getopt1.c
 alloca.o: ${srcdir}/../src/alloca.c
 	${CC} -c ${ALLOCA_CFLAGS} ${srcdir}/../src/alloca.c
 
@@ -409,124 +426,92 @@
 #endif
 
 regex.o: ${srcdir}/../src/regex.c ${srcdir}/../src/regex.h
-	$(CC) -c ${BASE_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c
+	$(CC) -c `echo ${cflags} | sed 's/-Demacs/ /'` \
+		-DCONFIG_BROKETS -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c
 
 etags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXDEPS) ../src/config.h
-	$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" -DETAGS_REGEXPS ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXOBJ) $(LOADLIBES) -o etags
+	$(CC) ${cflags} -DVERSION="\"${version}\"" -DETAGS_REGEXPS ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXOBJ) $(ldflags) -o etags
 
 /* We depend on etags to assure that parallel makes do not write two
    etags.o files on top of each other.  */
 ctags: ${srcdir}/etags.c $(GETOPTDEPS) etags
-	$(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags
+	$(CC) ${cflags} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(ldflags) -o ctags
 
 wakeup: ${srcdir}/wakeup.c
-	$(CC) ${ALL_CFLAGS} ${srcdir}/wakeup.c $(LOADLIBES) -o wakeup
+	$(CC) ${cflags} ${srcdir}/wakeup.c $(ldflags) -o wakeup
 
 profile: ${srcdir}/profile.c
-	$(CC) ${ALL_CFLAGS} ${srcdir}/profile.c $(LOADLIBES) -o profile
+	$(CC) ${cflags} ${srcdir}/profile.c $(ldflags) -o profile
 
 make-docfile: ${srcdir}/make-docfile.c
-	$(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) -o make-docfile
+	$(CC) ${cflags} ${srcdir}/make-docfile.c $(ldflags) -o make-docfile
 
 digest-doc: ${srcdir}/digest-doc.c
-	$(CC) ${ALL_CFLAGS} ${srcdir}/digest-doc.c $(LOADLIBES) -o digest-doc 
+	$(CC) ${cflags} ${srcdir}/digest-doc.c $(ldflags) -o digest-doc 
 
 sorted-doc: ${srcdir}/sorted-doc.c ${ALLOCA}
-	$(CC) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c ${ALLOCA} $(LOADLIBES) -o sorted-doc
+	$(CC) ${cflags} ${srcdir}/sorted-doc.c ${ALLOCA} $(ldflags) -o sorted-doc
 
 b2m: ${srcdir}/b2m.c ../src/config.h
-	$(CC) ${ALL_CFLAGS} ${srcdir}/b2m.c $(LOADLIBES) -o b2m 
+	$(CC) ${cflags} ${srcdir}/b2m.c $(ldflags) -o b2m 
 
 movemail: ${srcdir}/movemail.c ${srcdir}/pop.c ${srcdir}/pop.h ../src/config.h
-	$(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c ${srcdir}/pop.c $(LOADLIBES) ${MOVE_LIBS} -o movemail
+	$(CC) ${cflags} ${MOVE_FLAGS} ${srcdir}/movemail.c ${srcdir}/pop.c $(ldflags) ${MOVE_LIBS} -o movemail
 
 cvtmail: ${srcdir}/cvtmail.c
-	$(CC) ${ALL_CFLAGS} ${srcdir}/cvtmail.c $(LOADLIBES) -o cvtmail
+	$(CC) ${cflags} ${srcdir}/cvtmail.c $(ldflags) -o cvtmail
 
 fakemail: ${srcdir}/fakemail.c ../src/config.h
-	$(CC) ${ALL_CFLAGS} ${srcdir}/fakemail.c $(LOADLIBES) -o fakemail
+	$(CC) ${cflags} ${srcdir}/fakemail.c $(ldflags) -o fakemail
 
 yow: ${srcdir}/yow.c ../src/paths.h
-	$(CC) ${ALL_CFLAGS} ${srcdir}/yow.c $(LOADLIBES) -o yow
-
-emacsserver: ${srcdir}/emacsserver.c ../src/config.h
-	$(CC) ${ALL_CFLAGS} ${srcdir}/emacsserver.c $(LOADLIBES) -o emacsserver
-
-emacsclient: ${srcdir}/emacsclient.c ../src/config.h
-	$(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c $(LOADLIBES) -o emacsclient
+	$(CC) ${cflags} ${srcdir}/yow.c $(ldflags) -o yow
 
 hexl: ${srcdir}/hexl.c
-	$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
+	$(CC) ${cflags} ${srcdir}/hexl.c $(ldflags) -o hexl
 
 make-msgfile: ${srcdir}/make-msgfile.c
-	$(CC) ${CPP_CFLAGS} ${srcdir}/make-msgfile.c $(LOADLIBES) -o make-msgfile
+	$(CC) $(cflags) ${srcdir}/make-msgfile.c $(ldflags) -o make-msgfile
 
 make-po: ${srcdir}/make-po.c
-	$(CC) ${CPP_CFLAGS} ${srcdir}/make-po.c $(LOADLIBES) -o make-po
+	$(CC) $(cflags) ${srcdir}/make-po.c $(ldflags) -o make-po
 
 /* Why oh why does HP not include half of the standard X distribution? */
 
-#if defined (HAVE_XAUTH)
+#ifdef HAVE_XAUTH
+cflags_gnuserv = $(CFLAGS) $(c_switch_all) $(lib_src_cppflags)
+ldflags_gnuserv = $(ld_switch_all) $(LDFLAGS) $(ld_libs_all)
+#else
+cflags_gnuserv = ${cflags}
+ldflags_gnuserv = ${ldflags}
+#endif
 gnuslib.o: ${srcdir}/gnuslib.c ${srcdir}/gnuserv.h ../src/config.h
-	$(CC) -c ${CPP_CFLAGS} ${C_SWITCH_X} ${srcdir}/gnuslib.c
-
+	$(CC) -c ${cflags_gnuserv} ${srcdir}/gnuslib.c
 gnuclient: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h 
-	$(CC) ${ALL_CFLAGS} -o gnuclient ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau
+	$(CC) ${cflags_gnuserv} -o gnuclient ${srcdir}/gnuclient.c gnuslib.o $(ldflags_gnuserv)
 gnuattach: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h gnuclient
-	$(CC) ${ALL_CFLAGS} -o gnuattach -DGNUATTACH ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau
+	$(CC) ${cflags_gnuserv} -o gnuattach -DGNUATTACH ${srcdir}/gnuclient.c gnuslib.o $(ldflags_gnuserv)
 gnudoit: ${srcdir}/gnudoit.c gnuslib.o ${srcdir}/gnuserv.h 
-	$(CC) ${ALL_CFLAGS} -o gnudoit ${srcdir}/gnudoit.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau
+	$(CC) ${cflags_gnuserv} -o gnudoit ${srcdir}/gnudoit.c gnuslib.o $(ldflags_gnuserv)
 gnuserv: ${srcdir}/gnuserv.c gnuslib.o ${srcdir}/gnuserv.h
-	$(CC) ${ALL_CFLAGS} ${C_SWITCH_X} -o gnuserv ${srcdir}/gnuserv.c gnuslib.o $(LOADLIBES) $(LOAD_X_LIBES) -lXau
-
-#else /* !HAVE_XAUTH */
-
-gnuclient: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h 
-	$(CC) ${ALL_CFLAGS} -o gnuclient ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES)
-gnuattach: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h gnuclient
-	$(CC) ${ALL_CFLAGS} -o gnuattach -DGNUATTACH ${srcdir}/gnuclient.c gnuslib.o $(LOADLIBES)
-gnudoit: ${srcdir}/gnudoit.c gnuslib.o ${srcdir}/gnuserv.h 
-	$(CC) ${ALL_CFLAGS} -o gnudoit ${srcdir}/gnudoit.c gnuslib.o $(LOADLIBES)
-gnuserv: ${srcdir}/gnuserv.c gnuslib.o ${srcdir}/gnuserv.h
-	$(CC) ${ALL_CFLAGS} -o gnuserv ${srcdir}/gnuserv.c gnuslib.o $(LOADLIBES)
-#endif /* !HAVE_XAUTH */
-
+	$(CC) ${cflags_gnuserv} -o gnuserv ${srcdir}/gnuserv.c gnuslib.o $(ldflags_gnuserv)
 
 /* mmencode binary is used by tm - but is really part of the metamail package */
 /* mmencode.c was merged copy of mmencode.c and codes.c of metamail */
 mmencode : ${srcdir}/mmencode.c
-	$(CC) ${ALL_CFLAGS} ${srcdir}/mmencode.c -o mmencode
+	$(CC) ${cflags} ${srcdir}/mmencode.c -o mmencode
 
 
 /* The timer utility (timer.c, getdate.y) is not used in XEmacs
    because XEmacs provides built-in timer facilities. */
 
 make-path: ${srcdir}/make-path.c ../src/config.h
-	$(CC) $(ALL_CFLAGS) ${srcdir}/make-path.c -o make-path
+	$(CC) $(cflags) ${srcdir}/make-path.c -o make-path
 
 /* These are NOT included in INSTALLABLES or UTILITIES.
    See ../src/Makefile.in.in.  */
-emacstool: ${srcdir}/emacstool.c
-	$(CC) ${srcdir}/emacstool.c -o emacstool ${ALL_CFLAGS} \
-	  -lsuntool -lsunwindow -lpixrect $(LOADLIBES)
-
-/* For SUN Japanese Language Environment.  */
-nemacstool: ${srcdir}/emacstool.c
-	$(CC) -o nemacstool -DJLE ${ALL_CFLAGS} ${srcdir}/emacstool.c \
-	  -lsuntool -lmle -lsunwindow -lpixrect $(LOADLIBES)
-
-xvetool: ${srcdir}/emacstool.c
-	$(CC) -o xvetool -DXVIEW ${ALL_CFLAGS} ${srcdir}/emacstool.c \
-	  -lxview -lX -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
-	  $(LOADLIBES)
-
-xveterm: ${srcdir}/emacstool.c
-	$(CC) -o xveterm -DXVIEW -DTTERM ${ALL_CFLAGS} ${srcdir}/emacstool.c \
-	  -lxview -lolgx -lX  -I$(OPENWINHOME)/include -L$(OPENWINHOME)/lib \
-	  $(LOADLIBES)
-
 aixcc: ${srcdir}/aixcc.c
-	$(CC) $(ALL_CFLAGS) -o aixcc ${srcdir}/aixcc.c
+	$(CC) $(cflags) -o aixcc ${srcdir}/aixcc.c
 
 aixcc.c: ${srcdir}/aixcc.lex
 	lex ${srcdir}/aixcc.lex