diff src/Makefile.in @ 108682:4e87133f8f2c

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 16 May 2010 22:41:29 +0000
parents 6b62ba6da320
children ecb7cdb525f0
line wrap: on
line diff
--- a/src/Makefile.in	Fri May 14 07:48:21 2010 +0000
+++ b/src/Makefile.in	Sun May 16 22:41:29 2010 +0000
@@ -65,6 +65,7 @@
 
 bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT}
 
+## ns-app if HAVE_NS, else empty.
 OTHER_FILES = @OTHER_FILES@
 
 CRT_DIR=@CRT_DIR@
@@ -167,11 +168,37 @@
 ## Only used if HAVE_X_WINDOWS.
 LIBXT_OTHER=@LIBXT_OTHER@
 
+## Only used if HAVE_X11 && !USE_GTK.
+## really-lwlib if USE_X_TOOLKIT, else really-oldxmenu.
+OLDXMENU_TARGET=@OLDXMENU_TARGET@
+
+## If !HAVE_X11 || USE_GTK, empty.
+## Else if USE_X_TOOLKIT, ${lwlibdir}liblw.a.
+## Else ${oldXMenudir}libXMenu11.a.
+OLDXMENU=@OLDXMENU@
+
+## If !HAVE_X11 && HAVE_X_WINDOWS, -lXMenu (this case no longer possible).
+## Else if !HAVE_X11 || USE_GTK, empty.
+## Else $(OLDXMENU).
+LIBXMENU=@LIBXMENU@
+
 XMENU_OBJ=@XMENU_OBJ@
 XOBJ=@XOBJ@
 
 TOOLKIT_LIBW=@TOOLKIT_LIBW@
 
+## Only used if HAVE_X11, in LIBX_OTHER.
+LIBXT=$(TOOLKIT_LIBW) $(LIBXT_OTHER)
+
+## If HAVE_X11, $(LIBXT) $(LIBX_EXTRA), else empty.
+LIBX_OTHER=@LIBX_OTHER@
+
+## LIBXMENU is nil if !HAVE_X_WINDOWS.
+## LD_SWITCH_X_SITE should not be used if not using X, but nothing
+## sets it at present, and if something ever does, it should be
+## configure, which should set it to nil in non-X builds.
+LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE)
+
 LIBSOUND= @LIBSOUND@
 CFLAGS_SOUND= @CFLAGS_SOUND@
 
@@ -184,7 +211,7 @@
 ## sheap.o if CYGWIN, otherwise empty.
 CYGWIN_OBJ=@CYGWIN_OBJ@
 
-## dosfns.o msdos.o if MSDOS.
+## dosfns.o msdos.o w16select.o if MSDOS.
 MSDOS_OBJ =
 ## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS.
 MSDOS_X_OBJ =
@@ -199,11 +226,13 @@
 ns_appsrc=@ns_appsrc@
 NS_OBJ=@NS_OBJ@
 NS_SUPPORT=@NS_SUPPORT@
-## Next two only set if NS_IMPL_GNUSTEP.
+## Only set if NS_IMPL_GNUSTEP.
 GNU_OBJC_CFLAGS=@GNU_OBJC_CFLAGS@
-GNUSTEP_SYSTEM_LIBRARIES=@GNUSTEP_SYSTEM_LIBRARIES@
 
-## Only used if HAVE_X_WINDOWS.
+## Empty if !HAVE_X_WINDOWS
+## xfont.o ftfont.o xftfont.o ftxfont.o if HAVE_XFT
+## xfont.o ftfont.o ftxfont.o if HAVE_FREETYPE
+## else xfont.o
 FONT_OBJ=@FONT_OBJ@
 
 ## Used if HAVE_MOUSE.
@@ -257,6 +286,10 @@
 /* If NS_IMPL_GNUSTEP, some definitions and includes are expanded here.  */
 @NS_IMPL_GNUSTEP_INC@
 
+/* FIXME move to LD_SWITCH_SYSTEM_TEMACS?
+   This uses ${CONFIG_SYSTEM_LIBS}, presumably set by the above include.  */
+NS_IMPL_GNUSTEP_TEMACS_LDFLAGS=@NS_IMPL_GNUSTEP_TEMACS_LDFLAGS@
+
 /* DO NOT use -R.  There is a special hack described in lastfile.c
    which is used instead.  Some initialized data areas are modified
    at initial startup, then labeled as part of the text area when
@@ -286,15 +319,6 @@
 #endif
 	$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
 
-#ifdef HAVE_X_WINDOWS
-OLDXMENU=@OLDXMENU@
-LIBXMENU=@LIBXMENU@
-LIBXT=$(TOOLKIT_LIBW) $(LIBXT_OTHER)
-LIBX_BASE=$(LIBXMENU) $(LD_SWITCH_X_SITE)
-LIBX_OTHER=@LIBX_OTHER@
-FONT_DRIVERS=$(FONT_OBJ)
-#endif /* HAVE_X_WINDOWS */
-
 
 /* A macro which other sections of Makefile can redefine to munge the
    flags before they are passed to LD.  This is helpful if you have
@@ -336,6 +360,12 @@
 
 #endif /* not ORDINARY_LINK */
 
+
+#ifdef NS_IMPL_GNUSTEP
+LD=$(CC) -rdynamic
+#endif
+
+
 /* lastfile must follow all files whose initialized data areas should
    be dumped as pure by dump-emacs.  */
 obj=    dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
