... |
... |
@@ -198,29 +198,22 @@ modules: |
198
|
198
|
include $(TOP_DIR)/builds/modules.mk
|
199
|
199
|
|
200
|
200
|
|
201
|
|
-# get FreeType version string, using a
|
202
|
|
-# poor man's `sed' emulation with make's built-in string functions
|
|
201
|
+# get FreeType version string using built-in string functions
|
203
|
202
|
#
|
204
|
203
|
hash := \#
|
205
|
204
|
|
206
|
205
|
work := $(strip $(shell $(CAT) \
|
207
|
206
|
$(subst /,$(SEP),$(TOP_DIR)/include/freetype/freetype.h)))
|
208
|
|
-work := $(subst |,x,$(work))
|
209
|
|
-work := $(subst $(space),|,$(work))
|
210
|
|
-work := $(subst $(hash)define|FREETYPE_MAJOR|,$(space),$(work))
|
211
|
|
-work := $(word 2,$(work))
|
212
|
|
-major := $(subst |,$(space),$(work))
|
213
|
|
-major := $(firstword $(major))
|
214
|
|
-
|
215
|
|
-work := $(subst $(hash)define|FREETYPE_MINOR|,$(space),$(work))
|
216
|
|
-work := $(word 2,$(work))
|
217
|
|
-minor := $(subst |,$(space),$(work))
|
218
|
|
-minor := $(firstword $(minor))
|
219
|
|
-
|
220
|
|
-work := $(subst $(hash)define|FREETYPE_PATCH|,$(space),$(work))
|
221
|
|
-work := $(word 2,$(work))
|
222
|
|
-patch := $(subst |,$(space),$(work))
|
223
|
|
-patch := $(firstword $(patch))
|
|
207
|
+
|
|
208
|
+work := $(subst $(hash)define$(space)FREETYPE_MAJOR$(space),MAjOR=,$(work))
|
|
209
|
+work := $(subst $(hash)define$(space)FREETYPE_MINOR$(space),MInOR=,$(work))
|
|
210
|
+work := $(subst $(hash)define$(space)FREETYPE_PATCH$(space),PAtCH=,$(work))
|
|
211
|
+
|
|
212
|
+major := $(subst MAjOR=,,$(filter MAjOR=%,$(work)))
|
|
213
|
+minor := $(subst MInOR=,,$(filter MInOR=%,$(work)))
|
|
214
|
+patch := $(subst PAtCH=,,$(filter PAtCH=%,$(work)))
|
|
215
|
+
|
|
216
|
+work :=
|
224
|
217
|
|
225
|
218
|
# ifneq ($(findstring x0x,x$(patch)x),)
|
226
|
219
|
# version := $(major).$(minor)
|