doc: make doc-only -> fallback to user binary
Checklist
-
tests and code linting passes -
a test and/or benchmark is included -
documentation is changed or added -
the commit message follows commit guidelines
Affected core subsystem(s)
build
, doc
Description of change
Fixes:
When checking out a fresh clone or rm -rf out/
or rm ./node
make doc-only was not working (Mac OS), failing to find ./node
. I think this has slipped, because likely contributors have at least some binary, from e.g. a build of another branch still in out/
.
This then would check if $(NODE)
was set correctly take it or fallback to a user pre-installed node
binary.
Bash syntax and implementation is a little too clever unfortunately, but I guess that won't hurt anyone there.