Ver código fonte

* Added ccache support, speeds up clean/compile time 10x+
* Fixed the _*.c problem with .deps/


svn: 620

Bryan Drewery 22 anos atrás
pai
commit
5b98777391

+ 4 - 4
Makefile.in

@@ -22,10 +22,10 @@ EXCLUDES = pack/pack.cfg misc/ind doc/DEVEL src/Makefile src/compat/Makefile src
            misc/plainh misc/grep misc/cp.sh src/settings.c src/salt.h 
            misc/plainh misc/grep misc/cp.sh src/settings.c src/salt.h 
 
 
 # defaults
 # defaults
-CC = @CC@
-LD = @CC@
-CCDEBUG = @CCDEBUG@
-LDDEBUG = @CCDEBUG@
+CC = @CCACHE@ @CC@
+LD = @CCACHE@ @CC@
+CCDEBUG = @CCACHE@ @CCDEBUG@
+LDDEBUG = @CCACHE@ @CCDEBUG@
 STRIP = @STRIP@
 STRIP = @STRIP@
 
 
 # stuff for Tcl
 # stuff for Tcl

+ 2 - 3
autotools/README

@@ -1,6 +1,5 @@
 Type 'make' whenever one of these conditions are met:
 Type 'make' whenever one of these conditions are met:
 
 
-- Any files in bootstrap/ are modified.
-- Any files are added or removed in src/
-- Any files change their dependancies (#include "file.h")
+- Any files in autotools/ are modified.
+- Any Makefiles are added or removed (Editting of includes/depend.m4 required)
 
 

+ 1 - 0
autotools/configure.ac

@@ -36,6 +36,7 @@ EGG_PROG_HEAD_1
 EGG_PROG_STRIP
 EGG_PROG_STRIP
 EGG_PROG_AWK
 EGG_PROG_AWK
 EGG_PROG_BASENAME
 EGG_PROG_BASENAME
+EGG_PROG_CCACHE
 AC_CHECK_PROG(UNAME,uname,uname)
 AC_CHECK_PROG(UNAME,uname,uname)
 
 
 # Test the os and set the module linking settings
 # Test the os and set the module linking settings

+ 9 - 0
autotools/includes/acinclude.m4

@@ -183,6 +183,15 @@ then
 fi
 fi
 ])dnl
 ])dnl
 
 
+dnl  EGG_PROG_CCACHE()
+dnl
+AC_DEFUN(EGG_PROG_CCACHE, [dnl
+AC_CHECK_PROG(CCACHE, ccache, ccache)
+if test "${CCACHE-x}" = "x"
+then
+  CCACHE=ccache
+fi
+])dnl
 
 
 dnl  EGG_PROG_AWK()
 dnl  EGG_PROG_AWK()
 dnl
 dnl

+ 1 - 0
autotools/includes/depend.m4

@@ -29,6 +29,7 @@ for mf in $files; do
 #    echo "creating $dirpart/.deps/$base.Po"
 #    echo "creating $dirpart/.deps/$base.Po"
     echo '# dummy' > "$dirpart/.deps/$base.Po"
     echo '# dummy' > "$dirpart/.deps/$base.Po"
     echo "include .deps/$base.Po" >> "$dirpart/.deps/includes"
     echo "include .deps/$base.Po" >> "$dirpart/.deps/includes"
+    echo "_$base.c:" >> "$dirpart/.deps/includes"
   done
   done
 done
 done
 ])# DO_DEPS
 ])# DO_DEPS

+ 44 - 2
configure

@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# From configure.ac Revision: 1.2 .
+# From configure.ac Revision: 1.3 .
 # Guess values for system-dependent variables and create Makefiles.
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 # Generated by GNU Autoconf 2.59.
 #
 #
@@ -313,7 +313,7 @@ ac_includes_default="\
 # include <unistd.h>
 # include <unistd.h>
 #endif"
 #endif"
 
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS egg_ac_parameters CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CCDEBUG SET_MAKE HEAD_1 STRIP AWK BASENAME UNAME ZLIB SSL LIBOBJS TCLLIB TCLLIBFN TCLINC TCLINCFN TCL_REQS TCL_LIBS VERSION NUMVER PACKNAME MOD_UPDIR LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS egg_ac_parameters CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CCDEBUG SET_MAKE HEAD_1 STRIP AWK BASENAME CCACHE UNAME ZLIB SSL LIBOBJS TCLLIB TCLLIBFN TCLINC TCLINCFN TCL_REQS TCL_LIBS VERSION NUMVER PACKNAME MOD_UPDIR LTLIBOBJS'
 ac_subst_files=''
 ac_subst_files=''
 
 
 # Initialize some variables set by options.
 # Initialize some variables set by options.
@@ -3444,6 +3444,46 @@ EOF
   exit 1
   exit 1
 fi
 fi
 
 
+# Extract the first word of "ccache", so it can be a program name with args.
+set dummy ccache; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CCACHE+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CCACHE"; then
+  ac_cv_prog_CCACHE="$CCACHE" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CCACHE="ccache"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CCACHE=$ac_cv_prog_CCACHE
+if test -n "$CCACHE"; then
+  echo "$as_me:$LINENO: result: $CCACHE" >&5
+echo "${ECHO_T}$CCACHE" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "${CCACHE-x}" = "x"
+then
+  CCACHE=ccache
+fi
+
 # Extract the first word of "uname", so it can be a program name with args.
 # Extract the first word of "uname", so it can be a program name with args.
 set dummy uname; ac_word=$2
 set dummy uname; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -12293,6 +12333,7 @@ echo X"$mf" |
 #    echo "creating $dirpart/.deps/$base.Po"
 #    echo "creating $dirpart/.deps/$base.Po"
     echo '# dummy' > "$dirpart/.deps/$base.Po"
     echo '# dummy' > "$dirpart/.deps/$base.Po"
     echo "include .deps/$base.Po" >> "$dirpart/.deps/includes"
     echo "include .deps/$base.Po" >> "$dirpart/.deps/includes"
+    echo "_$base.c:" >> "$dirpart/.deps/includes"
   done
   done
 done
 done
 
 
@@ -12944,6 +12985,7 @@ s,@HEAD_1@,$HEAD_1,;t t
 s,@STRIP@,$STRIP,;t t
 s,@STRIP@,$STRIP,;t t
 s,@AWK@,$AWK,;t t
 s,@AWK@,$AWK,;t t
 s,@BASENAME@,$BASENAME,;t t
 s,@BASENAME@,$BASENAME,;t t
+s,@CCACHE@,$CCACHE,;t t
 s,@UNAME@,$UNAME,;t t
 s,@UNAME@,$UNAME,;t t
 s,@ZLIB@,$ZLIB,;t t
 s,@ZLIB@,$ZLIB,;t t
 s,@SSL@,$SSL,;t t
 s,@SSL@,$SSL,;t t