Skip to content

Commit e4feafd

Browse files
committed
---
yaml --- r: 108315 b: refs/heads/dist-snap c: 24915c8 h: refs/heads/master i: 108313: 8f9cb8d 108311: 8141cbc v: v3
1 parent 24327c0 commit e4feafd

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
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 334af011f01ceda1086d335231ada3363190b8a9
9+
refs/heads/dist-snap: 24915c84e0d4764a7995039fac2b3f31c409d04c
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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)