Commit 9596739f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

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

The automatic packages selection can be overriden.
parent f033c284
......@@ -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()
......
......@@ -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:%=.%)
......
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