bake
bake copied to clipboard
Variable and command substitution
In Makefile we could substitute a command with an variable, and running with alternatives: make CC=clang++ test:
CC = g++
test:
$(CC) foo.cc
Though this is related to Makefile syntax, it might still be worth to consider it. XD
use bash syntax!
CC='g++'
test:
${CC} foo.cc
Leaving this open for others.
CC='g++'
test:
${CC} foo.cc
Tested on latest bake(v0.6.1) the variable was not been populated in bash environment with above Bakefile.
Anyway it could be done with:
test:
CC='g++'
${CC} foo.cc
might need to be exported. will experiment.
things are in a state of flux :)
This currently works!
test:
${CC} foo.cc
CC='g++'
Not when it's above the tasks. Should be easy to correct (need some regex or something!).
Now, the following works:
CC='g++'
test:
${CC} foo.cc
:sparkles: :cake: :sparkles: