Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 2024 The libfontconfig-go 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 dev download edit editor generate work test
  5. DIR = /tmp/libfontconfig
  6. TAR = fontconfig-2.14.1.tar.gz # linux/amd64
  7. URL = https://www.freedesktop.org/software/fontconfig/release/$(TAR)
  8. all: editor
  9. golint 2>&1
  10. staticcheck 2>&1
  11. clean:
  12. rm -f log-* cpu.test mem.test *.out go.work*
  13. go clean
  14. edit:
  15. @if [ -f "Session.vim" ]; then novim -S & else novim -p Makefile go.mod builder.json generator.go & fi
  16. editor:
  17. gofmt -l -s -w .
  18. go test -c -o /dev/null
  19. go install -v ./...
  20. go build -o /dev/null generator*.go
  21. download:
  22. @if [ ! -f $(TAR) ]; then wget $(URL) ; fi
  23. generate: download
  24. mkdir -p $(DIR) || true
  25. rm -rf $(DIR)/*
  26. GO_GENERATE_DIR=$(DIR) go run generator*.go
  27. go build -v ./...
  28. go test -vet=off -c -o /dev/null
  29. git status
  30. dev: download
  31. mkdir -p $(DIR) || true
  32. rm -rf $(DIR)/*
  33. echo -n > /tmp/ccgo.log
  34. GOMAXPROCS=1 GO_GENERATE_DIR=$(DIR) GO_GENERATE_DEV=1 go run -tags=ccgo.dmesg,ccgo.assert generator*.go
  35. go build -v ./...
  36. go test -vet=off -c -o /dev/null
  37. git status
  38. test:
  39. go test -vet=off -v -timeout 24h -count=1
  40. work:
  41. rm -f go.work*
  42. go work init
  43. go work use .
  44. go work use ../cc/v4
  45. go work use ../ccgo/v4
  46. go work use ../libc
  47. go work use ../libexpat
  48. go work use ../libfreetype