821fbe3a seems to have broken compilation on Solaris:
sh: syntax error at line 1: `(' unexpected *** Error code 2 The following command caused the error: MAKE="`if [ "xmake" = "x" ]; then echo "${MAKE-make}"; else echo "make"; fi`" export MAKE && "${MAKE}" `$MAKE force --no-print-directory >/dev/null 2>&1 && echo --no-print-directory || :` "MAKE=${MAKE}" "CONFIGUREARGS=" "BUILDDIR=build/${PIKE_BUILD_OS:-`uname -s -r -m|sed "s/ /-/g"|tr "[A-Z]" "[a-z]"|tr "/()" "___"`}" METATARGET= _make_in_builddir
Frankly I don't understand the change; the double quotes inside the backquotes need to be escaped, otherwise they end the double-quoted string which starts with "BUILDDIR=... Different quotes do not nest in sh, when a startquote is found the matching end quote is looked for using only the rules which applies to the start quote. So to have "s inside a double-quoted string (which also happens to contain a couple of backquotes), they need to be escaped.
The reason for it was that Anders Johansson got this after my previous commit 3c1d3a7 (I think he used 7.4 but I'm not entirely sure):
/bin/sh: command substitution: line 0: syntax error near unexpected token `(' /bin/sh: command substitution: line 0: `uname -s -r -m|sed "s/ /-/g"|tr "[A-Z]" "[a-z]"|tr "/()" "___"'
My patch was sloppy since I didn't really figure out exactly why that happened, but removing the escapes worked for him, and for myself it works either way (which is odd in itself).
You're right $(BUILDDIR) always is used inside ", so they ought to be escaped there. I can't find any difference in this regard between 7.4, 7.6, 7.8 and 7.9 either. I guess I need to look into Anders problem more closely.
Hm, maybe using
`if [ -n "$$var" ]; then echo "$$var"; else xxx; fi`
is more portable than
$${VAR:-`xxx`}
?
pike-devel@lists.lysator.liu.se