getEnv package:shake

Return Just the value of the environment variable, or Nothing if the variable is not set. The environment variable is tracked as a dependency, and if it changes the rule will rerun in subsequent builds. This function is a tracked version of getEnv / lookupEnv from the base library.
flags <- getEnv "CFLAGS"
cmd "gcc -c" [out] (maybe [] words flags)
A partial variant of getEnv that returns the environment variable variable or fails.
getEnvWithDefault def var returns the value of the environment variable var, or the default value def if it is not set. Similar to getEnv.
flags <- getEnvWithDefault "-Wall" "CFLAGS"
cmd "gcc -c" [out] flags