make: Don't immediately expand PROJECT_VERSION
When there is nothing to do we don't need this variable so we don't want to calculate it unnecessarily. Because this variable is only used once, when producing the .app file, we don't have to worry about the calculation being done multiple times. If we ever do then it will need to be lazily evaluated[1] instead. [1] Managing Projects with GNU Make, 3rd Edition Chapter 10 Execution speed differences: make -C deps/rabbit nope 0,02s user 0,03s system 101% cpu 0,051 total make -C deps/rabbit nope 0,02s user 0,01s system 97% cpu 0,031 total
This commit is contained in:
parent
4bfef36251
commit
1535e730de
|
@ -14,7 +14,7 @@ endif
|
|||
PROJECT_VERSION := $(RABBITMQ_VERSION)
|
||||
|
||||
ifeq ($(PROJECT_VERSION),)
|
||||
PROJECT_VERSION := $(shell \
|
||||
PROJECT_VERSION = $(shell \
|
||||
if test -f git-revisions.txt; then \
|
||||
head -n1 git-revisions.txt | \
|
||||
awk '{print $$$(words $(PROJECT_DESCRIPTION) version);}'; \
|
||||
|
|
Loading…
Reference in New Issue