Help achieving a batch build with build variables

Ah my bad, the string escaping is a bit weird, you need to actually also include a \ character at the front and back to have it properly passed to GCC, see here.

Import ("env")

val1 = "test"
val2 = "test2"
# inject as macros into build system
env.Append(CPPDEFINES=[
   ("VALUE1_STR", "\\\"" + val1 + "\\\""),
   ("VALUE2_STR", "\\\"" + val2 + "\\\""),
])