[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs ChangeLog configure configure.in src/Chan...
From: |
Jan Djärv |
Subject: |
[Emacs-diffs] emacs ChangeLog configure configure.in src/Chan... |
Date: |
Sat, 14 Nov 2009 15:17:43 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Jan Djärv <jhd> 09/11/14 15:17:43
Modified files:
. : ChangeLog configure configure.in
src : ChangeLog Makefile.in config.in
Log message:
Use gcc-generated dependency files if we can (GNU Make and gcc
required).
* Makefile.in: If AUTO_DEPEND is defined, make gcc generate
dependency files in deps/. Include those files into Makefile.
* config.in: Generated (AUTO_DEPEND).
* configure.in: --enable-autodepend is new. Check for GNU Make
and that gcc supports -MMD -MF. Define AUTO_DEPEND if we can use
gcc and GNU make to generate dependencies.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/ChangeLog?cvsroot=emacs&r1=1.862&r2=1.863
http://cvs.savannah.gnu.org/viewcvs/emacs/configure?cvsroot=emacs&r1=1.333&r2=1.334
http://cvs.savannah.gnu.org/viewcvs/emacs/configure.in?cvsroot=emacs&r1=1.612&r2=1.613
http://cvs.savannah.gnu.org/viewcvs/emacs/src/ChangeLog?cvsroot=emacs&r1=1.7867&r2=1.7868
http://cvs.savannah.gnu.org/viewcvs/emacs/src/Makefile.in?cvsroot=emacs&r1=1.452&r2=1.453
http://cvs.savannah.gnu.org/viewcvs/emacs/src/config.in?cvsroot=emacs&r1=1.277&r2=1.278
Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/ChangeLog,v
retrieving revision 1.862
retrieving revision 1.863
diff -u -b -r1.862 -r1.863
--- ChangeLog 27 Oct 2009 02:48:13 -0000 1.862
+++ ChangeLog 14 Nov 2009 15:17:38 -0000 1.863
@@ -1,3 +1,9 @@
+2009-11-14 Jan Djärv <address@hidden>
+
+ * configure.in: --enable-autodepend is new. Check for GNU Make
+ and that gcc supports -MMD -MF. Define AUTO_DEPEND if we can use
+ gcc and GNU make to generate dependencies.
+
2009-10-27 Glenn Morris <address@hidden>
* make-dist: Make links to doc/lispintro/*.pdf.
Index: configure
===================================================================
RCS file: /cvsroot/emacs/emacs/configure,v
retrieving revision 1.333
retrieving revision 1.334
diff -u -b -r1.333 -r1.334
--- configure 23 Oct 2009 16:19:37 -0000 1.333
+++ configure 14 Nov 2009 15:17:39 -0000 1.334
@@ -802,6 +802,7 @@
enable_locallisppath
enable_checking
enable_profiling
+enable_autodepend
enable_largefile
with_x
'
@@ -1465,6 +1466,9 @@
stringfreelist, xmallocoverrun, conslist
--enable-profiling build emacs with profiling support. This might not
work on all platforms
+ --enable-autodepend automatically generate dependencies to .h-files.
+ Requires GNU Make and Gcc. Enabled if GNU Make and
+ Gcc is found
--disable-largefile omit support for large files
Optional Packages:
@@ -2424,6 +2428,14 @@
PROFILING_LDFLAGS=
fi
+# Check whether --enable-autodepend was given.
+if test "${enable_autodepend+set}" = set; then
+ enableval=$enable_autodepend; ac_enable_autodepend="${enableval}"
+else
+ ac_enable_autodepend=yes
+fi
+
+
#### Make srcdir absolute, if it isn't already. It's important to
#### avoid running the path through pwd unnecessarily, since pwd can
#### give you automounter prefixes, which can go away. We do all this
@@ -9124,6 +9136,80 @@
fi
+if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
+ { $as_echo "$as_me:$LINENO: checking whether we are using GNU Make" >&5
+$as_echo_n "checking whether we are using GNU Make... " >&6; }
+ HAVE_GNU_MAKE=no
+ testval=`make --version 2>/dev/null | grep 'GNU Make'`
+ if test "x$testval" != x; then
+ HAVE_GNU_MAKE=yes
+ else
+ ac_enable_autodepend=no
+ fi
+ { $as_echo "$as_me:$LINENO: result: $HAVE_GNU_MAKE" >&5
+$as_echo "$HAVE_GNU_MAKE" >&6; }
+ if test $HAVE_GNU_MAKE = yes; then
+ { $as_echo "$as_me:$LINENO: checking whether gcc understands -MMD -MF"
>&5
+$as_echo_n "checking whether gcc understands -MMD -MF... " >&6; }
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -MMD -MF deps.d"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_enable_autodepend=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$SAVE_CFLAGS"
+ test -f deps.d || ac_enable_autodepend=no
+ rm -rf deps.d
+ { $as_echo "$as_me:$LINENO: result: $ac_enable_autodepend" >&5
+$as_echo "$ac_enable_autodepend" >&6; }
+ fi
+ if test $ac_enable_autodepend = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define AUTO_DEPEND 1
+_ACEOF
+
+ fi
+fi
+
{ $as_echo "$as_me:$LINENO: checking for long file names" >&5
$as_echo_n "checking for long file names... " >&6; }
if test "${ac_cv_sys_long_file_names+set}" = set; then
Index: configure.in
===================================================================
RCS file: /cvsroot/emacs/emacs/configure.in,v
retrieving revision 1.612
retrieving revision 1.613
diff -u -b -r1.612 -r1.613
--- configure.in 23 Oct 2009 16:19:39 -0000 1.612
+++ configure.in 14 Nov 2009 15:17:41 -0000 1.613
@@ -286,6 +286,13 @@
PROFILING_LDFLAGS=
fi
+AC_ARG_ENABLE(autodepend,
+[AS_HELP_STRING([--enable-autodepend],
+ [automatically generate dependencies to .h-files.
+ Requires GNU Make and Gcc. Enabled if GNU Make and Gcc is
+ found])],
+[ac_enable_autodepend="${enableval}"],[ac_enable_autodepend=yes])
+
#### Make srcdir absolute, if it isn't already. It's important to
#### avoid running the path through pwd unnecessarily, since pwd can
#### give you automounter prefixes, which can go away. We do all this
@@ -1229,6 +1236,32 @@
dnl check for Make feature
AC_PROG_MAKE_SET
+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])
+ HAVE_GNU_MAKE=no
+ testval=`make --version 2>/dev/null | grep 'GNU Make'`
+ if test "x$testval" != x; then
+ HAVE_GNU_MAKE=yes
+ else
+ ac_enable_autodepend=no
+ fi
+ AC_MSG_RESULT([$HAVE_GNU_MAKE])
+ if test $HAVE_GNU_MAKE = yes; then
+ AC_MSG_CHECKING([whether gcc understands -MMD -MF])
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -MMD -MF deps.d"
+ AC_TRY_COMPILE([], [], , ac_enable_autodepend=no)
+ CFLAGS="$SAVE_CFLAGS"
+ test -f deps.d || ac_enable_autodepend=no
+ rm -rf deps.d
+ AC_MSG_RESULT([$ac_enable_autodepend])
+ fi
+ if test $ac_enable_autodepend = yes; then
+ AC_DEFINE(AUTO_DEPEND, 1, [Generate dependencies with gcc.])
+ fi
+fi
+
dnl checks for operating system services
AC_SYS_LONG_FILE_NAMES
Index: src/ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/src/ChangeLog,v
retrieving revision 1.7867
retrieving revision 1.7868
diff -u -b -r1.7867 -r1.7868
--- src/ChangeLog 13 Nov 2009 16:12:08 -0000 1.7867
+++ src/ChangeLog 14 Nov 2009 15:17:41 -0000 1.7868
@@ -1,3 +1,10 @@
+2009-11-14 Jan Djärv <address@hidden>
+
+ * Makefile.in: If AUTO_DEPEND is defined, make gcc generate
+ dependency files in deps/. Include those files into Makefile.
+
+ * config.in: Generated (AUTO_DEPEND).
+
2009-11-13 Michael Albinus <address@hidden>
* dbusbind.c (Vdbus_registered_objects_table): Renamed from
Index: src/Makefile.in
===================================================================
RCS file: /cvsroot/emacs/emacs/src/Makefile.in,v
retrieving revision 1.452
retrieving revision 1.453
diff -u -b -r1.452 -r1.453
--- src/Makefile.in 11 Nov 2009 06:41:13 -0000 1.452
+++ src/Makefile.in 14 Nov 2009 15:17:43 -0000 1.453
@@ -79,6 +79,10 @@
#define NOT_C_CODE
#include "config.h"
+#ifdef AUTO_DEPEND
+DEPFLAGS = -MMD -MF deps/$*.d
+#endif
+
/* Do not let the file name mktime.c get messed up. */
#ifdef mktime
#undef mktime
@@ -257,13 +261,19 @@
/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
since it may have -I options that should override those two. */
-ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir}
C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_X_SITE C_SWITCH_X_MACHINE
C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS}
${DBUS_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@
@M17N_FLT_CFLAGS@
+ALL_CFLAGS=-Demacs -DHAVE_CONFIG_H $(MYCPPFLAGS) -I. -I${srcdir}
C_SWITCH_MACHINE C_SWITCH_SYSTEM C_SWITCH_X_SITE C_SWITCH_X_MACHINE
C_SWITCH_X_SYSTEM C_SWITCH_SYSTEM_TEMACS ${CFLAGS_SOUND} ${RSVG_CFLAGS}
${DBUS_CFLAGS} ${CFLAGS} @FREETYPE_CFLAGS@ @FONTCONFIG_CFLAGS@ @LIBOTF_CFLAGS@
@M17N_FLT_CFLAGS@ ${DEPFLAGS}
ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
.SUFFIXES: .m
.c.o:
+#ifdef AUTO_DEPEND
+ @test -d deps || mkdir deps
+#endif
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
.m.o:
+#ifdef AUTO_DEPEND
+ @test -d deps || mkdir deps
+#endif
$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
#ifndef LIBX11_SYSTEM
@@ -958,7 +968,7 @@
/* We do not use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
often contain options that have to do with using Emacs''s crt0,
which are only good with temacs. */
-prefix-args${EXEEXT}: prefix-args.c $(config_h)
+prefix-args${EXEEXT}: prefix-args.o $(config_h)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
#if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) &&
! defined (USE_GTK)
@@ -1024,6 +1034,11 @@
@echo "Please run the `configure' script again."
exit 1
+ecrt0.o: ecrt0.c $(config_h)
+ CRT0_COMPILE ${srcdir}/ecrt0.c
+doc.o: buildobj.h
+
+#ifndef AUTO_DEPEND
/* Nearly all the following files depend on lisp.h,
but it is not included as a dependency because
it is so often changed in ways that do not require any recompilation
@@ -1056,8 +1071,6 @@
cmds.o: cmds.c syntax.h buffer.h character.h commands.h window.h lisp.h
$(config_h) \
msdos.h dispextern.h keyboard.h keymap.h
pre-crt0.o: pre-crt0.c
-ecrt0.o: ecrt0.c $(config_h)
- CRT0_COMPILE ${srcdir}/ecrt0.c
dbusbind.o: dbusbind.c termhooks.h frame.h keyboard.h lisp.h $(config_h)
dired.o: dired.c commands.h buffer.h lisp.h $(config_h) character.h charset.h \
coding.h regex.h systime.h blockinput.h atimer.h
@@ -1066,8 +1079,7 @@
disptab.h indent.h $(INTERVALS_H) \
xterm.h blockinput.h atimer.h character.h msdos.h composite.h keyboard.h \
syssignal.h lisp.h $(config_h)
-doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h
character.h \
- buildobj.h
+doc.o: doc.c lisp.h $(config_h) epaths.h buffer.h keyboard.h keymap.h
character.h
doprnt.o: doprnt.c character.h lisp.h $(config_h)
dosfns.o: buffer.h termchar.h termhooks.h frame.h blockinput.h window.h \
msdos.h dosfns.h dispextern.h charset.h coding.h atimer.h systime.h \
@@ -1252,6 +1264,8 @@
textprop.o: textprop.c buffer.h window.h dispextern.h $(INTERVALS_H) \
lisp.h $(config_h)
+#endif /* ! AUTO_DEPEND */
+
/* System-specific programs to be made.
OTHER_FILES
select which of these should be compiled. */
@@ -1287,6 +1301,7 @@
rm -f buildobj.h
clean: mostlyclean
rm -f emacs-*.*.*${EXEEXT} emacs${EXEEXT}
+ -rm -rf deps
#ifdef HAVE_NS
rm -fr ${ns_appdir}
#endif
@@ -1385,3 +1400,8 @@
#endif /* ! defined (CANNOT_DUMP) */
@: Compile some files earlier to speed up further compilation.
cd ../lisp; $(MAKE) $(MFLAGS) compile-first EMACS=${bootstrap_exe}
+
+#ifdef AUTO_DEPEND
+ALLOBJS=$(STARTFILES) ${obj} ${otherobj} prefix-args.o
+-include $(ALLOBJS:%.o=deps/%.d)
+#endif
Index: src/config.in
===================================================================
RCS file: /cvsroot/emacs/emacs/src/config.in,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -b -r1.277 -r1.278
--- src/config.in 12 Oct 2009 00:31:58 -0000 1.277
+++ src/config.in 14 Nov 2009 15:17:43 -0000 1.278
@@ -27,6 +27,9 @@
#define EMACS_CONFIG_H
+/* Generate dependencies with gcc. */
+#undef AUTO_DEPEND
+
/* Define to 1 if the mktime function is broken. */
#undef BROKEN_MKTIME
@@ -828,6 +831,9 @@
/* Define to 1 if you don't have struct exception in math.h. */
#undef NO_MATHERR
+/* Define to 1 if `NSInteger' is defined. */
+#undef NS_HAVE_NSINTEGER
+
/* Define to 1 if you are using NS windowing under MacOS X. */
#undef NS_IMPL_COCOA
@@ -921,21 +927,9 @@
XPointer or XPointer*. */
#undef XRegisterIMInstantiateCallback_arg6
-/* Define to 1 if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
-/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-
/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
#undef _LARGEFILE_SOURCE
@@ -952,16 +946,27 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
-/* Enable extensions on Solaris. */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
/* Define to rpl_ if the getopt replacement functions and variables should be
used. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs ChangeLog configure configure.in src/Chan...,
Jan Djärv <=