@@ -351,7 +381,7 @@
 	process.o callproc.o \
 	region-cache.o sound.o atimer.o \
 	doprnt.o strftime.o intervals.o textprop.o composite.o md5.o \
-	$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_DRIVERS)
+	$(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ)
 
 /* Object files used on some machine or other.
    These go in the DOC file on all machines in case they are needed.  */
@@ -360,7 +390,7 @@
   fontset.o dbusbind.o \
   nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o \
   w32.o w32console.o w32fns.o w32heap.o w32inevt.o \
-  w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_DRIVERS)
+  w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o $(FONT_OBJ)
 
 gmallocobj =
 rallocobj =
@@ -611,6 +641,7 @@
 
 all: emacs${EXEEXT} $(OTHER_FILES)
 
+/* Does anyone ever pay attention to the load-path-shadows output here?  */
 emacs${EXEEXT}: temacs${EXEEXT} ${etc}DOC ${lisp}
 #ifdef CANNOT_DUMP
 	rm -f emacs${EXEEXT}
@@ -648,24 +679,38 @@
 buildobj.h: Makefile
 	echo "#define BUILDOBJ \"${obj} ${otherobj} " "\"" > buildobj.h
 
-/* FIXME LOCALCPP not defined or mentioned anywhere.  */
-temacs${EXEEXT}: $(LOCALCPP) $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
+temacs${EXEEXT}: $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} prefix-args${EXEEXT}
 #ifdef NS_IMPL_GNUSTEP
-	$(CC) -rdynamic YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
-	-L$(GNUSTEP_SYSTEM_LIBRARIES) -lgnustep-gui -lgnustep-base \
-	-lobjc $(CONFIG_SYSTEM_LIBS) -lpthread ) -o temacs \
-	${obj} ${otherobj} ${LIBES}
+	$(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
+	  ${NS_IMPL_GNUSTEP_TEMACS_LDFLAGS} ) \
+	  -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES}
 #else
-	$(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \
-    -o temacs ${START_FILES} ${obj} ${otherobj}  \
-    ${LIBES}
+	$(LD) YMF_PASS_LDFLAGS ( ${TEMACS_LDFLAGS} \
+	  ${NS_IMPL_GNUSTEP_TEMACS_LDFLAGS} ) \
+	  ${LDFLAGS} \
+	  -o temacs ${START_FILES} ${obj} ${otherobj} ${LIBES}
 #endif
 
 prefix-args${EXEEXT}: prefix-args.o $(config_h)
 	$(CC) $(LDFLAGS) prefix-args.o -o prefix-args
 
-#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (USE_GTK)
+
+/* Only (possibly) used if HAVE_X11 && !USE_GTK, but no harm in always
+   defining.  */
+really-lwlib:
+	cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
+    CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
+	@true  /* make -t should not create really-lwlib.  */
+.PHONY: really-lwlib
 
+really-oldXMenu:
+	cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \
+    CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
+	@true  /* make -t should not create really-oldXMenu.  */
+.PHONY: really-oldXMenu
+
+/* HAVE_X11 implies HAVE_X_WINDOWS and HAVE_MENUS.  */
+#if defined (HAVE_X11) && ! defined (USE_GTK)
 /* We use stamp-xmenu with these two deps to both ensure that lwlib
    gets remade based on its dependencies in its own makefile,
    and remake temacs if lwlib gets changed by this.  */
@@ -674,29 +719,13 @@
 /* Supply an ordering for parallel make.  */
 ../src/$(OLDXMENU): ${OLDXMENU}
 
-#ifdef USE_X_TOOLKIT
-$(OLDXMENU): really-lwlib
+$(OLDXMENU): $(OLDXMENU_TARGET)
 
-really-lwlib:
-	cd ${lwlibdir}; ${MAKE} ${MFLAGS} \
-    CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
-	@true  /* make -t should not create really-lwlib.  */
-.PHONY: really-lwlib
-#else /* not USE_X_TOOLKIT */
-$(OLDXMENU): really-oldXMenu
-
-really-oldXMenu:
-	cd ${oldXMenudir}; ${MAKE} ${MFLAGS} \
-    CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
-	@true  /* make -t should not create really-oldXMenu.  */
-.PHONY: really-oldXMenu
-#endif /* not USE_X_TOOLKIT */
-#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
-
+#else /* !HAVE_X11 || USE_GTK */ 
 /* We don''t really need this, but satisfy the dependency.  */
 stamp-oldxmenu:
 	touch stamp-oldxmenu
-#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! USE_GTK) */
+#endif /* HAVE_X11 && !USE_GTK */
 
 ../config.status:: epaths.in
 	@echo "The file epaths.h needs to be set up from epaths.in."
@@ -972,18 +1001,13 @@
 ${ns_appdir}: ${ns_appsrc}
 	rm -fr ${ns_appdir}
 	mkdir -p ${ns_appdir}
-	( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; tar xf - )
-	( cd ${ns_appdir} ; for subdir in `find . -type d ! -name CVS -print` ; do \
-		chmod a+rx $${subdir} ; \
-		rm -rf $${subdir}/CVS ; \
-		rm -f  $${subdir}/.cvsignore ; done ; )
+	( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - )
 
 ${ns_appbindir}Emacs: emacs${EXEEXT}
 	mkdir -p ${ns_appbindir}
 	cp -f emacs${EXEEXT} ${ns_appbindir}Emacs
 
 ns-app: ${ns_appdir} ${ns_appbindir}Emacs
-
 #endif /* HAVE_NS */
 
 mostlyclean: