-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
86 lines (68 loc) · 2.53 KB
/
Copy pathMakefile
File metadata and controls
86 lines (68 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
EXTS := OES_standard_derivatives \
OES_texture_float \
OES_texture_half_float \
OES_vertex_array_object \
WEBGL_lose_context \
WEBGL_debug_renderer_info \
WEBGL_debug_shaders \
WEBGL_compressed_texture_s3tc \
OES_depth_texture \
proposals/WEBGL_shared_resources \
OES_element_index_uint \
EXT_texture_filter_anisotropic \
proposals/ANGLE_instanced_arrays \
proposals/WEBGL_fbo_color_attachments \
META_EXTS := URI
# END DATA / BEGIN CODE
MOCK_META:=true
ifeq ($(MOCK_META),false) # from command line overriding (see all recipe)
EXTS := $(EXTS) $(META_EXTS)
endif
EXTS := $(strip $(EXTS))
META_EXTS := $(strip $(META_EXTS))
META_EXT_XMLS := $(addsuffix /extension.xml,$(META_EXTS))
META_EXT_TMPLS := $(addsuffix /extension_template.xml,$(META_EXTS))
EXT_XMLS := $(addsuffix /extension.xml,$(EXTS))
EXT_IDXS := $(addsuffix /index.html,$(EXTS))
comma:=,
empty:=
space:=$(empty) $(empty)
ifeq ($(MOCK_META),true)
EXT_LIST:=$(subst $(space),$(comma),$(EXTS) $(META_EXT_TMPLS))
else
EXT_LIST:=$(subst $(space),$(comma),$(EXTS))
endif
REGISTRY := index.html index.atom registry.xml
# This sed substitute command builds a relative path back to the SVN root
# from an extension registry relative path
RE_BASEPATH:="s/[^\/]*/../g"
.PHONY: all clean
all: $(REGISTRY) $(EXT_IDXS) template/index.html
ifeq ($(MOCK_META),true) # first pass, mock the meta-extensions as base case
rm -f $(META_EXT_XMLS) # then, build the meta-extensions
$(MAKE) MOCK_META=false all
rm -f $(REGISTRY) # then, freshen the registry
$(MAKE) MOCK_META=false all
endif
index.html: registry.xml registry.xsl registry.html rev_utils.xsl
@echo "<!-- AUTOGENERATED FILE - DO NOT EDIT - SEE Makefile -->" > index.html
xsltproc --stringparam basepath `echo "" | sed -e $(RE_BASEPATH)` \
--html registry.xsl registry.html >> index.html
index.atom: registry.xml revisions.atom atom.xsl
xsltproc atom.xsl revisions.atom > index.atom
ifeq ($(MOCK_META),true)
registry.xml: $(EXT_XMLS) $(META_EXT_TMPLS) summary.xsl summary.xml
else
registry.xml: $(EXT_XMLS) summary.xsl summary.xml
endif
xsltproc --stringparam extensions $(EXT_LIST) \
summary.xsl summary.xml > registry.xml
%/extension.xml: %/extension_template.xml
cd $* && BASEPATH=`echo $@ | sed -e $(RE_BASEPATH)` $(MAKE) extension.xml
%/index.html: %/extension.xml extension.xsl rev_utils.xsl standards.xsl
xsltproc --stringparam basepath `echo $@ | sed -e $(RE_BASEPATH)` \
extension.xsl $*/extension.xml > $*/index.html
clean:
rm -f $(META_EXT_XMLS)
rm -f $(REGISTRY)
rm -f $(EXT_IDXS) template/index.html