SHELL := /bin/bash TARGETS := skate-conv skate-cluster skate-to-doi skate-bref-id skate-from-unstructured skate-wikipedia-doi skate-dot skate-map skate-reduce PKGNAME := skate .PHONY: test test: go test -cover -v ./... .PHONY: generate generate: go get golang.org/x/tools/cmd/stringer && go generate .PHONY: all all: generate $(TARGETS) go mod tidy %: cmd/%/main.go go build -o $@ $< .PHONY: clean clean: rm -f $(TARGETS) rm -f $(PKGNAME)_*.deb rm -rf packaging/debian/$(PKGNAME)/usr .PHONY: deb deb: all mkdir -p packaging/debian/$(PKGNAME)/usr/local/bin cp $(TARGETS) packaging/debian/$(PKGNAME)/usr/local/bin cd packaging/debian && fakeroot dpkg-deb --build $(PKGNAME) . mv packaging/debian/$(PKGNAME)_*.deb .