Choose dependency of oldxmenu using configure.
authorGlenn Morris <rgm@gnu.org>
Sat, 15 May 2010 01:55:24 +0000 (18:55 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 15 May 2010 01:55:24 +0000 (18:55 -0700)
* configure.in (OLDXMENU_TARGET): New output variable.

* src/Makefile.in (OLDXMENU_TARGET): New, set by configure.
(really-lwlib, really-oldXMenu): Always define.
($OLDXMENU): Depend on $OLDXMENU_TARGET.

* msdos/sed1v2.inp (OLDXMENU_TARGET): Edit to empty.
* msdos/sed1x.inp (OLDXMENU_TARGET): Edit to really-oldxmenu.

ChangeLog
configure.in
msdos/ChangeLog
msdos/sed1v2.inp
msdos/sed1x.inp
src/ChangeLog
src/Makefile.in

index 1b52a37..fee67f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2010-05-15  Glenn Morris  <rgm@gnu.org>
 
+       * configure.in (OLDXMENU_TARGET): New output variable.
+
        * Makefile.in (install-arch-dep): Update odd NS rule for Emacs version.
 
        * Makefile.in (install-arch-indep): Remove references to RCS, CVS,
index 2475caa..c512350 100644 (file)
@@ -3126,10 +3126,13 @@ AC_SUBST(TOOLKIT_LIBW)
 
 if test "$USE_X_TOOLKIT" = "none"; then
   LIBXT_OTHER="\$(LIBXSM)"
+  OLDXMENU_TARGET="really-oldXMenu"
 else
   LIBXT_OTHER="\$(LIBXMU) -lXt \$(LIBXTR6) -lXext"
+  OLDXMENU_TARGET="really-lwlib"
 fi
 AC_SUBST(LIBXT_OTHER)
+AC_SUBST(OLDXMENU_TARGET)
 
 ## The X Menu stuff is present in the X10 distribution, but missing
 ## from X11.  If we have X10, just use the installed library;
index 2261754..4625421 100644 (file)
@@ -1,5 +1,8 @@
 2010-05-15  Glenn Morris  <rgm@gnu.org>
 
+       * sed1v2.inp (OLDXMENU_TARGET): Edit to empty.
+       * sed1x.inp (OLDXMENU_TARGET): Edit to really-oldxmenu.
+
        * sed1v2.inp (LIBXT_OTHER): Exit to empty.
 
 2010-05-14  Glenn Morris  <rgm@gnu.org>
index e43e79d..f4774a1 100644 (file)
@@ -82,6 +82,7 @@ s/\.h\.in/.h-in/
 /^LIBXSM *=/s/@LIBXSM@//
 /^LIBXTR6 *=/s/@LIBXTR6@//
 /^LIBXT_OTHER *=/s/@LIBXT_OTHER@//
+/^OLDXMENU_TARGET *=/s/@OLDXMENU_TARGET@//
 /^XOBJ *=/s/@XOBJ@//
 /^TOOLKIT_LIBW *=/s/@TOOLKIT_LIBW@//
 /^LIBSOUND *=/s/@LIBSOUND@//
index bcdb0fe..d9d7a87 100644 (file)
@@ -7,6 +7,7 @@ s/DOC/DOC-X/g
 /^OLDXMENU *=/s!@OLDXMENU@!${oldXMenudir}libXMenu11.a!
 /^LIBXMENU *=/s!@LIBXMENU@!${OLDXMENU}!
 /^LIBX_OTHER *=/s!@LIBX_OTHER@!${LIBXT} ${LIBX_EXTRA}!
+/^OLDXMENU_TARGET *=/s!= *!= really-oldxmenu!
 /^LIBS_SYSTEM *=/s!= *!= -lxext -lsys!
 /^MSDOS_X_OBJ *=/s!= *!= w16select.o termcap.o!
 /^TOOLTIP_SUPPORT *=/s!= *!= ${lispsource}tooltip.elc!
index 1b1ea39..e9c01ee 100644 (file)
@@ -1,5 +1,9 @@
 2010-05-15  Glenn Morris  <rgm@gnu.org>
 
+       * Makefile.in (OLDXMENU_TARGET): New, set by configure.
+       (really-lwlib, really-oldXMenu): Always define.
+       ($OLDXMENU): Depend on $OLDXMENU_TARGET.
+
        * Makefile.in: Simplify cpp conditional.
 
        * Makefile.in (${ns_appdir}): Simplify using umask.
index 2dd7340..ff3d632 100644 (file)
@@ -65,6 +65,7 @@ config_h = config.h $(M_FILE) $(S_FILE)
 
 bootstrap_exe = ${abs_builddir}/bootstrap-emacs${EXEEXT}
 
+## ns-app if HAVE_NS, else empty.
 OTHER_FILES = @OTHER_FILES@
 
 CRT_DIR=@CRT_DIR@
@@ -167,6 +168,10 @@ LIBXTR6=@LIBXTR6@
 ## 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@
+
 XMENU_OBJ=@XMENU_OBJ@
 XOBJ=@XOBJ@
 
@@ -665,35 +670,34 @@ temacs${EXEEXT}: $(LOCALCPP) $(START_FILES) stamp-oldxmenu ${obj} ${otherobj} pr
 prefix-args${EXEEXT}: prefix-args.o $(config_h)
        $(CC) $(LDFLAGS) prefix-args.o -o prefix-args
 
-/* 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.  */
-stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
-       touch stamp-oldxmenu
-/* Supply an ordering for parallel make.  */
-../src/$(OLDXMENU): ${OLDXMENU}
-
-#ifdef USE_X_TOOLKIT
-$(OLDXMENU): really-lwlib
 
+/* 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
-#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 /* !HAVE_X11 || USE_GTK */
 
+/* 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.  */
+stamp-oldxmenu: ${OLDXMENU} ../src/$(OLDXMENU)
+       touch stamp-oldxmenu
+/* Supply an ordering for parallel make.  */
+../src/$(OLDXMENU): ${OLDXMENU}
+
+$(OLDXMENU): $(OLDXMENU_TARGET)
+
+#else /* !HAVE_X11 || USE_GTK */ 
 /* We don''t really need this, but satisfy the dependency.  */
 stamp-oldxmenu:
        touch stamp-oldxmenu