diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -17,7 +17,7 @@ LDFLAGS = -s -w -X main.version=$(VERSION) CHECK_VERSION = case '$(VERSION)' in ''|*[!A-Za-z0-9._+-]*) echo "refusing: VERSION must contain only letters, digits, and the characters . - _ +" >&2; exit 1 ;; esac CROSS_PLATFORMS = linux/amd64 linux/arm64 freebsd/amd64 openbsd/amd64 -.PHONY: all help build install uninstall test vet fmt lint ci bench fuzz race vulncheck cross dist release deps install-hooks clean +.PHONY: all help build install uninstall test vet fmt lint ci bench fuzz race vulncheck cross dist release deps install-hooks clean gui gui-ci install-gui all: build @@ -177,5 +177,22 @@ deps: ## install the optional content extractors; may ask for privileges install-hooks: ## install the pre-commit hook that runs the leak check install -m 755 scripts/hooks/pre-commit "$$(git rev-parse --git-path hooks)/pre-commit" +# The GUI is its own module in gui/, with its own dependencies (gotk4), so +# krino's dependency gate above is unaffected. It needs cgo, a C compiler, +# GTK 4 and gobject-introspection development files. +gui: ## build ./gui/krino-gui (needs GTK 4 development files) + @$(CHECK_VERSION) + cd gui && CGO_ENABLED=1 go build -trimpath -ldflags "$(LDFLAGS)" -o krino-gui ./cmd/krino-gui + +gui-ci: ## the GUI module's gate: gofmt, vet, tests + @test -z "$$(cd gui && gofmt -l .)" || { echo "gofmt needed in gui:"; (cd gui && gofmt -l .); exit 1; } + cd gui && CGO_ENABLED=1 go vet ./... + cd gui && CGO_ENABLED=1 go test ./... + +install-gui: gui ## install krino-gui beside krino + mkdir -p $(BINDIR) + rm -f $(BINDIR)/krino-gui + install -m 755 gui/krino-gui $(BINDIR)/krino-gui + clean: ## remove build output - rm -f $(BIN) + rm -f $(BIN) gui/krino-gui |
