Skip to content

Commit dabe513

Browse files
committed
Update versions for V1.1.0
1 parent 6d6c903 commit dabe513

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

tritium/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Makefile export-subst

tritium/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626

2727
# Always run the version check script.
2828
VERSTRING := $(shell sh version.sh bfi.version.h)
29+
GITARCHVERSION=$Format:%nGITHASH=-DGITHASH=%h%nGITTIME=-DGITTIME="%cd"%nGITDECO="%d"$
30+
ifneq ($(GITDECO),)
31+
GITTAG=-DGITTAG=$(GITDECO)
32+
endif
2933

3034
all: bfi
3135

@@ -84,10 +88,12 @@ install: bfi
8488
bfi.gnulit.o: bfi.gnulit.c bfi.tree.h bfi.gnulit.h bfi.run.h
8589
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ -fno-strict-aliasing -Wno-unused-value bfi.gnulit.c
8690

91+
bfi.version.o: bfi.version.h
92+
$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $(GITHASH) $(GITTIME) $(GITTAG) bfi.version.c
93+
8794
bfi.o: \
8895
bfi.c bfi.tree.h bfi.run.h bfi.be.def bfi.ccode.h bfi.gnulit.h \
8996
bfi.nasm.h bfi.bf.h bfi.dc.h clock.h
90-
bfi.version.o: bfi.version.h
9197
bfi.bf.o: bfi.bf.c bfi.tree.h
9298
bfi.ccode.o: bfi.ccode.c bfi.tree.h bfi.run.h bfi.ccode.h
9399
bfi.dc.o: bfi.dc.c bfi.tree.h bfi.run.h

tritium/bfi.version.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,17 @@
66
#define VS_Q(x) #x
77
#define VS_S(x) VS_Q(x)
88
#define VS(x) VS_S(VERSION_ ## x)
9+
#ifdef GITHASH
10+
#ifdef GITTAG
11+
#define VERSION VS(MAJOR) "." VS(MINOR) " " \
12+
VS_S(GITHASH) " " VS_S(GITTAG) " " VS_S(GITTIME)
13+
#else
14+
#define VERSION VS(MAJOR) "." VS(MINOR) "." VS(BUILD) "? " \
15+
VS_S(GITHASH) " " VS_S(GITTIME)
16+
#endif
17+
#else
918
#define VERSION VS(MAJOR) "." VS(MINOR) "." VS(BUILD) VERSION_SUFFIX
19+
#endif
1020

1121
#if defined(__x86_64__) || defined(__amd64__) || defined(_M_AMD64)
1222
#define PROCESSOR " x64"

tritium/version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[ -n "$2" ] && cd $2
33

44
MAJOR=1
5-
MINOR=0
5+
MINOR=1
66
SUFFIX="# Unknown @ `date -R 2>/dev/null || date`"
77
BUILD=
88

0 commit comments

Comments
 (0)