From 6b0cdcd591b016f1f3a9a6bcc84071c1faec8696 Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 13 Apr 2010 05:27:13 +0000 Subject: Automatically determine appropriate source path + better support for in-tree builds git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4019 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- unix/build-xorg | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'unix') diff --git a/unix/build-xorg b/unix/build-xorg index a1584765..166fad75 100755 --- a/unix/build-xorg +++ b/unix/build-xorg @@ -6,15 +6,11 @@ set -e -if [ "$PREFIX" = "" ]; then - PREFIX=`pwd`/xorg.build -fi -export ACLOCAL="aclocal -I ${PREFIX}/share/aclocal" -export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig" +PREFIX= MAKE="make" STATIC=0 XORG_VERSION= -SRCDIR=.. +SRCDIR=`dirname $0`/.. modules="dri2proto \ libpthread-stubs \ @@ -210,22 +206,17 @@ rebuild () usage () { echo "Usage: $0 init -version <7.4 | 7.5>" - echo " [-srcdir ]" echo echo " $0 build -version <7.4 | 7.5>" - echo " [-srcdir ] [-static] [additional configure flags]" + echo " [-static] [additional configure flags]" echo echo " $0 rebuild -version <7.4 | 7.5> " echo " [additional make options]" echo echo " $0 update -version <7.4 | 7.5>" - echo " [-srcdir ]" echo echo "-static = build a stand-alone version of Xvnc which does not depend on" echo " the shared X11 libraries" - echo - echo "-srcdir = specify the top directory of the TigerVNC source tree" - echo " (default = ..)" exit 1 } @@ -252,8 +243,20 @@ fi pushd $SRCDIR SRCDIR=`pwd` +echo "*** Using TigerVNC source tree at $SRCDIR ***" popd +if [ "`pwd`" = "$SRCDIR/unix" ]; then + cd $SRCDIR +fi + +if [ "$PREFIX" = "" ]; then + PREFIX=`pwd`/xorg.build +fi + +export ACLOCAL="aclocal -I ${PREFIX}/share/aclocal" +export PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig" + case "$MODE" in init) init ;; build) build ${1+"$@"} ;; -- cgit v1.2.3