[banshee] [build] add profile-configure



commit 5e0672aeb8250f59888512c360a8d4a9a0f15b64
Author: Aaron Bockover <abockover novell com>
Date:   Sat Mar 20 00:57:49 2010 -0400

    [build] add profile-configure
    
    profile-configure is just a lame ./configure wrapper that keeps
    a memory of common configure arguments for certain common cases.
    
    I have added meego and darwin profiles. These are sets of configure
    arguments that are most likely for those environments.
    
    bootstrap-bundle now passes its profile directly to profile-configure,
    and autogen.sh also now supports skipping calling configure if the
    typical NOCONFIGURE environment variable has been set.

 autogen.sh        |    5 +++++
 bootstrap-bundle  |   13 ++-----------
 profile-configure |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 57 insertions(+), 11 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 9d7fefa..819be00 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -73,6 +73,11 @@ test -f config.h.in && touch config.h.in
 run automake --gnu --add-missing --force --copy \
 	-Wno-portability -Wno-portability
 
+if [ ! -z "$NOCONFIGURE" ]; then
+	echo "Done. ./configure skipped."
+	exit $?
+fi
+
 if [ $# = 0 ]; then
 	echo "WARNING: I am going to run configure without any arguments."
 fi
diff --git a/bootstrap-bundle b/bootstrap-bundle
index 45f775b..4d87c50 100755
--- a/bootstrap-bundle
+++ b/bootstrap-bundle
@@ -35,17 +35,8 @@ popd &>/dev/null
 
 source "$envfile"
 
-CONFIGURE_ARGS="
-	--disable-mtp \
-	--disable-daap
-	--disable-ipod
-	--disable-boo
-	--disable-gnome
-	--disable-webkit
-	--disable-docs
-"
-
-./autogen.sh --prefix="$BUILD_PREFIX" $CONFIGURE_ARGS
+NOCONFIGURE=1 ./autogen.sh
+./profile-configure $profile_name --prefix="$BUILD_PREFIX"
 
 cat <<EOF
 
diff --git a/profile-configure b/profile-configure
new file mode 100755
index 0000000..cc04aa0
--- /dev/null
+++ b/profile-configure
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+
+profiles=(
+	"darwin
+		--disable-mtp
+		--disable-daap
+		--disable-ipod
+		--disable-boo
+		--disable-gnome
+		--disable-webkit
+		--disable-docs
+	"
+	"meego
+		--enable-moblin
+		--disable-gnome
+		--disable-daap
+		--disable-webkit
+		--disable-youtube
+		--disable-boo
+		--disable-ipod
+		--disable-docs
+	"
+)
+
+selected_profile=$1; shift
+
+for ((i=0; i<${#profiles[ ]}; i++)); do
+	profile=(${profiles[$i]})
+	if [ "${profile[0]}" = "$selected_profile" ]; then
+		configure="./configure"
+		echo ${#profile[ ]}
+		for ((j=1; j<${#profile[ ]}; j++)); do
+			configure="$configure ${profile[$j]}"
+		done
+		echo "Running $configure $@"
+		$configure $@
+		exit $?
+	fi
+done
+
+echo "Usage: $0 <profile> [extra configure args]"
+echo
+echo "  Available profiles:"
+echo
+for ((i=0; i<${#profiles[ ]}; i++)); do
+	profile=(${profiles[$i]})
+	echo "    ${profile[0]}"
+done
+echo
+exit 1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]