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

Gaetan Nadon memsize at videotron.ca
Sun Sep 25 15:04:24 PDT 2011


On Sun, 2011-09-25 at 16:55 -0400, Matt Turner wrote:

> On Sun, Sep 25, 2011 at 4:22 PM, Gaetan Nadon <memsize at videotron.ca> wrote:
> > If you are moving towards a non-hacked automake world, the INSTALL variable
> > should not be used for mesa makefiles. It all depends on the end goals and
> > the motivation behind the conversion to automake which has not been
> > explained yet.
> 
> Personally, being able to do out-of-tree builds is a big improvement
> by switching to automake.
> 
> Dan lists a number of other benefits in his first email here:
> http://lists.freedesktop.org/archives/mesa-dev/2010-May/000431.html
> 

Sure, I was wondering if there were something specific to watch for in
mesa.

> >> There is a 'configuration' file. How will the automake makefiles take that
> >> into account.
> >
> > I would think the configs/autoconf file is something we'd kill off
> > after the last static Makefile is gone.
> >
> >> It looks like there are 'conflicts' between mesa makefiles and automake
> >> which is expected due to the size of the project. Some preparation work
> >> should be done upfront to make both system coexist and then have automake
> >> gradually replace mesa makefiles. This would be useful work anyway.
> >
> > There's definitely some clean ups to be done, that's for sure.
> >
> > Regarding Makefile.am: Use $(VAR) rather than @VAR@ Automake has an
> > explanation for that.
> >
> > You will need AC_CONFIG_HEADERS, there will too many -D on the command line.
> >
> > 	-I../../include can be $(top_srcdir/include) Easy to read, easy to copy
> > even across makefiles at any depth
> 
> Good, I'll make those two changes. Similarly, we have a lot of -D
> flags like -DFEATURE_GL=1. I suppose they are best left in CPPFLAGS?

Actually preprocessor directives (-I -D) go in AM_CPPFLAGS. Compiler
flags go in AM_CFLAGS.
Neither CPPFLAGS nor CFLAGS should be set in configure.ac or in the
makefile, except for a configuration test (in configure.ac) where they
are saved and restored. This allows builder to have the final say in the
compiler flags to use for the build as per Automake.

A reminder to use AM_CONDITIONAL in makefile rather than plain
variables. It takes care of doing a correct tarball with 'make dist'.
Saves having to maintain two lists of SUBDIRS to traverse.

> 
> Thanks,
> Matt


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110925/73ea41e9/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110925/73ea41e9/attachment-0001.pgp>


More information about the mesa-dev mailing list