Hi y'all! I have some defines like this:
That I use like this (eg):Code:#define DIR "path" #define FILE "file"
No problem. However, I want to include another define that is passed to the compiler on the command line or in a makefile, taken from an environment variable, eg:Code:fopen(DIR"/"FILE, "r");
But different rules seem to apply because of the shell and special characters such as '/'. I could do this:Code:export WROOT=/some/path gcc -DROOT=$WROOT
Which prevents the shell screwing up on "/", but I cannot include an environment variable in single quotes for the same reason -- the shell will then just pass '$WROOT' thru literally.Code:gcc -D'ROOT=/some/path'
Anyone know of a way around this?