summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDan McGregor <dan.mcgregor@usask.ca>2016-03-15 07:53:14 -0600
committerDan McGregor <dan.mcgregor@usask.ca>2016-03-15 07:55:06 -0600
commitdb3905c0a39423057ad720dd84764f5a64de5312 (patch)
tree592b3d0d4a48a5d3ca55835732d30ebe1842d8b5 /Makefile
parent9df5c39bca6fb397449525b0f1eb0d24d993439f (diff)
downloadgitea-db3905c0a39423057ad720dd84764f5a64de5312.tar.gz
gitea-db3905c0a39423057ad720dd84764f5a64de5312.zip
Make go's build flags a variable
This allows the user to specify build flags from the make command line. For example to force a complete rebuild one could use: make BUILD_FLAGS='-v -a' TAGS="sqlite"
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d1be2bbc8f..1af8726c44 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less)
GENERATED := modules/bindata/bindata.go public/css/gogs.css
TAGS = ""
+BUILD_FLAGS = "-v"
RELEASE_ROOT = "release"
RELEASE_GOGS = "release/gogs"
@@ -16,14 +17,14 @@ NOW = $(shell date -u '+%Y%m%d%I%M%S')
.IGNORE: public/css/gogs.css
build: $(GENERATED)
- go install -v -ldflags '$(LDFLAGS)' -tags '$(TAGS)'
+ go install $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(TAGS)'
cp '$(GOPATH)/bin/gogs' .
govet:
go tool vet -composites=false -methods=false -structtags=false .
build-dev: $(GENERATED) govet
- go install -v -race -tags '$(TAGS)'
+ go install $(BUILD_FLAGS) -race -tags '$(TAGS)'
cp '$(GOPATH)/bin/gogs' .
pack: