mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Replace svnversion use with git equivalent
This commit is contained in:
parent
2d02694749
commit
f6c98fd29f
1 changed files with 11 additions and 18 deletions
29
Makefile
29
Makefile
|
@ -268,20 +268,13 @@ ifneq ($(BUILD_CLIENT),0)
|
|||
endif
|
||||
|
||||
# Add svn version info
|
||||
USE_SVN=
|
||||
ifeq ($(wildcard .svn),.svn)
|
||||
SVN_REV=$(shell LANG=C svnversion .)
|
||||
ifneq ($(SVN_REV),)
|
||||
VERSION:=$(VERSION)_SVN$(SVN_REV)
|
||||
USE_SVN=1
|
||||
USE_GIT=
|
||||
ifeq ($(wildcard .git),.git)
|
||||
GIT_REV=$(shell git show -s --pretty=format:%h-%ad --date=short)
|
||||
ifneq ($(GIT_REV),)
|
||||
VERSION:=$(VERSION)_GIT_$(GIT_REV)
|
||||
USE_GIT=1
|
||||
endif
|
||||
else
|
||||
ifeq ($(wildcard .git/svn/.metadata),.git/svn/.metadata)
|
||||
SVN_REV=$(shell LANG=C git svn info | awk '$$1 == "Revision:" {print $$2; exit 0}')
|
||||
ifneq ($(SVN_REV),)
|
||||
VERSION:=$(VERSION)_SVN$(SVN_REV)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
@ -2463,11 +2456,11 @@ $(B)/ded/%.o: $(SYSDIR)/%.rc
|
|||
$(B)/ded/%.o: $(NDIR)/%.c
|
||||
$(DO_DED_CC)
|
||||
|
||||
# Extra dependencies to ensure the SVN version is incorporated
|
||||
ifeq ($(USE_SVN),1)
|
||||
$(B)/client/cl_console.o : .svn/entries
|
||||
$(B)/client/common.o : .svn/entries
|
||||
$(B)/ded/common.o : .svn/entries
|
||||
# Extra dependencies to ensure the git version is incorporated
|
||||
ifeq ($(USE_GIT),1)
|
||||
$(B)/client/cl_console.o : .git/index
|
||||
$(B)/client/common.o : .git/index
|
||||
$(B)/ded/common.o : .git/index
|
||||
endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue