I saw a Makefile that looks like:
TESTTMP = ./test-tmp
# VANILLA REDIS CONF
.ONESHELL: # what's it used for?
mkdir -p $(TESTTMP)
echo "$$VANILLA_CONF" | redis-server - # what does this look like when expanded, equivalent to what command?
rm -rf $(TESTTMP)
kill `cat $(TESTTMP)/redis_vanilla.pid` || true # what's "|| true"
If you want to see the output of
echo $$VANILLA_CONF, then simply remove the
| redis-server -, and the output will be displayed on your screen.
|| shell connector means ‘or’: if (and only if) the command before the
|| fails, then the command after it is executed. In this case, the command after the
true, which always succeeds. That is, this line in the
stop rule will succeed even if the
kill fails (there are other ways to express this in Makefile syntax, but I think this is clearer).