diff options
-rw-r--r-- | external/xscom-utils/Makefile | 5 | ||||
-rw-r--r-- | external/xscom-utils/getscom.c | 6 | ||||
-rw-r--r-- | external/xscom-utils/getsram.c | 6 | ||||
-rw-r--r-- | external/xscom-utils/putscom.c | 6 | ||||
-rw-r--r-- | skiboot.spec | 2 |
5 files changed, 7 insertions, 18 deletions
diff --git a/external/xscom-utils/Makefile b/external/xscom-utils/Makefile index b5d0d1cd..f944ff3a 100644 --- a/external/xscom-utils/Makefile +++ b/external/xscom-utils/Makefile @@ -1,7 +1,8 @@ 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 +override CFLAGS += -DVERSION=\"$(XSCOM_VERSION)\" getscom: getscom.c xscom.c $(CC) $(CFLAGS) -o $@ $^ diff --git a/external/xscom-utils/getscom.c b/external/xscom-utils/getscom.c index 96dcace4..81893dfa 100644 --- a/external/xscom-utils/getscom.c +++ b/external/xscom-utils/getscom.c @@ -74,10 +74,6 @@ static void print_chip_info(uint32_t chip_id) } -#define VERSION_STR _str(VERSION) -#define _str(s) __str(s) -#define __str(s) #s - int main(int argc, char *argv[]) { uint64_t val, addr = -1ull; @@ -112,7 +108,7 @@ int main(int argc, char *argv[]) list_chips = true; break; case 'v': - printf("xscom utils version %s\n", VERSION_STR); + printf("xscom utils version %s\n", VERSION); exit(1); default: exit(1); diff --git a/external/xscom-utils/getsram.c b/external/xscom-utils/getsram.c index ea3d38ba..5dbd81bb 100644 --- a/external/xscom-utils/getsram.c +++ b/external/xscom-utils/getsram.c @@ -32,10 +32,6 @@ static void print_usage(void) exit(1); } -#define VERSION_STR _str(VERSION) -#define _str(s) __str(s) -#define __str(s) #s - int main(int argc, char *argv[]) { uint64_t val, addr = -1ull; @@ -73,7 +69,7 @@ int main(int argc, char *argv[]) print_usage(); break; case 'v': - printf("xscom utils version %s\n", VERSION_STR); + printf("xscom utils version %s\n", VERSION); exit(1); default: exit(1); diff --git a/external/xscom-utils/putscom.c b/external/xscom-utils/putscom.c index be7b6961..0c4d5cdf 100644 --- a/external/xscom-utils/putscom.c +++ b/external/xscom-utils/putscom.c @@ -30,10 +30,6 @@ static void print_usage(void) exit(1); } -#define VERSION_STR _str(VERSION) -#define _str(s) __str(s) -#define __str(s) #s - int main(int argc, char *argv[]) { uint64_t val = -1ull, addr = -1ull; @@ -66,7 +62,7 @@ int main(int argc, char *argv[]) chip_id = strtoul(optarg, NULL, 0); break; case 'v': - printf("xscom utils version %s\n", VERSION_STR); + printf("xscom utils version %s\n", VERSION); exit(1); case 'h': print_usage(); diff --git a/skiboot.spec b/skiboot.spec index b1bbcc6e..1d704674 100644 --- a/skiboot.spec +++ b/skiboot.spec @@ -53,7 +53,7 @@ SKIBOOT_VERSION=%version CROSS= make V=1 %{?_smp_mflags} OPAL_PRD_VERSION=%version make V=1 -C external/opal-prd GARD_VERSION=%version make V=1 -C external/gard PFLASH_VERSION=%version make V=1 -C external/pflash -make V=1 -C external/xscom-utils +XSCOM_VERSION=%version make V=1 -C external/xscom-utils %install make -C external/opal-prd install DESTDIR=%{buildroot} prefix=/usr |