Improving Xorg

Alan Coopersmith alan.coopersmith at sun.com
Fri Jun 30 14:48:33 PDT 2006


Barry Scott wrote:
> build-from-tarballs.sh will not compile unless you install each part 
> built into the
> runtime location on the build system. DESTDIR is not honored for include 
> files
> for example. Further some of the modules depend on a built and installed 
> Mesa
> to compile. And Mesa depends on X11 stuff. build-from-tarballs.sh has to 
> be split
> into before Mesa and after Mesa builds.
> 
> This all means that it is hard to build modular without modifing 
> build-from-tarballs.sh
> and having a build machine that you can sacrifice to the build process.

I've been building modular for about a year now using a bunch of custom
wrappers around build.sh I wrote to allow using a DESTDIR and not installing
on the build machines.

I have a single checkout of cvs/git sources and use lndir to make links to
it from directories in which I build 32-bit & 64-bit on both SPARC & x86/x64
for Solaris, and even gcc vs. Sun compilers.

I also use a install.sh hacked to skip the install of any file name ending
in .la.

They do things like this:

MYTOPDIR=/export/sata/alanc/X.org/mod
MYARCHDIR=`pwd | sed 's%^.*/export/sata/alanc/X.org/mod/\([a-z0-9\-]*\).*$%\1%'`
MYUTILSDIR=${MYTOPDIR}/myutils

PREFIX=/usr/X11R6
DESTDIR=${MYTOPDIR}/${MYARCHDIR}/install
INSTDIR=${DESTDIR}${PREFIX}

export DESTDIR

case $MYARCHDIR in
     *-gcc)
         CC="gcc" CXX="g++" F77="g77" CFLAGS_64="-m64"
         GENERIC_CFLAGS="-O2 -Wall"
         ;;
     *)
         CC="cc" CXX="CC" F77="f77" CFLAGS_64="-xarch=generic64"
         GENERIC_CFLAGS="-v -xO4 -xbuiltin=%all -xlibmil -xstrconst -xildoff"
         ;;
esac


if [ x$DEBUG = x1 ] ; then
     GENERIC_CFLAGS="-g -v"
fi

case $MYARCHDIR in
     amd64*|sparcv9*)    ARCHFLAG="${CFLAGS_64}" ; LIBSUBDIR="/64" ;;
     *)                  ARCHFLAG="" ; LIBSUBDIR="" ;;
esac

ACLOCAL="aclocal -I ${MYTOPDIR}/aclocal"
INSTALL="${MYUTILSDIR}/install-sh -c" CPPROG="cp -p"
CPPFLAGS="-I${INSTDIR}/include"
CFLAGS="${GENERIC_CFLAGS} ${ARCHFLAG}"
CXXFLAGS="${ARCHFLAG}"
LDFLAGS="-z combreloc -z defs -L${INSTDIR}/lib -R${PREFIX}/lib 
-R/usr/lib${LIBSUBDIR} ${MAPFILE}"
PATH="/usr/ccs/lib:${INSTDIR}/bin:/export/sata/alanc/libtool/install/bin:$PATH:/export/sata/alanc/gperf/install/bin/"
CONFFLAGS="--enable-shared --disable-static --disable-install-setuid 
--enable-xcsecurity --sysconfdir=/etc --localstatedir=/var --prefix=/usr/X11R6 
--enable-loadable-i18n --enable-kdrive"
PKG_CONFIG_PATH="${MYUTILSDIR}/pkgconfig:${INSTDIR}/lib/pkgconfig:/usr/lib${LIBSUBDIR}/pkgconfig"
LD_LIBRARY_PATH="${INSTDIR}/lib:/usr/lib${LIBSUBDIR}"
LD=$CC

export CC CXX F77 INSTALL CPPROG CFLAGS CPPFLAGS CXXFLAGS LDFLAGS PATH
export CONFFLAGS PKG_CONFIG_PATH LD_LIBRARY_PATH ACLOCAL LD

./util/modular/build.sh -n ${PREFIX}

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering



More information about the xorg mailing list