Makefile 800 B

1234567891011121314151617181920212223242526272829303132
  1. # Copyright 2023 The Knuth Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style
  3. # license that can be found in the LICENSE file.
  4. .PHONY: all clean edit editor test
  5. all:
  6. go generate -v ./... || true # https://github.com/golang/go/issues/13440
  7. # grep -nir 'knuthw\|\<2022\>\|pdftex' || true
  8. gofmt -l -s -w .
  9. go build -v ./...
  10. go test -count=1 ./... 2>&1 | tee log-editor
  11. go install -v ./cmd...
  12. # golint ./...
  13. staticcheck
  14. clean:
  15. rm -f cpu.test mem.test *.out
  16. go clean
  17. edit:
  18. @touch log
  19. @if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile go.mod builder.json *.go & fi
  20. editor:
  21. @grep -nir 'knuthw\|\<2022\>\|pdftex' || true
  22. @find -name \*.pdf -or -name \*.pas
  23. gofmt -l -s -w *.go
  24. go test 2>&1 | tee log-editor
  25. test:
  26. go test -v -count=1 ./...