[Mesa-dev] [PATCH, android-build] android-build: fix dricore build for autogenerated files

Charles, Daniel daniel.charles at intel.com
Mon Jul 23 10:22:00 PDT 2012


On Mon, Jul 23, 2012 at 9:59 AM, Charles, Daniel
<daniel.charles at intel.com> wrote:
> On Mon, Jul 23, 2012 at 7:58 AM, Chad Versace
> <chad.versace at linux.intel.com> wrote:
>> On 07/20/2012 02:41 PM, Daniel Charles wrote:
>>> Recently more files were removed from control to be auto-generated
>>> in the dricore library. Android build was not able to locate the
>>> new files if they were not created beforehand.
>>>
>>> LOCAL_SRC_FILES includes some of those files and Android.gen.mk
>>> re-defines this variable by filtering out the auto-generated files.
>>> Unfortunately for this variable it is not the same to have the SRCDIR
>>> variable defined as the current directory.
>>>
>>> By removing SRCDIR the Android build system is happy again and the new
>>> files were actually removed from the sources to use the auto generated
>>> versions.
>>>
>>> Also patch d5c1801a018efda8ac2b was partially reverted as the files
>>> can not be compiled to the LOCAL_PATH, instead they should live on the
>>> intermediates folder so that a clean can wipe them out.
>>>
>>> Change-Id: I75e86453d23f6b6f0e2a7dfb1b48272965c9fbf2
>>> Signed-off-by: Daniel Charles <daniel.charles at intel.com>
>>> ---
>>>  src/mesa/Android.gen.mk |   68 +++++--
>>>  src/mesa/Android.mk     |    1 -
>>>  src/mesa/sources.mak    |  558 +++++++++++++++++++++++------------------------
>>>  3 files changed, 330 insertions(+), 297 deletions(-)
>>>
>>> diff --git a/src/mesa/Android.gen.mk b/src/mesa/Android.gen.mk
>>> index 2ea8cc4..5443bb9 100644
>>
>>
>> Daniel,
>>
>> By removing SRCDIR from sources.mak, this patch breaks the autotools build. See
>> where SRCDIR is used in src/mesa/Makefile.am.
>
> I was thinking that sources.mak was used by Android build engine only.
>  Would it be good to have a sources.android.mak file?
>
>>
>> If you were to redefine SRCDIR in Android*.mk to $(LOCAL_PATH), would that fix
>> the Android build? If not, then we may have to resort to $(addprefix) magic.
>>
>
> The problem is that whatever prefix we add to LOCAL_SRC_FILES forces
> it to be also used when declaring the build target like this
>
> LOCAL_SRC_FILES:= $(SRCDIR)/some_file
>
> $(intermediates)/$(SRCDIR)/some_file: some_deps
>                         do_something.
>
> IMO, adding the logic for the addprefix needed for auto-tools might be
> easier, than adding a for cycle to remove the $(SRCDIR) for Android
> needs.  The relative directory is used only by autotools.
>

Or, I can just re-define SRCDIR on Makefile.am so that Android build
can avoid using it.  I will submit a new version of the patch.

>
> Thanks.
> --
> Daniel.
>
>> ----
>> Chad Versace
>> chad.versace at linux.intel.com
>>
>>


More information about the mesa-dev mailing list