Skip to content
Snippets Groups Projects

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

Merged Ezekiel Dohmen requested to merge ezekiel.dohmen/advligorts:git-hash-check into master
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
+ 4
0
@@ -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
Loading