[Xorg] buildem patch for the modular xlibs tree
Mark Hymers
mark at hymers.org.uk
Sun Jun 20 03:38:23 PDT 2004
Hi,
Attached is a patch for the buildem script which makes the version
checks honour the AUTOMAKE, AUTOCONF and LIBTOOLIZE variables (as
autoreconf itself does). It also adds support for definining a
seperate installation root and exports the relevant PKG_CONFIG_PATH
variable so that users can build packages in their home directory.
Oh, and I fixed the cvs call - for some reason my version of cvs (Debian
Unstable) doesn't like the branch name coming after the repository
name...
Hope this is useful
Mark
--
Mark Hymers <markh at linuxfromscratch dot org>
"Everyone is entitled to be stupid but some abuse the privilege."
Unknown
-------------- next part --------------
Index: build-em
===================================================================
RCS file: /cvs/xlibs/xlibs/build-em,v
retrieving revision 1.7
diff -u -p -r1.7 build-em
--- build-em 19 May 2004 05:05:06 -0000 1.7
+++ build-em 20 Jun 2004 10:24:14 -0000
@@ -1,24 +1,53 @@
#!/bin/sh
set -e
-# export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
+INST_ROOT=/usr/local
+export PKG_CONFIG_PATH=$INST_ROOT/lib/pkgconfig
## Uncomment this to perform the "make install" step using sudo
#BUILD_EM_SUDO=sudo
-if automake --version | grep 'automake' | grep -q '1\.7'; then
+# You can set the following variable to set the path to the the autofoo
+# programs and they will be honoured by autoreconf
+#
+# The usual way of using this is to export the variables before calling
+# this script. It is very useful on Debian where it's necessary to
+# export AUTOMAKE=automake-1.7 export ACLOCAL=aclocal-1.7
+# in order to use the correct version of automake
+#
+# $AUTOMAKE $ACLOCAL
+# $AUTOCONF $AUTOHEADER
+# $LIBTOOLIZE
+# $AUTOPOINT
+
+# Default to checking the default command names for their versions
+# if not overridden by environment variables
+if [ -z $AUTOMAKE ]; then
+ AUTOMAKE=automake
+fi
+
+if [ -z $AUTOCONF ]; then
+ AUTOCONF=autoconf
+fi
+
+if [ -z $LIBTOOLIZE ]; then
+ LIBTOOLIZE=libtoolize
+fi
+
+
+if $AUTOMAKE --version | grep 'automake' | grep -q '1\.7'; then
echo 'found automake 1.7'
else
echo 'automake is not version 1.7'
exit 1
fi
-if autoconf --version | grep 'autoconf' | grep -q '2\.5'; then
+if $AUTOCONF --version | grep 'autoconf' | grep -q '2\.5'; then
echo 'found autoconf 2.5 or better'
else
echo 'autoconf is not 2.5 or better'
exit 1
fi
-if libtoolize --version | grep 'libtool' | grep -q '1\.5'; then
+if $LIBTOOLIZE --version | grep 'libtool' | grep -q '1\.5'; then
echo 'found libtool 1.5'
else
echo 'libtool 1.5 is not or better'
@@ -33,12 +62,12 @@ PACKAGES=`cat Packages | while read i; d
esac
done`
echo "Checking out xtrans with forced tag XTRANS-0_1-RELEASE"
-cvs co xtrans -r XTRANS-0_1-RELEASE
+cvs co -r XTRANS-0_1-RELEASE xtrans
pushd xtrans
if [ $# -gt 0 ] ||
[ configure.ac -nt config.status ] ||
[ Makefile.am -nt config.status ]; then
- ./autogen.sh "$@"
+ ./autogen.sh --prefix=$INST_ROOT "$@"
fi
make -j2
$BUILD_EM_SUDO make install
@@ -52,7 +81,7 @@ for i in $PACKAGES; do
if [ $# -gt 0 ] ||
[ configure.ac -nt config.status ] ||
[ Makefile.am -nt config.status ]; then
- ./autogen.sh "$@"
+ ./autogen.sh --prefix=$INST_ROOT "$@"
fi
make -j2
$BUILD_EM_SUDO make install
More information about the xorg
mailing list