tools/libs: Don't recursively expand MAJOR ?= $(shell ...)

?= is a deferred assignment.  Switch to an alternative form which lets us use
an immediate assignment.

Before, version.sh gets run anywhere between 46 and 88 times, with 50 on a
`clean`.  After, between 6 and 12 times.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
Andrew Cooper committed 2021-12-16 20:27:12 +00:00
1 parent 989289e23f
commit a4885765ee
1 file changed
+4 -1
+4 -1
View File
@@ -6,7 +6,10 @@
# MINOR: minor version of lib (0 if empty)
LIBNAME := $(notdir $(CURDIR))
MAJOR ?= $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile)
ifeq ($(origin MAJOR), undefined)
MAJOR := $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile)
endif
MINOR ?= 0
SHLIB_LDFLAGS += -Wl,--version-script=libxen$(LIBNAME).map
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.