]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commit
build: add --full to version.sh to guess $(XEN_FULLVERSION)
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 9 Sep 2021 14:33:06 +0000 (15:33 +0100)
committerIan Jackson <iwj@xenproject.org>
Wed, 29 Sep 2021 14:29:55 +0000 (15:29 +0100)
commitab4a83023eda9f04ad864877c1956b087ec6fc4f
tree0957f666028cf0b3e9bac8154f5aac0432a39401
parent0b000a2ce8131df442d6444d2d3e0a8c7f9a1cf5
build: add --full to version.sh to guess $(XEN_FULLVERSION)

Running $(MAKE) like that in a $(shell ) while parsing the Makefile
doesn't work reliably. In some case, make will complain with
"jobserver unavailable: using -j1.  Add '+' to parent make rule.".
Also, it isn't possible to distinguish between the output produced by
the target "xenversion" and `make`'s own output.

Instead of running make, this patch "improve" `version.sh` to try to
guess the output of `make xenversion`.

In order to have version.sh works in more scenario, it will use
XEN_EXTRAVERSION and XEN_VENDORVERSION from the environment when
present. As for the cases were those two variables are overridden by a
make command line arguments, we export them when invoking version.sh
via a new $(XEN_FULLVERSION) macro.

That should hopefully get us to having ./version.sh returning the same
value that `make xenversion` would.

This fix GitLab CI's build job "debian-unstable-gcc-arm64".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
Reviewed-by: Ian Jackson <iwj@xenproject.org>
tools/Rules.mk
tools/flask/policy/Makefile.common
version.sh