[vlc-devel] [PATCH 2/3] contrib: Put the contrib in $host/$distro instead of just $host. This allows building for a same target with different distro type. (eg iPhone Simulator)
Pierre d'Herbemont
pdherbemont at free.fr
Sat Sep 25 23:51:09 CEST 2010
---
configure.ac | 4 ++--
extras/contrib/Makefile | 6 +++---
extras/contrib/bootstrap | 9 +++++++--
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2894880..86c42f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,11 +108,11 @@ AS_IF([test "${with_contrib}" != "no"],[
if test "`echo \"$topdir\" | cut -c 1`" != "/"; then
topdir="`pwd`/$topdir"
fi
- CONTRIB_DIR="${topdir}/extras/contrib/hosts/${host}"
+ CONTRIB_DIR="${topdir}/extras/contrib/hosts/${host}/default_distro"
if ! test -d "$CONTRIB_DIR"
then
gccmachine=`$CC -dumpmachine`
- CONTRIB_DIR="${topdir}/extras/contrib/hosts/${gccmachine}"
+ CONTRIB_DIR="${topdir}/extras/contrib/hosts/${gccmachine}/default_distro"
fi
])
AC_MSG_CHECKING([for libs in ${CONTRIB_DIR}])
diff --git a/extras/contrib/Makefile b/extras/contrib/Makefile
index 4b65bb5..f1ef565 100644
--- a/extras/contrib/Makefile
+++ b/extras/contrib/Makefile
@@ -52,7 +52,7 @@ CONTRIBREV=34
contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2:
$(WGET) http://downloads.videolan.org/pub/videolan/testing/contrib/$@
-hosts/$(HOST)/.$(CONTRIBREV): contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2
+$(PREFIX)/.$(CONTRIBREV): contrib-macosx-$(ARCH)-$(CONTRIBREV).tar.bz2
@if test -d tmp; then \
echo "Move away ./tmp, it's in the way" ; \
exit 1 ; \
@@ -72,9 +72,9 @@ ifdef HAVE_DARWIN_10
(cd $(PREFIX)/lib && sed -e 's%/usr/lib/libiconv.la%$(PREFIX)/lib/libiconv.la%g' -i.orig *.la && rm -f *.la.orig)
(cd src && rm -f .iconv && $(MAKE) .iconv)
endif
- touch hosts/$(HOST)/.$(CONTRIBREV)
+ touch $(PREFIX)/.$(CONTRIBREV)
-using-bin: hosts/$(HOST)/.$(CONTRIBREV)
+using-bin: $(PREFIX)/.$(CONTRIBREV)
endif
diff --git a/extras/contrib/bootstrap b/extras/contrib/bootstrap
index ac39d96..c0383e0 100755
--- a/extras/contrib/bootstrap
+++ b/extras/contrib/bootstrap
@@ -290,9 +290,14 @@ cat src/Distributions/"${DISTRO}".mak >> distro.mak
echo "BUILD = $BUILD" >> config.mak
echo "HOST = $HOST" >> config.mak
-echo "PREFIX = `pwd`/hosts/$HOST" >> config.mak
+echo "PREFIX = `pwd`/hosts/$HOST/$DISTRO" >> config.mak
-ln -sfn hosts/$HOST build
+mkdir -p hosts/$HOST
+ln -sfn $DISTRO hosts/$HOST/default_distro
+
+if [ "$HOST" = "$BUILD" ]; then
+ ln -sfn hosts/$HOST/$DISTRO build
+fi
echo "CC = ${CC}" >> config.mak
echo "CXX = ${CXX}" >> config.mak
--
1.7.1.1
More information about the vlc-devel
mailing list