[vlc-commits] contrib: enable contrib from (VLC) builddir subdirectory

Rémi Denis-Courmont git at videolan.org
Wed Jul 6 17:54:26 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul  6 12:33:31 2011 +0300| [8a36e6bcf4a42ea69ff135fed63d6211a462983a] | committer: Rémi Denis-Courmont

contrib: enable contrib from (VLC) builddir subdirectory

As we need to build contrib before running configure, this remains a
little bit awkward:
 # cd builddir
 # mkdir contrib
 # cd contrib
 # ../../contrib/bootstrap
 # make

Also get rid of "hosts/" in the install prefix. Because I can.

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

 contrib/bootstrap        |    4 ++--
 contrib/hosts/.gitignore |    1 -
 contrib/src/main.mak     |   19 +++++++++++--------
 3 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/contrib/bootstrap b/contrib/bootstrap
index d279666..78b6f49 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -38,7 +38,7 @@ PKGS_DISABLE=
 BUILD_ENCODERS="1"
 BUILD_DISCS="1"
 
-if test ! -f "../src/main.mak"
+if test ! -f "../../contrib/src/main.mak"
 then
 	echo "$0 must be run from a subdirectory"
 	exit 1
@@ -170,7 +170,7 @@ esac
 # Results output
 #
 test -e Makefile && unlink Makefile
-ln -sf ../src/main.mak Makefile
+ln -sf ../../contrib/src/main.mak Makefile
 cat << EOF
 Bootstrap completed.
 
diff --git a/contrib/hosts/.gitignore b/contrib/hosts/.gitignore
deleted file mode 100644
index e05e3c1..0000000
--- a/contrib/hosts/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*-*
diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 66ba274..f868f45 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -5,9 +5,15 @@
 
 all: install
 
-PKGS_ALL := $(patsubst ../src/%/rules.mak,%,$(wildcard ../src/*/rules.mak))
-SRC := ../src
-TARBALLS := ../tarballs
+# bootstrap configuration
+include config.mak
+
+TOPSRC ?= ../../contrib
+TOPDST ?= ..
+SRC := $(TOPSRC)/src
+TARBALLS := $(TOPSRC)/tarballs
+
+PKGS_ALL := $(patsubst $(SRC)/%/rules.mak,%,$(wildcard $(SRC)/*/rules.mak))
 DATE := $(shell date +%Y%m%d)
 VPATH := $(TARBALLS)
 
@@ -17,13 +23,10 @@ SF := http://heanet.dl.sourceforge.net/sourceforge
 VIDEOLAN := http://downloads.videolan.org/pub/videolan
 CONTRIB_VIDEOLAN := $(VIDEOLAN)/testing/contrib
 
-# bootstrap configuration
-include config.mak
-
 #
 # Machine-dependent variables
 #
-PREFIX ?= ../hosts/$(HOST)
+PREFIX ?= $(TOPDST)/$(HOST)
 PREFIX := $(abspath $(PREFIX))
 ifneq ($(HOST),$(BUILD))
 HAVE_CROSS_COMPILE = 1
@@ -188,7 +191,7 @@ CMAKE = cmake . -DCMAKE_TOOLCHAIN_FILE=$(abspath toolchain.cmake) \
 # Per-package build rules
 #
 PKGS_FOUND :=
-include ../src/*/rules.mak
+include $(SRC)/*/rules.mak
 
 #
 # Targets



More information about the vlc-commits mailing list