Reputation: 623
I have a shell variable in a for loop and I would like to indicate the end of the name of this variable:
$(DEBUG)for extblock in $(EXT_BLOCKS_LIST); \
do cat syn/ext_$$extblock_syn.tcl >> syn/$(SYN_TCL_SCRIPT); \
done;
My variable is only $$extblock but make takes $$extblock_syn as variable.
I don't achieve to put () correctly. Is there another character to indicate the end of a variable name?
Upvotes: 0
Views: 109
Reputation: 33704
Try this:
do cat syn/ext_$${extblock}_syn.tcl >> syn/$(SYN_TCL_SCRIPT);\
Braces can be used as delimiters. Also see the bash manual on shell parameter expansion.
Upvotes: 2