X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=tools%2Fmake-functions;h=79fa1b3889c6a0335f566ceaef1404605344b676;hp=b81ce3c9527aad96a4e9748a0b1dbeab2a366a7e;hb=41921bd9290b32661c1c38c9a6c67fe0ec484464;hpb=9badc9e9e0c17f73821d0c34239ac5b0177d7a09 diff --git a/tools/make-functions b/tools/make-functions index b81ce3c952..79fa1b3889 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -406,16 +406,10 @@ ipfiredist() { } installmake() { - if [ -f $BASEDIR/build/usr/src/lfs/$1 ]; then - echo "`date -u '+%b %e %T'`: Building $*" | tee -a $LOGFILE - cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t " download >> $LOGFILE 2>&1 - if [ $? -ne 0 ]; then - exiterror "Download error in $1" - fi - cd $BASEDIR/lfs && make -s -f $* LFS_BASEDIR=$BASEDIR MESSAGE="$1\t md5sum" md5 >> $LOGFILE 2>&1 - if [ $? -ne 0 ]; then - exiterror "md5sum error in $1, check file in cache or signature" - fi + lfsmakecommoncheck $* + [ $? == 1 ] && return 0 + + local PKG_TIME_START=`date +%s` chroot $LFS /tools/bin/env -i HOME=/root \ TERM=$TERM PS1='\u:\w\$ ' \ PATH=/usr/local/bin:/opt/$MACHINE-uClibc/usr/bin:/bin:/usr/bin:/sbin:/usr/sbin \ @@ -429,11 +423,15 @@ installmake() { BUILDTARGET="$BUILDTARGET" MACHINE="$MACHINE" \ /bin/bash -x -c "cd /usr/src/lfs && \ make -f $* LFS_BASEDIR=/usr/src install" >>$LOGFILE 2>&1 - if [ $? -ne 0 ]; then - exiterror "Building $*" - fi + + local COMPILE_SUCCESS=$? + local PKG_TIME_END=`date +%s` + + if [ $COMPILE_SUCCESS -ne 0 ]; then + beautify result FAIL $[ $PKG_TIME_END - $PKG_TIME_START ] + exiterror "Building $*"; else - exiterror "No such file or directory: $BASEDIR/build/usr/src/lfs/$1" + beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ] fi return 0 }