Makefile 672 B

1234567891011121314151617181920212223242526272829303132
  1. # Copyright 2023 The Rec 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 bench clean edit editor generate test
  5. all:
  6. staticcheck
  7. bench:
  8. date > log-bench
  9. go test -bench . 2>&1 | tee -a log-bench
  10. clean:
  11. rm -f *.text *.out *.test
  12. go clean
  13. edit:
  14. @touch log
  15. @if [ -f "Session.vim" ]; then gvim -S & else gvim -p Makefile ../go.mod *.go & fi
  16. editor:
  17. date > log-editor
  18. gofmt -l -s -w *.go
  19. go install -v ..
  20. go test -o /dev/null -c 2>&1 | tee -a log-editor
  21. date >> log-editor
  22. golint 2>&1 | tee -a log-editor
  23. test:
  24. date > log-test
  25. go test -v 2>&1 | tee -a log-test