On Mon, 23 Jun 2025, Pali Rohár wrote:

I was trying to do it via some foreach, but I have not figured out how.
The problem is that the Makefile.am is processed by GNU automake which
process those those <target>_CFLAGS variables. And if the automake does
not see <target>_CFLAGS then into target it puts $(AM_CFLAGS).

Syntax $(foreach, ...) is from GNU make which GNU automake does not
understand. So GNU automake let $(foreach, ...) as is. So it is
propagated into the final Makefile, but as automake does not see it, it
does not put $(<target>_CFLAGS) usage into target itself.

So in my opinion, this is not possible.

Another idea how to deal with it could be to put all tests into separate
Makefile.am and use recursive build mode. In separate Makefile.am those
flags can be set in own AM_CFLAGS which would not be shared with the
main mingw-w64-crt AM_CFLAGS.

That's probably a better idea indeed. Or if nobody really is running these tests in the current location anyway, we could also just move them out from mingw-w64-crt into a different directory. But a recursive makefile is also ok with me - whichever is simpler.

// Martin

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to