Parcourir la source

Fixup Makefile

Remove ifndef: ?= can be used instead
Add package to .phony
morganamilo il y a 6 ans
Parent
commit
8b325ce704
1 fichiers modifiés avec 2 ajouts et 4 suppressions
  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)