Revision: 5321
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5321&view=rev
Author:   gespinasse
Date:     2011-01-11 07:37:25 +0000 (Tue, 11 Jan 2011)

Log Message:
-----------
Add ccache output at end of toolchain and end of build.
Starting from a clean ccache and rebuilding with tests, only 337 MB are used.
So the default 1 GB ccache size is large for us.

Define TOOLS_DIR a few lines earlier, so it could be used for ccache path

Define CCACHE as the absolute path to ccache.
Using an absolute path is more reliable with the various cd we do along the 
code.

./make.sh ccache and ./make.sh ccache_clean now check if ccache is build.

Modified Paths:
--------------
    ipcop/trunk/make.sh

Modified: ipcop/trunk/make.sh
===================================================================
--- ipcop/trunk/make.sh 2011-01-11 07:29:20 UTC (rev 5320)
+++ ipcop/trunk/make.sh 2011-01-11 07:37:25 UTC (rev 5321)
@@ -366,6 +366,10 @@
 # find last failing log always at the same place
 LATEST=log_${MACHINE}/_latest_interrupt.log
 
+# Set up what is /tools on LFS
+TOOLS_DIR=tools_${MACHINE}
+
+CCACHE=${BASEDIR}/build_${MACHINE}/${TOOLS_DIR}/usr/bin/ccache
 export CCACHE_DIR=${BASEDIR}/ccache
 export CCACHE_HASHDIR=1
 
@@ -377,9 +381,6 @@
 # This is the directory that holds the newly built ipcop system
 LFS=${BASEDIR}/build_${MACHINE}/ipcop
 
-# Set up what used to be /tools
-TOOLS_DIR=tools_${MACHINE}
-
 # For toolchain LFS chap5
 # /${TOOLS_DIR}/usr/bin is for ccache symlink
 PATH_CH5=/${TOOLS_DIR}/usr/bin:/${TOOLS_DIR}/bin:${PATH}
@@ -2196,6 +2197,8 @@
 
        [ "${RUNNING_TEST}" == 'yes' ] && parse_tests
 
+       ${CCACHE} -s > ${BASEDIR}/log_${MACHINE}/_build_ccache.log
+
        #temporary comment while alpha stage:
        echo ""
        echo "Burn a CD, write ${SNAME}-${VERSION}-boot.img to floppy or use 
pxe to boot."
@@ -2325,6 +2328,9 @@
        stdumount
        [ ${?} -ne 0 ] && exiterror "Not safe to clean the tree with some 
mountpoint still there, retry when compilation has finished"
 
+       # reset the stats (and hide the ccache message)
+       [ -f ${CCACHE} ] && ${CCACHE} -z >/dev/null
+
        ${SUDO} ${RM} ${BASEDIR}/build_${MACHINE}
        ${SUDO} ${RM} ${BASEDIR}/files_${MACHINE}
        ${SUDO} ${RM} ${BASEDIR}/log_${MACHINE}
@@ -2339,11 +2345,12 @@
        beautify message DONE
        ;;
 ccache)
-       ./build_${MACHINE}/${TOOLS_DIR}/usr/bin/ccache -s
+       # read the stats
+       [ -f ${CCACHE} ] && ${CCACHE} -s
        ;;
 ccache_clean)
        echo -ne "Cleaning ${BOLD}ccache cache${NORMAL} (patience) ... 
${SET_RESULT_COL}"
-       ./build_${MACHINE}/${TOOLS_DIR}/usr/bin/ccache -C > /dev/null
+       [ -f ${CCACHE} ] && ${CCACHE} -C > /dev/null
        beautify message DONE
        ;;
 dist)
@@ -2473,6 +2480,9 @@
        # Now create the toolchain tar archive
        package_toolchain
        [ "${RUNNING_TEST}" == 'yes' ] && parse_tests
+
+       ${CCACHE} -s > ${BASEDIR}/log_${MACHINE}/_build_ccache.log
+
        BUILDTIME=$[`date +"%s"` - ${BUILDSTART}]
        BUILDMINUTES=$[${BUILDTIME} / 60]
        BUILDSECONDS=$[${BUILDTIME} - ${BUILDMINUTES}*60]


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to