[Mesa-dev] [PATCH 4/5] driconf: Add translation-generation to build system, don't track generated files

Chad Versace chad.versace at linux.intel.com
Wed Dec 5 09:48:22 PST 2012


On 12/04/2012 03:53 PM, Carl Worth wrote:
> Another approach, (and something we did for the cairo project), would be
> to put things like lists of filenames needed for the build into a simple
> file that could be included by either Makefile.am or Android.mk. That
> would at least eliminate one source of duplication.
> 
> For example, see this Makefile.sources in the cairo tree:
> 
> 	http://cgit.freedesktop.org/cairo/tree/src/Makefile.sources

We already do this in Mesa. In some places, the file is named
Makefile.sourcce; in other places, sources.mak.

Of course, this doesn't help for generated files.

> With both Android and automake targeting a common "make" tool, there
> should be an opportunity to do even more sharing than cairo is able to
> do, (where the Makefile.win32 is aimed at a fairly-incompatible make
> tool on Windows).
> 
> Chad, you and I should probably talk more in person the next time we're
> in the office together.

It may be possible to share rules for the generated files, but, based
on experience in maintaining the Android makefiles, I expect
such sharing to make the situation worse due to heightened complexity.
Or, it may not be possible at all. Beware of the uncanny valley:
the Android build systems looks deceptively like simple Makefiles until
you dig further in. I really think the best option is to generate the
Android makefiles with a tool.

Despite my skepticism, we should still plan to talk in person over this.
Together, we may be able to arrive at a feasible solution. Let's plan
to do that shortly after we ship the next Mesa release.

> In the meantime, the patch series that initiated this conversation adds
> a Makefile.am to the src/mesa/drivers/dri/common/xmlpool to generate an
> options.h file, (one of those complex case you mentioned of using a
> local python program to generate some code).
> 
> Can you contribute whatever changes are necessary to Android.mk files so
> that I could push this series?

I'll push a branch today that adds the necessary Android changes to your
series, and inform you when I do.

-Chad



More information about the mesa-dev mailing list