diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-04-25 14:39:29 +0100 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-04-25 18:28:06 +0100 |
commit | 9fc9cdde42b5a1d38dd5a3ea0815104762c2b367 (patch) | |
tree | 497a5cfa7df649c636f777d3d16277d118a9b756 /lib/Support/Makefile | |
parent | 1b765967efc8d88460331d271ffefcb175a6c419 (diff) | |
download | klee-9fc9cdde42b5a1d38dd5a3ea0815104762c2b367.tar.gz |
Give KLEE release version information in the output of klee and kleaver
when they are given the --version command line option. Unfortunately to make the build type and git revision available we need to check this for every build which means KLEE's support library will be rebuilt for every build which will slow down incremental builds. This addresses issue #231
Diffstat (limited to 'lib/Support/Makefile')
-rw-r--r-- | lib/Support/Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/Support/Makefile b/lib/Support/Makefile index 67272908..ff28b06e 100644 --- a/lib/Support/Makefile +++ b/lib/Support/Makefile @@ -14,4 +14,23 @@ DONT_BUILD_RELINKED=1 BUILD_ARCHIVE=1 NO_INSTALL=1 +# FIXME: This is nasty. We don't want to rebuild this library everytime +# but this was the only way I could find to make the build work. +# +# Note this rule has to go here so it is run first. +CompileTimeInfoFile:=../../include/klee/Config/CompileTimeInfo.h +all-local:: $(CompileTimeInfoFile) + include $(LEVEL)/Makefile.common + + +GIT_PRESENT:=$(shell [ -d "$(PROJ_SRC_ROOT)/.git" ] && echo 1 || echo 0) + +.PHONY: $(CompileTimeInfoFile) +$(CompileTimeInfoFile): + $(Verb) echo "Regenerating $(CompileTimeInfoFile)" + $(Verb) echo '#define KLEE_BUILD_MODE "$(BuildMode)"' > $(CompileTimeInfoFile) +ifeq ($(GIT_PRESENT),1) + $(Verb) echo '#define KLEE_BUILD_REVISION "'$(shell cd $(PROJ_SRC_ROOT); git rev-parse HEAD)'"' >> \ + $(CompileTimeInfoFile) +endif |