cisco / ChezScheme

Chez Scheme
Apache License 2.0
6.89k stars 983 forks source link

add `CFLAGS+=...` handling to `configure` #781

Closed mflatt closed 7 months ago

mflatt commented 7 months ago

The += argument form provides a way of extending the current or default value of a compiler-configuration variable, instead of replacing it (which is something that I've often wanted). For example, CFLAGS+=-std=gnu99 adds -std=gnu99 to the C compiler flags, instead of requiring CFLAGS="-O2 -std=gnu99" to keep the default and add a new flag.

Besides providing a way to extend the default flags, += provides a way to add multiple flags in a set of configure arguments where spaces always separate the configure arguments and not flags (as long as the flags themselves do not have spaces). Using += that way helps avoid trouble when passing a set of configure arguments through YAML, environment variables, and shell scripts.