diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-04-05 00:12:26 +0200 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2013-04-05 00:12:26 +0200 |
commit | e656ae635a85965714e6e3e47c2cc56318b18b33 (patch) | |
tree | a3faf13b1bd62021319debb744637451661670a2 /defconfigs/ic-build.sh | |
parent | f6b69f902f18c6e307113e9a2db8bf284c1a8efe (diff) | |
download | embtoolkit-e656ae635a85965714e6e3e47c2cc56318b18b33.tar.gz embtoolkit-e656ae635a85965714e6e3e47c2cc56318b18b33.tar.bz2 embtoolkit-e656ae635a85965714e6e3e47c2cc56318b18b33.tar.xz |
Build system: add continuous integration build script
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'defconfigs/ic-build.sh')
-rwxr-xr-x | defconfigs/ic-build.sh | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/defconfigs/ic-build.sh b/defconfigs/ic-build.sh new file mode 100755 index 0000000..09325a5 --- /dev/null +++ b/defconfigs/ic-build.sh @@ -0,0 +1,83 @@ +#!/bin/sh + +# NOTE: this script only accepts long options + +perror() { + echo "[IC-BUILD-ERROR] : $1" +} + +pwarning() { + echo "[IC-BUILD-WARNING]: $1" +} + +pinfo() { + echo "[IC-BUILD-INFO] : $1" +} + +options=$(echo $* | sed 's/=/ /g') +set -- $options + +pinfo "Parsing parameters" + +while true; do + case "$1" in + --abi) + abi=$2; shift 2;; + --arch) + arch=$2; shift 2;; + --archvariant) + archvariant=$2; shift 2;; + --clibrary) + clibrary=$2; shift 2;; + --endian) + endian=$2; shift 2;; + --float) + float=$2; shift 2;; + --os) + os=$2; shift 2;; + --toolchain) + toolchain=$2; shift 2;; + --workspace) + workspace=$2; shift 2;; + --) + shift; break ;; + *) + break;; + esac +done + +# +# Basic checks +# +if [ "x$workspace" = "x" ]; then + perror "Workspace not specified" + exit 1 +fi + +if [ "x$arch" = "x" ]; then + perror "Architecture not specified" + exit 1 +fi + +if [ ! -d $workspace/defconfigs/$arch ]; then + perror "Architecture $arch seems not be supported" + exit 1 +fi + +if [ ! -e $workspace/defconfigs/$arch/$arch-ic-build.sh ]; then + perror "Architecture $arch does not provide specifics" + exit 1 +fi +cd $workspace && rm -rf .config .config.old && make clean + +# +# arch script +# +. $workspace/defconfigs/$arch/$arch-ic-build.sh + +# +# Now generating .config +# + +cat $workspace/defconfigs/common.kconfig >> $workspace/.config +cd $workspace && rm -rf $workspace/generated/* && make olddefconfig |