cacert-boardvoting/Makefile

23 lines
732 B
Makefile
Raw Permalink Normal View History

2017-04-18 14:07:54 +00:00
VERSION := $(shell git describe --always --dirty=-dev)
BUILD := $(shell date --iso-8601=seconds --utc)
GOFILES = $(shell find . -type f -name '*.go')
STATICFILES = $(shell find boardvoting/static/ -type f)
TEMPLATES = $(shell find boardvoting/templates/ -type f)
DBMIGRATIONS = $(shell find boardvoting/migrations/ -type f)
2017-04-18 14:07:54 +00:00
all: cacert-boardvoting
boardvoting/assets.go: $(DBMIGRATIONS) $(STATICFILES) $(TEMPLATES) $(DBMIGRATIONS) boardvoting/main.go
go generate -v ./boardvoting
cacert-boardvoting: ${GOFILES} boardvoting/assets.go
2017-04-22 12:36:05 +00:00
go build -o $@ -x -ldflags " -X 'main.version=${VERSION}' -X 'main.build=${BUILD}'"
2017-04-18 14:07:54 +00:00
clean:
rm -f cacert-boardvoting
distclean: clean
rm -f boardvoting/assets.go
.PHONY: clean distclean all