我刚刚在 makefile 中看到“$${x%% *}”,这意味着 sh 中的“${x%% *}”。为什么这样写?
determine_sum = \
sum=; \
for x in sha1sum sha1 shasum 'openssl dgst -sha1'; do \
if type "$${x%% *}" >/dev/null 2>/dev/null; then sum=$$x; break; fi; \
done; \
if [ -z "$$sum" ]; then echo 1>&2 "Unable to find a SHA1 utility"; exit 2; fi
checksums.dat: FORCE
$(determine_sum); \
$$sum *.org
另外,如何${x%% *}
在谷歌中搜索?