Added function to change current scratchbox target
authoretrunko <eblima@gmail.com>
Thu, 6 Dec 2007 20:20:22 +0000 (20:20 +0000)
committeretrunko <eblima@gmail.com>
Thu, 6 Dec 2007 20:20:22 +0000 (20:20 +0000)
trunk/build-all.sh

index aaf07d7..1a49a52 100755 (executable)
@@ -171,7 +171,7 @@ function build_pkg() {
 #!/bin/bash
 
 cd $dir/`basename $dir`
-./autogen.sh >> $dir/sbox_build_pkg.log 2>&1
+NOCONFIGURE=1 ./autogen.sh >> $dir/sbox_build_pkg.log 2>&1
 $__sbox_dpkg_buildpackage $__build_pkg_options >> $dir/sbox_build_pkg.log 2>&1
 exit \$?
 EOF
@@ -283,8 +283,14 @@ function setup_sbox() {
 
     __sbox_debian_sarge_bin_path="/scratchbox/devkits/debian-sarge/bin"
     __sbox_dch="$__sbox_debian_sarge_bin_path/dch"
+}
 
-    PATH="$__orig_path:$__sbox_tools_bin_path:$__sbox_maemo3_debian_bin_path:$__sbox_debian_sarge_bin_path"
+function change_sbox_target() {
+    local target
+    target=$1
+
+    `$__sbox_sb_conf select $target`
+    return $?
 }
 
 ###########################################################
@@ -364,6 +370,11 @@ for target in `$__sbox_sb_conf list --targets`; do
 
     # For each module
     for module in `echo $__lib_modules $__python_modules $__python_etk_module|$__sed -e 's/:/ /g'`; do
+
+        msg_begin "Changing current sbox target to $target"
+        change_sbox_target $target
+        msg_end $?
+
         msg "  Building $module packages for $__distro $__arch"
 
         if [ -d "./$module/$module/debian" ]; then
@@ -415,10 +426,10 @@ for target in `$__sbox_sb_conf list --targets`; do
 
         # Clean tree
         clean_repository $module
-
     done
+
+    # Uninstall all packages
 done
 
-# Uninstall all packages
 # END
 finish_log