Am 14.05.2017 um 14:35 schrieb Mathieu Lirzin:
> Hello,
>
> Thomas Martitz <ku...@rockbox.org> writes:
>>
>> If there are no other solutions, would the above idea considered if
>> someone posted a patch?
>
> I think I understand what you mean, however the issue has nothing to do
> with %reldir% which is just a convenience for not typing the current
> directory of the makefile fragment.
(unrelated, but %reldir% also enables including a fragment from more that one place, it's more that just convinience)

>
> The issue is that you can have only one default AM_*FLAGS per Makefile
> and when using a non-recursive Makefile (even with included fragments)
> everything is put in a unique Makefile.  When you have a lot of programs
> (for example in a test suite), having to define foo_*FLAGS for each
> program can indeed be cumbersome.
>
> I like the idea of allowing per directory default flags, I don't see any
> issue with such feature.
>
> Regarding the syntax, what about dropping the "AM" in front of
> AM_directory_*FLAGS like what is done for per programs _*FLAGS?  IIUC,
> it will be impossible to have conflicts between program and directory
> flags variables.

I think this is problematic if the fragment is included within the same directory, i.e. %C% expands empty (and eats the following remaining _).

Hence I suggested AM_%C%_FLAGS so it would automatically become AM_CFLAGS, although a AM_%C%_CFLAGS = $(AM_CFLAGS) could also be troublesome.

Also, I'm not planning to work on this at the moment, I'm too busy with other stuff at the moment. But it's good to know that the idea is generally sound.

Best regards.

Reply via email to