Commit 9d5cf9b6 authored by Glenn Morris's avatar Glenn Morris

Handle auto-depend with configure.

* make-dist (src): Include *.mk.
* config.bat: Concatenate deps.mk onto the end of src/Makefile.
* configure.in (DEPFLAGS, MKDEPDIR): New output variables.
(deps_frag): New output file.
(AUTO_DEPEND): Remove this definition.

* src/Makefile.in (DEPDIR): New constant.
(DEPFLAGS): Set with configure, not cpp.
(MKDEPDIR): New, set by configure.
(.c.o, .m.o, ecrt0.o): Use $MKDEPDIR.
(clean): Use $DEPDIR.
(deps_frag): Include from configure.
Move static/dynamic dependency stuff to deps.mk/autodeps.mk.
* src/deps.mk, src/autodeps.mk: New files, extracted from Makefile.in.

* msdos/sed1v2.inp (DEPFLAGS, deps_frag): Edit to empty.
(MKDEPDIR): Edit to ':'.
parent 21566ba7
2010-05-20 Glenn Morris <rgm@gnu.org>
* make-dist (src): Include *.mk.
* config.bat: Concatenate deps.mk onto the end of src/Makefile.
* configure.in (DEPFLAGS, MKDEPDIR): New output variables.
(deps_frag): New output file.
(AUTO_DEPEND): Remove this definition.
* configure.in (--with-gtk, --with-gcc): Remove option stubs.
2010-05-19 Glenn Morris <rgm@gnu.org>
......
......@@ -192,8 +192,9 @@ if exist dir.h ren dir.h vmsdir.h
rem Create "makefile" from "makefile.in".
rm -f Makefile junk.c
sed -e "1,/== start of cpp stuff ==/s@^##*[ ].*$@@" <Makefile.in >junk.c
gcc -E -traditional junk.c | sed -f ../msdos/sed1v2.inp >Makefile
rm -f junk.c
gcc -E -traditional junk.c | sed -f ../msdos/sed1v2.inp >makefile.tmp
copy makefile.tmp + deps.mk Makefile
rm -f junk.c makefile.tmp
if "%X11%" == "" goto src5
mv Makefile makefile.tmp
......
......@@ -1341,6 +1341,9 @@ dnl AC_C_BIGENDIAN
dnl check for Make feature
AC_PROG_MAKE_SET
DEPFLAGS=
MKDEPDIR=":"
deps_frag=deps.mk
dnl check for GNU Make if we have GCC and autodepend is on.
if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
AC_MSG_CHECKING([whether we are using GNU Make])
......@@ -1363,9 +1366,16 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
AC_MSG_RESULT([$ac_enable_autodepend])
fi
if test $ac_enable_autodepend = yes; then
AC_DEFINE(AUTO_DEPEND, 1, [Generate dependencies with gcc.])
DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d'
MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR}'
deps_frag=autodeps.mk
fi
fi
deps_frag=$srcdir/src/$deps_frag
AC_SUBST(MKDEPDIR)
AC_SUBST(DEPFLAGS)
AC_SUBST_FILE(deps_frag)
dnl checks for operating system services
AC_SYS_LONG_FILE_NAMES
......
......@@ -440,6 +440,7 @@ echo "Making links to \`src'"
ln [a-zA-Z]*.h ../${tempdir}/src
ln [a-zA-Z]*.m ../${tempdir}/src
ln [a-zA-Z]*.in ../${tempdir}/src
ln [a-zA-Z]*.mk ../${tempdir}/src
## If we ended up with a symlink, or if we did not get anything
## due to a cross-device symlink, copy the file.
for file in [a-zA-Z]*.[hcs] [a-zA-Z]*.in; do
......
2010-05-20 Glenn Morris <rgm@gnu.org>
* sed1v2.inp (DEPFLAGS, deps_frag): Edit to empty.
(MKDEPDIR): Edit to ':'.
2010-05-19 Glenn Morris <rgm@gnu.org>
* sed2v2.inp (ORDINARY_LINK): Set here rather than in s/msdos.h.
......
......@@ -123,6 +123,8 @@ s/\.h\.in/.h-in/
/^PRE_ALLOC_OBJ *=/s/@PRE_ALLOC_OBJ@/lastfile.o/
/^POST_ALLOC_OBJ *=/s/@POST_ALLOC_OBJ@/$(vmlimitobj)/
/^UNEXEC_OBJ *=/s/@unexec@/unexec.o/
/^DEPFLAGS *=/s/@DEPFLAGS@//
/^MKDEPDIR *=/s/@MKDEPDIR@/:/
/^version *=/s/@[^@\n]*@//
/^M_FILE *=/s!@[^@\n]*@!m/intel386.h!
/^S_FILE *=/s!@[^@\n]*@!s/msdos.h!
......@@ -145,6 +147,7 @@ s/\.h\.in/.h-in/
/^ -\{0,1\}ln -/s/ln -f/cp -pf/
/^[ ]touch /s/touch/djecho $@ >/
s/@YMF_PASS_LDFLAGS@/flags/
s/@deps_frag@//
s/bootstrap-emacs/b-emacs/
s/bootstrap-temacs/b-temacs/
s/bootstrap-doc/b-doc/
......
2010-05-20 Glenn Morris <rgm@gnu.org>
* Makefile.in (DEPDIR): New constant.
(DEPFLAGS): Set with configure, not cpp.
(MKDEPDIR): New, set by configure.
(.c.o, .m.o, ecrt0.o): Use $MKDEPDIR.
(clean): Use $DEPDIR.
(deps_frag): Include from configure.
Move static/dynamic dependency stuff to deps.mk/autodeps.mk.
* deps.mk, autodeps.mk: New files, extracted from Makefile.in.
2010-05-19 Eli Zaretskii <eliz@gnu.org>
* bidi.c (bidi_cache_shrink, bidi_cache_iterator_state): Fix
......
This diff is collapsed.
### autodeps.mk --- src/Makefile fragment for GNU Emacs
## This is inserted in src/Makefile if AUTO_DEPEND=yes.
ALLOBJS=$(START_FILES) ${obj} ${otherobj} prefix-args.o
-include $(ALLOBJS:%.o=${DEPDIR}/%.d)
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment