[Mesa-dev] [RFC-PATCH 0/2] share source lists between scons and make

Chia-I Wu olvaffe at gmail.com
Thu Aug 18 10:18:16 PDT 2011


On Thu, Aug 18, 2011 at 6:33 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
> I think this is great. Thanks for stepping up and doing this, Olv!
>
> Concerning the implementation, my only suggestion is that it might be useful to have the ability to specify the include name (but maybe leave 'sources.mak' as default value).
I will check how to do that.  I am not familiar with SCons enough.
The changes to scons/custom.py are based on trial and error ;)
> Otherwise looks great IMO. I think we should expand on this as much as we can.
Cool.  I will get back at this series once I am done with the initial
Android support.


> Jose
>
> ----- Original Message -----
>> The goal of this RFC series is to allow scons and make to share the
>> source lists.  The source lists of Makefile's are constantly changing
>> and we have had enough "fix SCons build" in the git log.
>>
>> For that to be possible, source lists in Makefile's are expected to
>> be
>> factored out to sources.mak.  Makefile can include sources.mak
>> directly.
>> The first patch allows SConscript to include sources.mak through the
>> ParseSourcesMak method.  The second patch converts gallium/auxiliary
>> to
>> make use of the new method, as an example.
>>
>> The syntax of sources.mak is a very small subset of GNU Make.
>> Currently, only :=, +=, and simple variable dereference are
>> supported.
>> While being small, it already allows us to do something like
>>
>>   C_SOURCES := \
>>     foo.c \
>>     bar.c
>>
>>   # these files are generated
>>   GENERATED_SOURCES := gen.c
>>
>>   C_SOURCES += $(GENERATED_SOURCES)
>>
>> I could not find a Makefile parser for python so I have to write
>> one (simple, less than 100 lines) from scratch.
>>
>> Ideas?
>>
>



-- 
olv at LunarG.com


More information about the mesa-dev mailing list