Skip to content

Commit e3b1453

Browse files
committed
---
yaml --- r: 101848 b: refs/heads/master c: 24915c8 h: refs/heads/master v: v3
1 parent 07a8ae1 commit e3b1453

File tree

2 files changed

+34
-23
lines changed

2 files changed

+34
-23
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 334af011f01ceda1086d335231ada3363190b8a9
2+
refs/heads/master: 24915c84e0d4764a7995039fac2b3f31c409d04c
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
55
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff

trunk/mk/main.mk

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,39 @@
88
# option. This file may not be copied, modified, or distributed
99
# except according to those terms.
1010

11+
######################################################################
12+
# Version numbers and strings
13+
######################################################################
14+
15+
# The version number
16+
CFG_RELEASE = 0.10-pre
17+
18+
# The version string plus commit information
19+
CFG_VERSION = $(CFG_RELEASE)
20+
CFG_GIT_DIR := $(CFG_SRC_DIR).git
21+
# since $(CFG_GIT) may contain spaces (especially on Windows),
22+
# we need to escape them. (" " to r"\ ")
23+
# Note that $(subst ...) ignores space after `subst`,
24+
# so we use a hack: define $(SPACE) which contains space character.
25+
SPACE :=
26+
SPACE +=
27+
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT))),)
28+
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
29+
CFG_VERSION += $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 \
30+
--pretty=format:'(%h %ci)')
31+
CFG_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse HEAD)
32+
endif
33+
endif
34+
35+
# windows exe's need numeric versions - don't use anything but
36+
# numbers and dots here
37+
CFG_VERSION_WIN = $(subst -pre,,$(CFG_RELEASE))
38+
39+
40+
######################################################################
41+
# More configuration
42+
######################################################################
43+
1144
# We track all of the object files we might build so that we can find
1245
# and include all of the .d files in one fell swoop.
1346
ALL_OBJ_FILES :=
@@ -97,28 +130,6 @@ else
97130
CFG_VALGRIND_COMPILE :=
98131
endif
99132

100-
# version-string calculation
101-
CFG_GIT_DIR := $(CFG_SRC_DIR).git
102-
CFG_RELEASE = 0.10-pre
103-
CFG_VERSION = $(CFG_RELEASE)
104-
# windows exe's need numeric versions - don't use anything but
105-
# numbers and dots here
106-
CFG_VERSION_WIN = 0.10
107-
108-
# since $(CFG_GIT) may contain spaces (especially on Windows),
109-
# we need to escape them. (" " to r"\ ")
110-
# Note that $(subst ...) ignores space after `subst`,
111-
# so we use a hack: define $(SPACE) which contains space character.
112-
SPACE :=
113-
SPACE +=
114-
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT))),)
115-
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
116-
CFG_VERSION += $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 \
117-
--pretty=format:'(%h %ci)')
118-
CFG_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse HEAD)
119-
endif
120-
endif
121-
122133
ifdef CFG_ENABLE_VALGRIND
123134
$(info cfg: enabling valgrind (CFG_ENABLE_VALGRIND))
124135
else

0 commit comments

Comments
 (0)