[Mesa-dev] [RFC PATCH] automake: add support to src/glsl/

Dan Nicholson dbn.lists at gmail.com
Fri Sep 30 05:56:43 PDT 2011


On Sat, Sep 24, 2011 at 6:06 PM, Matt Turner <mattst88 at gmail.com> wrote:
> Signed-off-by: Matt Turner <mattst88 at gmail.com>
> ---
> The last discussion about using automake ("[RFC] Convert mesa to automake/libtool")
> ended without anything happening, probably because the branch wasn't ready.
>
> This patch is an attempt to get the ball rolling again. Without ripping out
> the entire existing build system in one swat, it attempts to gradually replace
> it directory by directory with automake.
>
> The patch has a few problems currently, and a few things that can possibly be
> done better:
>        - Mainly, that building libmesa.a currently fails.
>        - Not sure how to handle shared/static dricore options.
>        - libtool defines VERSION (-DVERSION=...), which screws up the VERSION
>          token in glsl_lexer.ll and glsl_parser.yy. I trivially renamed it.
>        - libralloc.la can probably be combined into libglslcore.la, and not
>          have to be added to every _LDADD line.
>        - The rules for flex and bison can probably be eliminated by using
>          YFLAGS and LFLAGS. I tried, but ylwrap gave me some error.
>
> I also killed off what looks to be a stray autogen.sh in src/glsl/.
>
> Please give it a test.
>
> Thanks,
> Matt
>
>  configure.ac            |   10 ++
>  src/glsl/Makefile       |  235 -----------------------------------------------
>  src/glsl/Makefile.am    |  146 +++++++++++++++++++++++++++++
>  src/glsl/autogen.sh     |   12 ---
>  src/glsl/glsl_lexer.ll  |    4 +-
>  src/glsl/glsl_parser.yy |    6 +-
>  6 files changed, 161 insertions(+), 252 deletions(-)
>  delete mode 100644 src/glsl/Makefile
>  create mode 100644 src/glsl/Makefile.am
>  delete mode 100755 src/glsl/autogen.sh
>
> diff --git a/configure.ac b/configure.ac
> index b2606bf..fd1082d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -17,6 +17,13 @@ AC_INIT([Mesa],[mesa_version],
>  AC_CONFIG_AUX_DIR([bin])
>  AC_CANONICAL_HOST
>
> +# Initialize Automake
> +AM_INIT_AUTOMAKE([foreign dist-bzip2])
> +AM_MAINTAINER_MODE
> +
> +# Initialize libtool
> +AC_PROG_LIBTOOL
> +
>  dnl Save user CFLAGS and CXXFLAGS so one can override the default ones
>  USER_CFLAGS="$CFLAGS"
>  USER_CXXFLAGS="$CXXFLAGS"
> @@ -2010,3 +2017,6 @@ echo "        PYTHON2:         $PYTHON2"
>  echo ""
>  echo "        Run '${MAKE-make}' to build Mesa"
>  echo ""
> +
> +AC_CONFIG_FILES([src/glsl/Makefile])
> +AC_OUTPUT

Just a quick note that there are already AC_CONFIG_FILES and AC_OUTPUT
calls in configure.ac, so you should be able to use those.

--
Dan


More information about the mesa-dev mailing list