so maybe i'm missing something here, but here's what i'm trying to do:
test.c:
printf("HGID=%s\n", HGID);
build.sh: gcc test.c -o xxx -DHGID="\"$(hg id)\""
$HGID=12345678+ tip
all is well.
now with build.sh:
HGSTR="\"$(hg id)\""
gcc test.c -o xxx -DHGID="$HGSTR"
still okay
but if i try to change build.sh to this:
CFLAGS=-DHGID="\"$(hg id)\""
gcc test.c -o xxx $CFLAGS
the madness starts...
gcc: error: tip": No such file or directory
how do i get a quoted string with spaces to gcc in this case?