#/bin/sh

. ./_clfsset.sh

APPNAME=linux
TARGET=$APPNAME-$LINUX_VER
TARGETBALL=$TARGET.tar.xz
TARGETDIR=$TARGET

cd $SRC

echo $TARGET

RemoveSrcDir

. $WRK/_extract.sh

cd $TARGETDIR

TimeStart

#echo Patching...
#xzcat $DLD/patch-$LINUX_VER.xz | patch -Np1 -i - \
#        1> $LOG/$THISFILE.0_patch.log 2>&1 || exit 1

echo Making mrproper...
make mrproper \
        1> $LOG/$THISFILE.1_mrproper.log 2>&1 || exit 1

echo Making headers_check...
make ARCH=x86_64 headers_check \
        1> $LOG/$THISFILE.2_make.log 2>&1 || exit 1

echo Installing...
make ARCH=x86_64 INSTALL_HDR_PATH=/tools headers_install \
        1> $LOG/$THISFILE.3_install.log 2>&1 || exit 1

TimeEnd

cd ..
RemoveSrcDir

echo Done.

