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

Chad Versace chad at chad-versace.us
Thu Aug 18 07:23:50 PDT 2011


Thanks for doing this, Chia-I. I like this approach.

Chad Versace
chad at chad-versace.us

On 08/18/2011 03:33 AM, Jose Fonseca 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). 
> 
> Otherwise looks great IMO. I think we should expand on this as much as we can.
> 
> 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?
>>

-- 



More information about the mesa-dev mailing list