Revision: 6161 http://ipcop.svn.sourceforge.net/ipcop/?rev=6161&view=rev Author: gespinasse Date: 2011-12-11 22:37:31 +0000 (Sun, 11 Dec 2011) Log Message: ----------- I had an interesting failure when trying to add a very simple lfs script. The file loaded had only '.sh' string more than the lfs script name. That difference trigger an implicit make rule (%: %.sh) that run a command which had the bad effect to erase the content of the lfs file. For the issue I had, I simply workaround, chaning the downloaded file name to be more different than '.sh' from lfs file name.
Disable implicit rules for download and md5 where that will never be needed. That may even save us 0.01 s per package. On install target, implicit rules are required to compile and make -r setting is inherited on sub makefile. If really needed a day, we could add MAKEFLAGS=-s on the left side before make (aka MAKEFLAGS=-s make -f ...), as everything on left is not inherited by sub makefiles We had a check for lfs file missing, add two others for not readable and empty. The not readable may happen when manually moving files from one machine to another and that was silently ignored by our build system. The empty is for the accident described above. Modified Paths: -------------- ipcop/trunk/make.sh Modified: ipcop/trunk/make.sh =================================================================== --- ipcop/trunk/make.sh 2011-12-11 13:04:58 UTC (rev 6160) +++ ipcop/trunk/make.sh 2011-12-11 22:37:31 UTC (rev 6161) @@ -1392,10 +1392,12 @@ # so we catch for sure error in PREPLOGFILE unset LOGFILE - # Script present? - if [ ! -f ${BASEDIR}/lfs/${1} ]; then - exiterror "No such file or directory: ${BASEDIR}/lfs/${1}" - fi + # Warn if somehow an accident happen + [ -f ${BASEDIR}/lfs/${1} ] || exiterror "Script: ${BASEDIR}/lfs/${1} missing" + [ -r ${BASEDIR}/lfs/${1} ] || exiterror "Script: ${BASEDIR}/lfs/${1} not readable" + # If the file is found empty, you should check if an implicit rules did not broke the lfs file. + # Look for make -p | grep SUFFIXES, if one the suffix added to lfs name did not match DL_FILE or another object + [ -s ${BASEDIR}/lfs/${1} ] || exiterror "Script: ${BASEDIR}/lfs/${1} empty" if grep -E "^HOST_ARCH.*${MACHINE}|^HOST_ARCH.*all" ${BASEDIR}/lfs/${1} >/dev/null; then get_pkg_ver ${BASEDIR}/lfs/${1} @@ -1407,13 +1409,14 @@ # make: Nothing to be done for `install' echo -e "`date -u '+%b %e %T'`: Building $*" >> ${PREPLOGFILE} - cd ${BASEDIR}/lfs && make -s -f $* MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} MESSAGE="${1}\t " \ + # -r as implicit rules are never used for download and md5, that should be faster, -s is less verbose for rebuild + cd ${BASEDIR}/lfs && make -srf $* MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} MESSAGE="${1}\t " \ download >> ${PREPLOGFILE} 2>&1 if [ ${?} -ne 0 ]; then exiterror "Download error in ${1}" fi - cd ${BASEDIR}/lfs && make -s -f $* MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} MESSAGE="${1}\t md5sum" \ + cd ${BASEDIR}/lfs && make -srf $* MACHINE=${MACHINE} LFS_BASEDIR=${BASEDIR} MESSAGE="${1}\t md5sum" \ md5 >> ${PREPLOGFILE} 2>&1 if [ ${?} -ne 0 ]; then exiterror "md5sum error in ${1}, check file in cache or signature" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn