From 9e1c4fbb9901082f6437d3bd7f2e235e98e5c4ac Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Sat, 7 Jul 2018 10:57:27 -0700 Subject: update makefile for docs/releases --- Makefile | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 237e631..7cdbd93 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,22 @@ +BINARY=neko +VERSION=0.2 +BUILD=`git rev-parse HEAD` + +LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD}" + + SOURCES = $(wildcard *.go) $(wildcard */*.go) BINARIES = nekoweb nekocrawl -DEPS = github.com/mmcdole/gofeed github.com/abbot/go-http-auth github.com/axgle/mahonia github.com/go-sql-driver/mysql github.com/microcosm-cc/bluemonday - -default: $(BINARIES) +default: build +all: clean build_all -$(BINARIES): $(SOURCES) - go build +build: + go build ${LDFLAGS} -o ${BINARY} -.PHONY: deps run +install: + go install -.PHONY: run -deps: - go get $(DEPS) -run: - ./neko -update -serve +docs: + ghmarkdown README.md > readme.html -- cgit v1.2.3