[Mesa-dev] [RFC PATCH] automake: add support to src/glsl/
Dan Nicholson
dbn.lists at gmail.com
Fri Sep 30 05:54:59 PDT 2011
Hi Matt,
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.
Sorry for not replying sooner. I've been too busy to attend to my
rapidly growing inbox.
I agree wholeheartedly with the change to automake, although I think
eventually you need Brian's buy in. Despite its flaws, the custom
Makefile system has worked for a lot of years. That said, I think some
of the issues can be conquered with documentation and education. I
also think the best feature of the current system, the static
configuration templates in configs/, can be emulated under autotools.
Anyway, I haven't looked closely at the patch, but I would echo
Gaetan's sentiment to start at the root Makefile.am and work down. I
did some work on this before I got busy. The commits are not really
clean, but you can get them in the automake branch in ~dbn/mesa.git on
annarchy. I think there's definitely a way to move along piecemeal
with a few suggestions:
- Don't feel the need to completely transform a whole Makefile in one
shot. This patch works on a fairly standalone piece, but once you get
into the intertwined parts you either end up with a megacommit or find
a way to work with smaller pieces. You can use the -local automake
targets to point to the existing rules instead of changing to the
automatic rules immediately.
- Some of the current make variables are constructed in
configs/default and configs/autoconf right now. You'll either need to
expand those in each Makefile you convert or just continue to source
$(top_builddir)/configs/current for a while.
- The default targets in the old Makefiles need to be changed to all
so the the root automaked Makefile calls the right thing when
descending.
I'm sure there's a ton of other gotchas. Anyway, I hope to get back to
this sometime.
--
Dan
More information about the mesa-dev
mailing list