[PATCH] Xgl doesn't compile with Mesa HEAD > 0821

Dan Nicholson dbn.lists at gmail.com
Mon Aug 28 08:57:58 PDT 2006


On 8/28/06, Brian Paul <brian.paul at tungstengraphics.com> wrote:
>
> It would be nice if we could add/remove/rename Mesa sources files
> without always breaking the x.org build (or having to change x.org
> makefiles/scripts, etc.).
>
> All the main Mesa sources are listed in the src/mesa/sources file.
> Excerpts:
>
> MAIN_SOURCES = \
>         main/api_arrayelt.c \
>         main/api_loopback.c \
>         main/api_noop.c \
>         main/api_validate.c \
>         main/accum.c \
>         main/attrib.c \
> [...]
>
> SWRAST_SOURCES = \
>         swrast/s_aaline.c \
>         swrast/s_aatriangle.c \
>         swrast/s_accum.c \
> [...]
>
> Perhaps a script/automake person could modify symlink-mesa.sh,
> Makefile.am, etc. to use/include this file and solve the problem.

I took a quick hack at this. Immediately, the problem is that Xorg
needs to symlink a lot of header files that aren't listed in
src/mesa/sources. Even then, Xorg doesn't need all the C source files
that are listed there, but that can't hurt too bad.

For the curious, here's the hack I put together by using here
documents to GNU make to echo out the variables from the sources file.

$ cat mlink.sh
#!/bin/sh

if [ -z $1 ]; then
        echo "Error: missing src dir"
        exit 1
fi
SRC_DIR=`( cd $1 ; pwd )`

print_sources() {
        make -f - sources << EOF
include $SRC_DIR/src/mesa/sources
sources:
        @echo \$($1)
EOF
}

print_sources MAIN_SOURCES

--
Dan



More information about the xorg mailing list