aboutsummaryrefslogtreecommitdiff
path: root/Makefile.main
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2014-11-19 14:44:57 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-11-19 14:44:57 +1100
commit149b8bc4d058fc6acb6e2efb390e8e41c010d0d7 (patch)
tree994741648d7edea2108806ab4ee8e9f23dd01695 /Makefile.main
parent0b18bd2ae2db1e6fd15e859b00b23bb39886f528 (diff)
downloadskiboot-149b8bc4d058fc6acb6e2efb390e8e41c010d0d7.zip
skiboot-149b8bc4d058fc6acb6e2efb390e8e41c010d0d7.tar.gz
skiboot-149b8bc4d058fc6acb6e2efb390e8e41c010d0d7.tar.bz2
Fail build when SKIBOOT_VERSION not set and not in git treeskiboot-4.0
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.main b/Makefile.main
index b584eb8..b212998 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -139,7 +139,12 @@ VERSION ?= $(shell cd $(SRC); GIT_DIR=$(SRC)/.git $(SRC)/make_version.sh)
@rm -f $@.tmp
version.c: make_version.sh $(OBJS_NO_VER) .version
- @echo "const char version[] = \"$(VERSION)\";" > $@
+ @echo $(VERSION)
+ @(if [ "a$(VERSION)" = "a" ]; then \
+ echo "#error You need to set SKIBOOT_VERSION environment variable" > $@ ;\
+ else \
+ echo "const char version[] = \"$(VERSION)\";" ;\
+ fi) > $@
.PHONY: coverage
include $(shell find $(SRC)/* -name Makefile.check)