We caught a bug report for the following in our GNUmakefile. I'm still not quite clear on the reason for the bug (the report lacks some detail), but I want to ensure the substituion and assignment is valid for GNU Make.
SUNCC_VERSION := $(subst `,',$(shell $(CXX) -V 2>&1))
I seem to recall it is needed when using SunCC (C++) compiler and the default Solaris shell. Without the substituion the makefile produces errors when run. The error is seen when grepping SUNCC_VERSION
for version numbers.
Here is the make manual on the subject: 8.2 Functions for String Substitution and Analysis. The section does not discuss reserved characters or similar topics (other than blackslash and percent).
My question is, is the substitution valid or does it need to be fixed?