Example output:
$ make help
clean Remove build directory
fmt Reformat source
fmt-check Warn if any source needs reformatting
gen-device Generate microcontroller-specific sources
llvm-source Get LLVM sources
llvm-build Build LLVM
lint Lint source tree
spell Spellcheck source tree
Might even work on windows, since git for windows comes with awk.
@if [$(NODEJS_VERSION) -lt $(MIN_NODEJS_VERSION)];thenecho"Install NodeJS version 18+ to run tests.";exit 1;fi
# Build the Go compiler.
tinygo:
tinygo:## Build the TinyGo compiler
@if [ ! -f "$(LLVM_BUILDDIR)/bin/llvm-config"];thenecho"Fetch and build LLVM first by running:";echo"$(MAKE) llvm-source";echo"$(MAKE)$(LLVM_BUILDDIR)";exit 1;fi
# revive.toml isn't flexible enough to filter out just one kind of error from a checker, so do it with grep here.
@ -964,6 +961,14 @@ lint:
go run github.com/mgechev/revive -config revive.toml compiler/... src/{os,reflect}/*.go | grep -v "should have comment or be unexported"| grep '.'| awk '{print}; END {exit NR>0}'
.PHONY:spell
spell:
# Check for typos in comments. Skip git submodules etc.
spell:## Spellcheck source tree
go run github.com/client9/misspell/cmd/misspell -i 'ackward,devided,extint,inbetween,programmmer,rela'$$( find . -depth 1 -type d | egrep -w -v 'lib|llvm|src/net')