OP has something of a point: contrast the locale-dependent behavior of sort(1)
with make's $(sort):
$ echo 'L:=$(sort B a)' | make -f - -p 2>&1 | grep '^L '
L := B a
$ { echo B; echo a; } | sort
a
B
$ { echo B; echo a; } | LC_ALL=C sort
B
a
$
I present this more to provoke "we can't change that!
Below, a patch for a comment fix in variable.c. The original was
sufficiently obscure that you'll want to check my rewrite does in fact
have the correct meaning:
---cut here---
Index: variable.c
===
RCS file: /sources/make/make/variab