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

version control system

üst bd9e53c4
...@@ -13,6 +13,8 @@ Api ...@@ -13,6 +13,8 @@ Api
^^^ ^^^
Unibuild helper function defined here. Included before unibuild files. All functions are optional. Modules can use api functions. Unibuild helper function defined here. Included before unibuild files. All functions are optional. Modules can use api functions.
You can define **minver** value for required minimum unibuild api version and you can define **maxver** value for required maximum unibuild api version. Default value is current version.
Hooks Hooks
^^^^ ^^^^
Hook functions included after unibuild files so override unibuild files. you don't have to define unibuild function or variable in here. All hook functions are optional. Hook functions included after unibuild files so override unibuild files. you don't have to define unibuild function or variable in here. All hook functions are optional.
......
export minver=${unibuild_api_version}
export maxver=${unibuild_api_version}
#!/bin/bash
info "Unibuild api version = ${unibuild_api_version}"
if [ ${unibuild_api_version} -lt ${minver} ] ; then
warn "Required minimum version = ${minver}"
err "Please update unibuild."
exit 1
fi
if [ ${unibuild_api_version} -gt ${maxver} ] ; then
warn "Required maximum version = ${maxver}"
err "Building aborted."
exit 1
fi
...@@ -4,7 +4,7 @@ if [ "$BuildType" == "autotools" ] ; then ...@@ -4,7 +4,7 @@ if [ "$BuildType" == "autotools" ] ; then
if [ -f "./autogen.sh" ] ; then if [ -f "./autogen.sh" ] ; then
NOCONFIGURE=1 ./autogen.sh NOCONFIGURE=1 ./autogen.sh
fi fi
conf $CONFIG_OPTIONS conf ${CONFIG_OPTIONS[@]}
} }
_build(){ _build(){
......
#!/bin/bash #!/bin/bash
if [ "$BuildType" == "cmake" ] ; then if [ "$BuildType" == "cmake" ] ; then
_setup(){ _setup(){
cmake_configure $CONFIG_OPTIONS cmake_configure ${CONFIG_OPTIONS[@]}
} }
_build(){ _build(){
......
#!/bin/bash #!/bin/bash
if [ "$BuildType" == "meson" ] ; then if [ "$BuildType" == "meson" ] ; then
_setup(){ _setup(){
unibuild-meson build $CONFIG_OPTIONS unibuild-meson build ${CONFIG_OPTIONS[@]}
} }
_build(){ _build(){
......
#!/bin/bash #!/bin/bash
declare -r unibuild_api_version=1
declare -r inittime=$(date +%s%3N) declare -r inittime=$(date +%s%3N)
[ -f $HOME/.unibuildrc ] && source $HOME/.unibuildrc [ -f $HOME/.unibuildrc ] && source $HOME/.unibuildrc
[ "$MODDIR" == "" ] && export MODDIR=/usr/lib/unibuild/modules [ "$MODDIR" == "" ] && export MODDIR=/usr/lib/unibuild/modules
......
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