|
8 | 8 | # option. This file may not be copied, modified, or distributed
|
9 | 9 | # except according to those terms.
|
10 | 10 |
|
| 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 | + |
11 | 44 | # We track all of the object files we might build so that we can find
|
12 | 45 | # and include all of the .d files in one fell swoop.
|
13 | 46 | ALL_OBJ_FILES :=
|
|
97 | 130 | CFG_VALGRIND_COMPILE :=
|
98 | 131 | endif
|
99 | 132 |
|
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 |
| - |
122 | 133 | ifdef CFG_ENABLE_VALGRIND
|
123 | 134 | $(info cfg: enabling valgrind (CFG_ENABLE_VALGRIND))
|
124 | 135 | else
|
|
0 commit comments