[vlc-commits] contrib: bootstrap --disable-FOO and --enable-FOO

Rémi Denis-Courmont git at videolan.org
Tue Jun 28 18:45:32 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jun 27 16:37:59 2011 +0300| [9596739f167e9189094dcc55031f0af08d0a1b74] | committer: Rémi Denis-Courmont

contrib: bootstrap --disable-FOO and --enable-FOO

The automatic packages selection can be overriden.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9596739f167e9189094dcc55031f0af08d0a1b74
---

 contrib/bootstrap    |   12 ++++++++++++
 contrib/src/main.mak |    5 +++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/contrib/bootstrap b/contrib/bootstrap
index 53dfedf..b504173 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -24,11 +24,15 @@ usage()
 	echo "  --build=BUILD    configure for building on BUILD"
 	echo "  --host=HOST      cross-compile to build to run on HOST"
 	echo "  --prefix=PREFIX  install files in PREFIX"
+	echo "  --disable-FOO    configure to not build package FOO"
+	echo "  --enable-FOO     configure to build package FOO"
 }
 
 BUILD=
 HOST=
 PREFIX=
+PKGS_ENABLE=
+PKGS_DISABLE=
 
 if test ! -f "../src/main.mak"
 then
@@ -52,6 +56,12 @@ do
 		--prefix=*)
 			PREFIX="${1#--prefix=}"
 			;;
+		--disable-*)
+			PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
+			;;
+		--enable-*)
+			PKGS_ENABLE="${PKGS_ENABLE} ${1#--enable-}"
+			;;
 		*)
 			echo "Unrecognized options $1"
 			usage
@@ -102,6 +112,8 @@ cat >&3 << EOF
 BUILD := $BUILD
 HOST := $HOST
 PREFIX := $PREFIX
+PKGS_DISABLE := $PKGS_DISABLE
+PKGS_ENABLE := $PKGS_ENABLE
 EOF
 
 add_make()
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index f1da043..e762e34 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -175,6 +175,11 @@ include ../src/*/rules.mak
 #
 # Targets
 #
+ifneq ($(filter $(PKGS_DISABLE),$(PKGS_ENABLE)),)
+$(error Same package(s) disabled and enabled at the same time)
+endif
+PKGS := $(filter-out $(PKGS_DISABLE),$(PKGS)) $(PKGS_ENABLE)
+
 fetch: $(PKGS:%=.sum-%)
 fetch-all: $(ALL_PKGS:%=.sum-%)
 install: $(PKGS:%=.%)



More information about the vlc-commits mailing list