1
I’m a novice here but stackoverflow has helped me in the past.
I’m writing a bash shell script to generate a makefile (starting small).
echo "\
include \$(GNUSTEP_MAKEFILES)/common.make
APP_NAME = $PRODUCT_NAME
$PRODUCT_NAME_OBJC_FILES = source.m
include \$(GNUSTEP_MAKEFILES)/application.make"\
> GNUmakefile
The environment variable set by the IDE where this is used is $PRODUCT_NAME. Now, bash obviously treats this script as referencing an environment variable $PRODUCT_NAME_OBJC_FILES. I see why, but I don’t know how to get around it. Any pointers?
$PRODUCT_NAME is evaluated as appropriate when the underscore isn’t following immediately afterwards, but the extra space messes things up down the line.
If you want to get serious about bash shell scripts, you might want to read the Advanced Bash Scripting Guide (aka as "ABS").
– JanC – 2010-08-23T22:12:20.857