Browse Source

Fixup Makefile

Remove ifndef: ?= can be used instead
Add package to .phony
morganamilo 6 years atrás
parent
commit
8b325ce704
1 changed files with 2 additions and 4 deletions
  1. 2 4
      Makefile

+ 2 - 4
Makefile

@@ -1,13 +1,11 @@
-.PHONY: all default install uninstall test build release clean
+.PHONY: all default install uninstall test build release clean package
 
 PREFIX := /usr
 DESTDIR :=
 
-ifndef VERSION
 MAJORVERSION := 8
 MINORVERSION ?= $(shell git rev-list --count master)
-endif
-VERSION := ${MAJORVERSION}.${MINORVERSION}
+VERSION ?= ${MAJORVERSION}.${MINORVERSION}
 
 LDFLAGS := -ldflags '-s -w -X main.version=${VERSION}'
 ARCH := $(shell uname -m)