2022-03-25 19:02:05 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
SHELL = /bin/sh
|
2022-02-01 19:51:53 +00:00
|
|
|
|
2022-03-25 19:02:05 +00:00
|
|
|
#### Start of system configuration section. ####
|
2022-02-01 19:51:53 +00:00
|
|
|
|
2022-03-25 19:02:05 +00:00
|
|
|
srcdir = .
|
2022-02-01 19:51:53 +00:00
|
|
|
|
2022-03-25 19:02:05 +00:00
|
|
|
GO ?= go
|
2022-06-09 23:12:21 +00:00
|
|
|
GOFLAGS ?= -buildvcs=true
|
2022-03-25 19:02:05 +00:00
|
|
|
EXECUTABLE ?= indieauth
|
2022-02-01 19:51:53 +00:00
|
|
|
|
2022-03-25 19:02:05 +00:00
|
|
|
#### End of system configuration section. ####
|
2022-02-01 19:51:53 +00:00
|
|
|
|
2022-03-25 19:02:05 +00:00
|
|
|
.PHONY: all clean check help
|
2022-02-01 19:51:53 +00:00
|
|
|
|
2022-06-10 09:11:35 +00:00
|
|
|
all: main.go
|
|
|
|
$(GO) build -v $(GOFLAGS) -o $(EXECUTABLE)
|
2022-03-18 20:10:54 +00:00
|
|
|
|
2022-03-25 19:02:05 +00:00
|
|
|
clean: ## Delete all files in the current directory that are normally created by building the program
|
2022-03-26 11:21:06 +00:00
|
|
|
-rm $(srcdir)/internal/testing/httptest/{cert,key}.pem
|
2022-03-25 19:02:05 +00:00
|
|
|
$(GO) clean
|
2022-02-01 19:51:53 +00:00
|
|
|
|
2022-03-25 19:02:05 +00:00
|
|
|
check: ## Perform self-tests
|
2022-03-26 11:21:06 +00:00
|
|
|
$(GO) generate $(srcdir)/internal/testing/httptest/...
|
2022-03-25 19:02:05 +00:00
|
|
|
$(GO) test -v -cover -failfast -short -shuffle=on $(GOFLAGS) $(srcdir)/...
|
|
|
|
|
|
|
|
.PHONY: help
|
|
|
|
help: ## Display this help screen
|
|
|
|
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|