Kaydet (Commit) 8549bd67 authored tarafından Your Name's avatar Your Name

build stats

üst 741c37d4
MODDIR
=====
Include order : *api -> modules -> unibuild file -> host -> target -> hooks*
Include order : *api -> modules -> unibuild file -> host -> target -> hooks* All imports are alphabeticaly.
Moddir included unibuild **modules**, **api**, **hooks**, **target** and **host** directories.
Moddir contains unibuild **modules**, **api**, **hooks**, **target** and **host** directories.
Modules
......
......@@ -3,16 +3,3 @@ if [ "$(ls -F $WORKDIR | grep \/$ | wc -l)" == "1" ] ; then
export WORKDIR="$WORKDIR/$(ls -F $WORKDIR | grep \/$)"
fi
info "Single source detected: new workdir => $WORKDIR"
if fn_exists "_setup" || fn_exists "_build" || fn_exists "_install" ; then
info "Auto build type detection disabled."
elif [ "$BuildType" != "" ] ; then
info "Build Type found."
elif [ -f "$WORKDIR/meson.build" ] ; then
BuildType="meson"
elif [ -f "$WORKDIR/CMakeLists.txt" ] ; then
BuildType="cmake"
elif [ -f "$WORKDIR/setup.py" ] ; then
BuildType="python"
elif [ -f "$WORKDIR/configure" ] ; then
BuildType="autotools"
fi
#!/bin/bash
if fn_exists "_setup" || fn_exists "_build" || fn_exists "_install" ; then
info "Auto build type detection disabled."
elif [ "$BuildType" != "" ] ; then
info "Build Type found."
elif [ -f "$WORKDIR/meson.build" ] ; then
BuildType="meson"
elif [ -f "$WORKDIR/CMakeLists.txt" ] ; then
BuildType="cmake"
elif [ -f "$WORKDIR/setup.py" ] ; then
BuildType="python"
elif [ -f "$WORKDIR/configure" ] ; then
BuildType="autotools"
fi
......@@ -4,4 +4,4 @@ mkdir -p $DESTDIR/usr/bin || true
[ -f unibuild.sh ] && cp -prfv * $DESTDIR/usr/lib/unibuild
rm -f $DESTDIR/usr/lib/unibuild/build.sh
chmod +x -R $DESTDIR/usr/lib/unibuild/*
ln -s $DESTDIR/usr/lib/unibuild/unibuild.sh /usr/bin/unibuild || true
ln -s $DESTDIR/usr/lib/unibuild/unibuild.sh /usr/bin/unibuild 2>/dev/null || true
......@@ -22,7 +22,7 @@ for src in ${source[@]} ; do
fi
elif echo "$src" | grep "^git+" &>/dev/null ; then
srcloc=$(echo $src | sed "s|^git+||g" | sed "s/::.*//g")
branch=$(echo $src | sed "s|^.*::||g")
echo $src | grep "::" &>/dev/null && branch=$(echo $src | sed "s|^.*::||g")
echo $srcloc $srcname $branch
info "Clonning: $srcloc"
if [ "$branch" == "" ] ; then
......
#!/bin/bash
declare -r inittime=$(date +%s%3N)
[ -f $HOME/.unibuildrc ] && source $HOME/.unibuildrc
[ "$MODDIR" == "" ] && export MODDIR=/usr/lib/unibuild/modules
set -e
......@@ -19,11 +20,18 @@ fi
source $MODDIR/../target/$TARGET
source $MODDIR/../host/$HOST
declare -r begintime=$(date +%s%3N)
msg ">>> Checking dependencies"
_get_build_deps
declare -r checktime=$(date +%s%3N)
cd $BUILDDIR
msg ">>> Getting sources"
_fetch
declare -r fetchtime=$(date +%s%3N)
msg ">>> Running hooks"
for hook in $(ls $MODDIR/../hooks | sort) ; do
source $MODDIR/../hooks/$hook
......@@ -33,16 +41,22 @@ if fn_exists "_setup" ; then
msg ">>> Running setup function"
_setup
fi
declare -r setuptime=$(date +%s%3N)
if fn_exists "_build" ; then
cd $WORKDIR
msg ">>> Running build function"
_build
fi
declare -r buildtime=$(date +%s%3N)
if fn_exists "_install" ; then
cd $WORKDIR
msg ">>> Running install function"
_install
fi
declare -r installtime=$(date +%s%3N)
cd $WORKDIR
msg ">>> Generating metadata"
_create_metadata
......@@ -50,5 +64,17 @@ cd $WORKDIR
msg ">>> Creating package"
_package
msg ">>> Clearing workdir"
declare -r packagetime=$(date +%s%3N)
rm -rf $WORKDIR
info ">>> Done"
msg "Unibuild stats (milisec):"
info " Unibuild init: $(($begintime-$inittime))"
info " Package Checking: $(($checktime-$begintime))"
info " Source fetching: $(($fetchtime-$checktime))"
info " Setup functions: $(($setuptime-$fetchtime))"
info " Source Building: $(($buildtime-$setuptime))"
info " Source installing: $(($installtime-$buildtime))"
info " Package generating: $(($packagetime-$installtime))"
info " Total time: $(($packagetime-$inittime))"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment