Makefile: Abstract out "identify the pkgversion" code
commit57b49737ae467fd95504de7b2d755a994e7cec4b
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 7 Mar 2019 14:26:47 +0000 (7 14:26 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 7 Mar 2019 14:26:47 +0000 (7 14:26 +0000)
tree3c9035fd66bad6498c05254187568cfcf446751c
parent5f71eac06e15b9a3fa1134d446f0ca2d52e45f0a
Makefile: Abstract out "identify the pkgversion" code

Abstract out the "identify the pkgversion" code from the
rule for creating qemu-version.h, so it sets makefile
variables for QEMU_PKGVERSION and QEMU_FULL_VERSION.
(We will want to use these when building the Sphinx docs.)

NB: As we abstract this out, we use -e to check for .git
rather than -d, since in some situations .git may be a file
rather than a directory.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Acked-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20190305172139.32662-11-peter.maydell@linaro.org
Message-id: 20190228145624.24885-11-peter.maydell@linaro.org
Makefile