uClibc-0.29.8 funktioniert mit GCC 4.0.3
[ipfire-2.x.git] / tools / make-functions
index b81ce3c..79fa1b3 100644 (file)
@@ -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
 }