Add git hash to version info

This commit is contained in:
Thomas Jensen 2019-02-20 22:28:07 +01:00
parent 447d9815d8
commit 22829896f8
2 changed files with 5 additions and 4 deletions

View File

@ -20,9 +20,10 @@
# The following line (GLOBALCONF) is the only line you should need to edit!
GLOBALCONF = /usr/share/boxes
GIT_STATUS = ($(shell git rev-parse --short HEAD)$(shell if [ $$(git status -s -uall | wc -l) -ge 1 ] ; then echo ", dirty" ; fi))
BVERSION = 1.2.1-SNAPSHOT
ALL_FILES = LICENSE README.md README.Win32.txt boxes-config
ALL_FILES = LICENSE README.md README.Win32.md boxes-config
DOC_FILES = doc/boxes.1 doc/boxes.el
PKG_NAME = boxes-$(BVERSION)
@ -46,7 +47,7 @@ infomsg:
replaceinfos: src/boxes.h doc/boxes.1
src/boxes.h: src/boxes.h.in src/regexp/regexp.h Makefile
sed -e 's/--BVERSION--/$(BVERSION)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' src/boxes.h.in > src/boxes.h
sed -e 's/--BVERSION--/$(BVERSION) $(GIT_STATUS)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' src/boxes.h.in > src/boxes.h
doc/boxes.1: doc/boxes.1.in Makefile
sed -e 's/--BVERSION--/$(BVERSION)/; s/--GLOBALCONF--/$(subst /,\/,$(GLOBALCONF))/' doc/boxes.1.in > doc/boxes.1

View File

@ -48,11 +48,11 @@ debug: flags_$(BOXES_PLATFORM)
boxes: $(ALL_OBJ)
$(MAKE) -C regexp CC=$(CC) libregexp.a
$(CC) $(LDFLAGS) $(ALL_OBJ) -o $(BOXES_EXECUTABLE_NAME) -lregexp
if [ $(STRIP) == true ] ; then strip $(BOXES_EXECUTABLE_NAME) ; fi
if [ "$(STRIP)" = "true" ] ; then strip $(BOXES_EXECUTABLE_NAME) ; fi
boxes.exe: $(ALL_OBJ)
$(CC) $(LDFLAGS) $(ALL_OBJ) -o $(BOXES_EXECUTABLE_NAME) -lkernel32
if [ $(STRIP) == true ] ; then strip $(BOXES_EXECUTABLE_NAME) ; fi
if [ "$(STRIP)" = "true" ] ; then strip $(BOXES_EXECUTABLE_NAME) ; fi
flags_unix: