[Skiboot] [PATCH v3 4/4] external: use skiboot make_version script
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Thu Mar 10 21:43:01 AEDT 2016
On 03/09/2016 06:00 PM, Cédric Le Goater wrote:
> Let's version like skiboot and other external tools do. There is no
> need to generate a version.c file. Defining VERSION on the compile
> commande line is enough.
Cedric,
>
> Signed-off-by: Cédric Le Goater <clg at fr.ibm.com>
> ---
> external/xscom-utils/Makefile | 4 ++--
> external/xscom-utils/getscom.c | 6 +-----
> external/xscom-utils/getsram.c | 6 +-----
> external/xscom-utils/putscom.c | 6 +-----
> skiboot.spec | 2 +-
> 5 files changed, 6 insertions(+), 18 deletions(-)
>
> diff --git a/external/xscom-utils/Makefile b/external/xscom-utils/Makefile
> index b5d0d1cd9003..ca9e37897b7e 100644
> --- a/external/xscom-utils/Makefile
> +++ b/external/xscom-utils/Makefile
> @@ -1,7 +1,7 @@
> all: getscom putscom getsram
>
> -VERSION=0.1
> -CFLAGS=-O2 -g -Wall -m64 -DVERSION=$(VERSION)
> +XSCOM_VERSION ?= $(shell ../../make_version.sh xscom-utils)
> +CFLAGS=-O2 -g -Wall -m64 -DVERSION=\"$(XSCOM_VERSION)\"
This won't work if we do something like "make CFLAGS=<flags>".
You may want to introduce version.c (something similar to opal-prd).
-Vasant
More information about the Skiboot
mailing list