mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
Compute version only once
In a make-file the =-assignment is replaced textually each time it is referenced, which leads to the shell fragments to be executed each time. Use the :=-assignment instead, which computes the value only once. Signed-off-by: Andrew McMillan <andrew@morphoss.com>
This commit is contained in:
parent
83b11a162d
commit
05613124ce
10
Makefile
10
Makefile
@ -1,11 +1,11 @@
|
||||
#!/usr/bin/make -f
|
||||
#
|
||||
|
||||
package=davical
|
||||
majorversion = $(shell sed -n 's:\([0-9\.]*\)[-a-f0-9-]*:\1:p' VERSION)
|
||||
gitrev = 0
|
||||
version = $(majorversion)
|
||||
issnapshot = 0
|
||||
package := davical
|
||||
majorversion := $(shell sed -n 's:\([0-9\.]*\)[-a-f0-9-]*:\1:p' VERSION)
|
||||
gitrev := 0
|
||||
version := $(majorversion)
|
||||
issnapshot := 0
|
||||
snapshot : gitrev = $(shell git rev-parse --short HEAD)
|
||||
snapshot : version = $(majorversion)-git$(gitrev)
|
||||
snapshot : issnapshot = 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user