Skip to content
Snippets Groups Projects
Commit b40d471f authored by Ezekiel Dohmen's avatar Ezekiel Dohmen
Browse files

Adding check, so we only collect git info if the SRC dir is a cloned repo

parent a2fe42ac
No related branches found
No related tags found
2 merge requests!439RCG 5.0 release fro deb 10,!399Adding check, so we only collect git info if the SRC dir is a cloned repo
......@@ -9,6 +9,7 @@ models_dir:= $(bld_dir)/models
bld_utils_dir:= $(bld_dir)/utils
linux_version := '@linux_version@'
VPATH=$(srcdir)
IS_RCG_SRC_GIT_REPO:= $(shell (cd $(srcdir) && git rev-parse --is-inside-work-tree))
prefix = @prefix@
exec_prefix = @exec_prefix@
......@@ -29,6 +30,7 @@ RELEASEFLAGS=-DNDEBUG -DNPROBE -g -O5
DEVFLAGS=@DEVFLAGS@
NUM_BUILD_THREDS?=1
define DIE
(tail $(bld_log); cat $(err_log) && /bin/false)
endef
......@@ -99,8 +101,10 @@ endif
@#Save build config and source files for traceability
@/bin/mkdir -p $(bld_info_dir)
@echo $(srcdir) > $(bld_info_dir)/rcg_location.txt
ifeq (true,$(IS_RCG_SRC_GIT_REPO)) #Only capture git info if our RCG_SRC is a git repo
@(cd $(srcdir) && git rev-parse HEAD) > $(bld_info_dir)/rcg_git_hash.txt
@(cd $(srcdir) && git --no-pager diff) > $(bld_info_dir)/rcg_git_diff.txt
endif
@echo Build date `date` > $(bld_info_dir)/build.txt
@echo Compiled on `hostname` >> $(bld_info_dir)/build.txt
@echo RCG_LIB_PATH=${RCG_LIB_PATH} >> $(bld_info_dir)/build.txt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment