Skip to content
Snippets Groups Projects
Commit a13baa98 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

A 'gitinfo' build target for building just the git_branch/hash.h files

Need to use this for creating nightly sbbs_src.tgz file

Also suppress the diff errors when the git_*.h files don't exist
parent 53d7c053
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -53,6 +53,8 @@ GIT_INFO = git_hash.h git_branch.h
all: $(GIT_INFO) dlls utils console scfg uedit umonitor
gitinfo: $(GIT_INFO)
console: $(JS_DEPS) xpdev-mt smblib \
$(MTOBJODIR) $(LIBODIR) $(EXEODIR) \
dlls \
......@@ -120,12 +122,12 @@ FORCE:
ifneq ($(GIT), NO)
git_hash.h: FORCE ../../.git
$(QUIET)echo '#define GIT_HASH "'`git log -1 HEAD --format=%h`\" > $@.tmp
$(QUIET)diff $@.tmp $@ || cp $@.tmp $@
$(QUIET)test -e $@ && diff $@.tmp $@ || cp $@.tmp $@
$(QUIET)rm -f $@.tmp
git_branch.h: FORCE ../../.git
$(QUIET)echo '#define GIT_BRANCH "'`git rev-parse --abbrev-ref HEAD`\" > $@.tmp
$(QUIET)diff $@.tmp $@ || cp $@.tmp $@
$(QUIET)test -e $@ && diff $@.tmp $@ || cp $@.tmp $@
$(QUIET)rm -f $@.tmp
endif
......
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