From: Glenn Morris Date: Fri, 21 May 2010 00:40:12 +0000 (-0700) Subject: Build simplifications for oldxmenu. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~205^2~26 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=04384b2d186ef8e3fb77f644d6621fc52b83c99a;p=emacs.git Build simplifications for oldxmenu. * configure.in (OLDXMENU): Set to "nothing" if !HAVE_X11 || USE_GTK. (OLDXMENU_TARGET): Set to empty if USE_GTK. * src/Makefile.in (../src/$(OLDXMENU), $(OLDXMENU)): Always define rules. * msdos/sed1x.inp (OLDXMENU): Replace any initial value. * msdos/sed1v2.inp (OLDXMENU): Edit to "nothing". --- diff --git a/ChangeLog b/ChangeLog index 7ec751044ef..9242ab5ef9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-05-21 Glenn Morris + * configure.in (OLDXMENU): Set to "nothing" if !HAVE_X11 || USE_GTK. + (OLDXMENU_TARGET): Set to empty if USE_GTK. + * configure.in (cannot_dump): New output variable. 2010-05-20 enami tsugutomo diff --git a/configure.in b/configure.in index 29f8c8ef604..cd20908e135 100644 --- a/configure.in +++ b/configure.in @@ -3181,7 +3181,6 @@ else 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; @@ -3200,7 +3199,9 @@ if test "${HAVE_X11}" = "yes" ; then LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" OLDXMENU_DEPS="\${OLDXMENU} ../src/\${OLDXMENU}" else - OLDXMENU= + ## For a syntactically valid Makefile; not actually used for anything. + ## See comments in src/Makefile.in. + OLDXMENU=nothing ## FIXME This case (!HAVE_X11 && HAVE_X_WINDOWS) is no longer possible(?). if test "${HAVE_X_WINDOWS}" = "yes"; then LIBXMENU="-lXMenu" @@ -3212,11 +3213,13 @@ else fi if test "$HAVE_GTK" = "yes" || test "$HAVE_MENUS" != "yes"; then - OLDXMENU= + OLDXMENU_TARGET= + OLDXMENU=nothing LIBXMENU= OLDXMENU_DEPS= fi +AC_SUBST(OLDXMENU_TARGET) AC_SUBST(OLDXMENU) AC_SUBST(LIBXMENU) AC_SUBST(LIBX_OTHER) diff --git a/msdos/ChangeLog b/msdos/ChangeLog index 3afea1696e7..df532f60c9a 100644 --- a/msdos/ChangeLog +++ b/msdos/ChangeLog @@ -1,5 +1,8 @@ 2010-05-21 Glenn Morris + * sed1x.inp (OLDXMENU): Replace any initial value. + * sed1v2.inp (OLDXMENU): Edit to "nothing". + * sed1v2.inp (CANNOT_DUMP): Edit to no. 2010-05-20 Glenn Morris diff --git a/msdos/sed1v2.inp b/msdos/sed1v2.inp index ba6846b9648..a54e40b5c05 100644 --- a/msdos/sed1v2.inp +++ b/msdos/sed1v2.inp @@ -114,7 +114,7 @@ s/\.h\.in/.h-in/ /^WINDOW_SUPPORT *=/s/@WINDOW_SUPPORT@// /^LIBGPM *=/s/@LIBGPM@// /^EXEEXT *=/s/@EXEEXT@/.exe/ -/^OLDXMENU *=/s/@OLDXMENU@// +/^OLDXMENU *=/s/@OLDXMENU@/nothing/ /^LIBXMENU *=/s/@LIBXMENU@// /^LIBX_OTHER *=/s/@LIBX_OTHER@// /^GMALLOC_OBJ *=/s/@GMALLOC_OBJ@/gmalloc.o/ diff --git a/msdos/sed1x.inp b/msdos/sed1x.inp index 118b00c2538..aa755ee784f 100644 --- a/msdos/sed1x.inp +++ b/msdos/sed1x.inp @@ -19,7 +19,7 @@ s!^ cd \${oldXMenudir}; \${MAKE}.*$! ${MAKE} -C ${oldXMenudir}.! s!^ @true *$! @rem! s/DOC/DOC-X/g -/^OLDXMENU *=/s!= *!= ${oldXMenudir}libXMenu11.a! +/^OLDXMENU *=/s!=.*!= ${oldXMenudir}libXMenu11.a! /^LIBXMENU *=/s!= *!= ${OLDXMENU}! /^LIBX_OTHER *=/s!= *!= ${LIBXT} ${LIBX_EXTRA}! /^OLDXMENU_TARGET *=/s!= *!= really-oldxmenu! diff --git a/src/ChangeLog b/src/ChangeLog index 5c99ed91434..5335dfc150d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2010-05-21 Glenn Morris + * Makefile.in (../src/$(OLDXMENU), $(OLDXMENU)): Always define rules. + * Makefile.in (CANNOT_DUMP): New, set by configure. (emacs${EXEEXT}, bootstrap-emacs${EXEEXT}): Use $CANNOT_DUMP. diff --git a/src/Makefile.in b/src/Makefile.in index dd1eec73c1f..8c2994f6e8a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -173,13 +173,20 @@ 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. +## If !HAVE_X11 || USE_GTK, empty. +## Else if USE_X_TOOLKIT really-lwlib, 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. +## (Actually, rather than being empty, it is set to "nothing". +## It is never actually used for anything in this case. +## This is done because there is a rule with target $(OLDXMENU) below, +## and I think it might be a syntax error with some makes to have +## an empty target, even if the associated rule is never run. +## http://lists.gnu.org/archive/html/help-make/2010-05/msg00058.html +## The alternative would be to put that rule in a makefile fragment.) OLDXMENU=@OLDXMENU@ ## If HAVE_X11 && !USE_GTK, ${OLDXMENU} ../src/${OLDXMENU}; else empty. @@ -290,6 +297,7 @@ DEPDIR=deps ## -MMD -MF ${DEPDIR}/$*.d if AUTO_DEPEND; else empty. DEPFLAGS=@DEPFLAGS@ ## test -d ${DEPDIR} || mkdir ${DEPDIR} (if AUTO_DEPEND); else ':'. +## FIXME This can fail in parallel builds. Use mkinstalldirs instead? MKDEPDIR=@MKDEPDIR@ # ========================== start of cpp stuff ======================= @@ -651,8 +659,9 @@ prefix-args${EXEEXT}: prefix-args.o $(config_h) $(CC) $(LDFLAGS) prefix-args.o -o prefix-args -/* Only (possibly) used if HAVE_X11 && !USE_GTK, but no harm in always - defining. */ +/* The following oldxmenu-related rules are only (possibly) used if + HAVE_X11 && !USE_GTK, but there is no harm in always defining them + (provided we take a little care that OLDXMENU is never empty). */ really-lwlib: cd ${lwlibdir}; ${MAKE} ${MFLAGS} \ CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}' @@ -670,13 +679,10 @@ really-oldXMenu: stamp-oldxmenu: ${OLDXMENU_DEPS} touch stamp-oldxmenu -/* HAVE_X11 implies HAVE_X_WINDOWS and HAVE_MENUS. */ -#if defined (HAVE_X11) && ! defined (USE_GTK) /* Supply an ordering for parallel make. */ ../src/$(OLDXMENU): ${OLDXMENU} $(OLDXMENU): $(OLDXMENU_TARGET) -#endif /* HAVE_X11 && !USE_GTK */ ../config.status:: epaths.in @echo "The file epaths.h needs to be set up from epaths.in."