diff options
| author | Glenn Morris | 2015-05-15 20:51:45 -0400 |
|---|---|---|
| committer | Glenn Morris | 2015-05-15 20:51:45 -0400 |
| commit | 48e384d7104dce8219b169c55a29c9f85024c83f (patch) | |
| tree | 4b1e1cae593af4c1253af05172b23c05a3b63096 | |
| parent | c7e93c41078193d4df8ca165d3aea50a51c40519 (diff) | |
| download | emacs-48e384d7104dce8219b169c55a29c9f85024c83f.tar.gz emacs-48e384d7104dce8219b169c55a29c9f85024c83f.zip | |
Replace AC_SUBST_FILE in configure with include in Makefiles.
* configure.ac (DEPDIR, MKDEPDIR, deps_frag, lwlib_deps_frag)
(oldxmenu_deps_frag, lisp_frag): Remove output variables/files.
(AUTO_DEPEND): New output variable.
* lwlib/Makefile.in (AUTO_DEPEND): New, set by configure.
(DEPFLAGS, MKDEPDIR): Set directly via conditional.
(lwlib_deps_frag): Replace by conditional include.
* lwlib/autodeps.mk: Remove file.
* oldXMenu/Makefile.in (AUTO_DEPEND): New, set by configure.
(DEPFLAGS, MKDEPDIR): Set directly via conditional.
(oldxmenu_deps_frag): Replace by conditional include.
* oldXMenu/autodeps.mk: Remove file.
* src/Makefile.in (AUTO_DEPEND): New, set by configure.
(DEPFLAGS, MKDEPDIR): Set directly via conditional.
(lisp_frag): Replace by an include.
(deps_frag): Replace by conditional include.
* src/autodeps.mk: Remove file.
| -rw-r--r-- | configure.ac | 22 | ||||
| -rw-r--r-- | lwlib/Makefile.in | 20 | ||||
| -rw-r--r-- | lwlib/autodeps.mk | 5 | ||||
| -rw-r--r-- | lwlib/deps.mk | 2 | ||||
| -rw-r--r-- | oldXMenu/Makefile.in | 20 | ||||
| -rw-r--r-- | oldXMenu/autodeps.mk | 5 | ||||
| -rw-r--r-- | oldXMenu/deps.mk | 2 | ||||
| -rw-r--r-- | src/Makefile.in | 25 | ||||
| -rw-r--r-- | src/autodeps.mk | 5 | ||||
| -rw-r--r-- | src/deps.mk | 2 |
10 files changed, 49 insertions, 59 deletions
diff --git a/configure.ac b/configure.ac index 90a40552a35..1cddeb1e45f 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -1661,9 +1661,7 @@ dnl AC_C_BIGENDIAN is done by gnulib. | |||
| 1661 | 1661 | ||
| 1662 | dnl check for Make feature | 1662 | dnl check for Make feature |
| 1663 | 1663 | ||
| 1664 | DEPFLAGS= | 1664 | AUTO_DEPEND=no |
| 1665 | MKDEPDIR=":" | ||
| 1666 | deps_frag=deps.mk | ||
| 1667 | dnl check if we have GCC and autodepend is on. | 1665 | dnl check if we have GCC and autodepend is on. |
| 1668 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | 1666 | if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then |
| 1669 | AC_MSG_CHECKING([whether gcc understands -MMD -MF]) | 1667 | AC_MSG_CHECKING([whether gcc understands -MMD -MF]) |
| @@ -1675,24 +1673,10 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then | |||
| 1675 | rm -rf deps.d | 1673 | rm -rf deps.d |
| 1676 | AC_MSG_RESULT([$ac_enable_autodepend]) | 1674 | AC_MSG_RESULT([$ac_enable_autodepend]) |
| 1677 | if test $ac_enable_autodepend = yes; then | 1675 | if test $ac_enable_autodepend = yes; then |
| 1678 | DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP' | 1676 | AUTO_DEPEND=yes |
| 1679 | ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe. | ||
| 1680 | MKDEPDIR='${MKDIR_P} ${DEPDIR}' | ||
| 1681 | deps_frag=autodeps.mk | ||
| 1682 | fi | 1677 | fi |
| 1683 | fi | 1678 | fi |
| 1684 | lwlib_deps_frag=$srcdir/lwlib/$deps_frag | 1679 | AC_SUBST(AUTO_DEPEND) |
| 1685 | oldxmenu_deps_frag=$srcdir/oldXMenu/$deps_frag | ||
| 1686 | deps_frag=$srcdir/src/$deps_frag | ||
| 1687 | AC_SUBST(MKDEPDIR) | ||
| 1688 | AC_SUBST(DEPFLAGS) | ||
| 1689 | AC_SUBST_FILE(deps_frag) | ||
| 1690 | AC_SUBST_FILE(lwlib_deps_frag) | ||
| 1691 | AC_SUBST_FILE(oldxmenu_deps_frag) | ||
| 1692 | |||
| 1693 | lisp_frag=$srcdir/src/lisp.mk | ||
| 1694 | AC_SUBST_FILE(lisp_frag) | ||
| 1695 | |||
| 1696 | 1680 | ||
| 1697 | dnl checks for operating system services | 1681 | dnl checks for operating system services |
| 1698 | AC_SYS_LONG_FILE_NAMES | 1682 | AC_SYS_LONG_FILE_NAMES |
diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index 1f332e92939..2fd59598e3e 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in | |||
| @@ -70,10 +70,15 @@ am__v_at_0 = @ | |||
| 70 | am__v_at_1 = | 70 | am__v_at_1 = |
| 71 | 71 | ||
| 72 | DEPDIR = deps | 72 | DEPDIR = deps |
| 73 | ## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. | 73 | AUTO_DEPEND = @AUTO_DEPEND@ |
| 74 | DEPFLAGS = @DEPFLAGS@ | 74 | |
| 75 | ## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. | 75 | ifeq ($(AUTO_DEPEND),yes) |
| 76 | MKDEPDIR = @MKDEPDIR@ | 76 | DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP |
| 77 | MKDEPDIR = ${MKDIR_P} ${DEPDIR} | ||
| 78 | else | ||
| 79 | DEPFLAGS = | ||
| 80 | MKDEPDIR = : | ||
| 81 | endif | ||
| 77 | 82 | ||
| 78 | ## ../src is where the generated file (config.h, globals.h) are. | 83 | ## ../src is where the generated file (config.h, globals.h) are. |
| 79 | ## $(srcdir)/../src is where the non-generated files (lisp.h) are. | 84 | ## $(srcdir)/../src is where the non-generated files (lisp.h) are. |
| @@ -102,8 +107,11 @@ globals_h = ../src/globals.h | |||
| 102 | $(globals_h): | 107 | $(globals_h): |
| 103 | $(MAKE) -C ../src globals.h | 108 | $(MAKE) -C ../src globals.h |
| 104 | 109 | ||
| 105 | ## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. | 110 | ifeq ($(AUTO_DEPEND),yes) |
| 106 | @lwlib_deps_frag@ | 111 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) |
| 112 | else | ||
| 113 | include $(srcdir)/deps.mk | ||
| 114 | endif | ||
| 107 | 115 | ||
| 108 | .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean | 116 | .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean |
| 109 | 117 | ||
diff --git a/lwlib/autodeps.mk b/lwlib/autodeps.mk deleted file mode 100644 index f7109295ce2..00000000000 --- a/lwlib/autodeps.mk +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | ### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs | ||
| 2 | |||
| 3 | ## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes. | ||
| 4 | |||
| 5 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) | ||
diff --git a/lwlib/deps.mk b/lwlib/deps.mk index 11cc0567428..a19e51f34d1 100644 --- a/lwlib/deps.mk +++ b/lwlib/deps.mk | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | ### Commentary: | 21 | ### Commentary: |
| 22 | 22 | ||
| 23 | ## This file is inserted in lwlib/Makefile if AUTO_DEPEND=no. | 23 | ## This file is included in lwlib/Makefile if AUTO_DEPEND=no. |
| 24 | ## It defines static dependencies between the various source files. | 24 | ## It defines static dependencies between the various source files. |
| 25 | 25 | ||
| 26 | ### Code: | 26 | ### Code: |
diff --git a/oldXMenu/Makefile.in b/oldXMenu/Makefile.in index ef2a3600a6b..de5b8e1114c 100644 --- a/oldXMenu/Makefile.in +++ b/oldXMenu/Makefile.in | |||
| @@ -112,10 +112,15 @@ am__v_at_0 = @ | |||
| 112 | am__v_at_1 = | 112 | am__v_at_1 = |
| 113 | 113 | ||
| 114 | DEPDIR = deps | 114 | DEPDIR = deps |
| 115 | ## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. | 115 | AUTO_DEPEND = @AUTO_DEPEND@ |
| 116 | DEPFLAGS = @DEPFLAGS@ | 116 | |
| 117 | ## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. | 117 | ifeq ($(AUTO_DEPEND),yes) |
| 118 | MKDEPDIR = @MKDEPDIR@ | 118 | DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP |
| 119 | MKDEPDIR = ${MKDIR_P} ${DEPDIR} | ||
| 120 | else | ||
| 121 | DEPFLAGS = | ||
| 122 | MKDEPDIR = : | ||
| 123 | endif | ||
| 119 | 124 | ||
| 120 | ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ | 125 | ALL_CFLAGS=$(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ |
| 121 | $(C_SWITCH_X_SITE) $(DEPFLAGS) \ | 126 | $(C_SWITCH_X_SITE) $(DEPFLAGS) \ |
| @@ -132,8 +137,11 @@ libXMenu11.a: $(OBJS) $(EXTRA) | |||
| 132 | $(AM_V_at)$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA) | 137 | $(AM_V_at)$(AR) $(ARFLAGS) $@ $(OBJS) $(EXTRA) |
| 133 | $(AM_V_at)$(RANLIB) $@ | 138 | $(AM_V_at)$(RANLIB) $@ |
| 134 | 139 | ||
| 135 | ## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. | 140 | ifeq ($(AUTO_DEPEND),yes) |
| 136 | @oldxmenu_deps_frag@ | 141 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) |
| 142 | else | ||
| 143 | include $(srcdir)/deps.mk | ||
| 144 | endif | ||
| 137 | 145 | ||
| 138 | .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean | 146 | .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean |
| 139 | 147 | ||
diff --git a/oldXMenu/autodeps.mk b/oldXMenu/autodeps.mk deleted file mode 100644 index f7109295ce2..00000000000 --- a/oldXMenu/autodeps.mk +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | ### autodeps.mk --- lwlib/Makefile fragment for GNU Emacs | ||
| 2 | |||
| 3 | ## This is inserted in lwlib/Makefile if AUTO_DEPEND=yes. | ||
| 4 | |||
| 5 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) | ||
diff --git a/oldXMenu/deps.mk b/oldXMenu/deps.mk index cdb89f9ead9..54ce3587574 100644 --- a/oldXMenu/deps.mk +++ b/oldXMenu/deps.mk | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | ### Commentary: | 33 | ### Commentary: |
| 34 | 34 | ||
| 35 | ## This file is inserted in oldXMenu/Makefile if AUTO_DEPEND=no. | 35 | ## This file is included in oldXMenu/Makefile if AUTO_DEPEND=no. |
| 36 | ## It defines static dependencies between the various source files. | 36 | ## It defines static dependencies between the various source files. |
| 37 | 37 | ||
| 38 | ### Code: | 38 | ### Code: |
diff --git a/src/Makefile.in b/src/Makefile.in index 1c03b27c2c3..51a5b982474 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -323,10 +323,15 @@ am__v_at_0 = @ | |||
| 323 | am__v_at_1 = | 323 | am__v_at_1 = |
| 324 | 324 | ||
| 325 | DEPDIR=deps | 325 | DEPDIR=deps |
| 326 | ## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty. | 326 | AUTO_DEPEND = @AUTO_DEPEND@ |
| 327 | DEPFLAGS=@DEPFLAGS@ | 327 | |
| 328 | ## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'. | 328 | ifeq ($(AUTO_DEPEND),yes) |
| 329 | MKDEPDIR=@MKDEPDIR@ | 329 | DEPFLAGS = -MMD -MF ${DEPDIR}/$*.d -MP |
| 330 | MKDEPDIR = ${MKDIR_P} ${DEPDIR} | ||
| 331 | else | ||
| 332 | DEPFLAGS = | ||
| 333 | MKDEPDIR = : | ||
| 334 | endif | ||
| 330 | 335 | ||
| 331 | ## DO NOT use -R. There is a special hack described in lastfile.c | 336 | ## DO NOT use -R. There is a special hack described in lastfile.c |
| 332 | ## which is used instead. Some initialized data areas are modified | 337 | ## which is used instead. Some initialized data areas are modified |
| @@ -413,9 +418,7 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \ | |||
| 413 | FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ | 418 | FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ |
| 414 | ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) | 419 | ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) |
| 415 | 420 | ||
| 416 | ## Configure inserts the file lisp.mk at this point, defining $lisp. | 421 | include $(srcdir)/lisp.mk |
| 417 | @lisp_frag@ | ||
| 418 | |||
| 419 | 422 | ||
| 420 | ## Construct full set of libraries to be linked. | 423 | ## Construct full set of libraries to be linked. |
| 421 | LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ | 424 | LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ |
| @@ -667,8 +670,10 @@ endif | |||
| 667 | @: Compile some files earlier to speed up further compilation. | 670 | @: Compile some files earlier to speed up further compilation. |
| 668 | $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" | 671 | $(MAKE) -C ../lisp compile-first EMACS="$(bootstrap_exe)" |
| 669 | 672 | ||
| 670 | ## Insert either autodeps.mk (if AUTO_DEPEND), else deps.mk. | 673 | ifeq ($(AUTO_DEPEND),yes) |
| 671 | @deps_frag@ | 674 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) |
| 672 | 675 | else | |
| 676 | include $(srcdir)/deps.mk | ||
| 677 | endif | ||
| 673 | 678 | ||
| 674 | ### Makefile.in ends here | 679 | ### Makefile.in ends here |
diff --git a/src/autodeps.mk b/src/autodeps.mk deleted file mode 100644 index 8b014a7508c..00000000000 --- a/src/autodeps.mk +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | ### autodeps.mk --- src/Makefile fragment for GNU Emacs | ||
| 2 | |||
| 3 | ## This is inserted in src/Makefile if AUTO_DEPEND=yes. | ||
| 4 | |||
| 5 | -include $(ALLOBJS:%.o=${DEPDIR}/%.d) | ||
diff --git a/src/deps.mk b/src/deps.mk index 71a5f42d22e..23789384fdb 100644 --- a/src/deps.mk +++ b/src/deps.mk | |||
| @@ -20,7 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | ## Commentary: | 21 | ## Commentary: |
| 22 | ## | 22 | ## |
| 23 | ## This file is inserted in src/Makefile if AUTO_DEPEND=no. | 23 | ## This file is included in src/Makefile if AUTO_DEPEND=no. |
| 24 | ## It defines static dependencies between the various source files. | 24 | ## It defines static dependencies between the various source files. |
| 25 | 25 | ||
| 26 | ## FIXME some of these dependencies are platform-specific. | 26 | ## FIXME some of these dependencies are platform-specific. |