blob: 51d91907975c57c3245b7241cc7dd65ad64396df (
plain) (
blame)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
|
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2003-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# %CopyrightEnd%
#
#
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
# ----------------------------------------------------
# Application version
# ----------------------------------------------------
include ../vsn.mk
VSN=$(XMERL_VSN)
# ----------------------------------------------------
# Release directory specification
# ----------------------------------------------------
RELSYSDIR = $(RELEASE_PATH)/lib/xmerl-$(VSN)
# ----------------------------------------------------
# Documentation directory specification
# ----------------------------------------------------
DOCDIR = ../doc
### XMERL use EDOC for documentation, to regenerate update paths as needed!
XMERL_APP = ..
EDOC_APP = ../../edoc
SYNTAX_TOOLS_APP = ../../syntax_tools
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
EDOC_MODULES = \
xmerl_scan \
xmerl \
xmerl_xs \
xmerl_eventp \
xmerl_xpath \
xmerl_xsd
MODULES = $(EDOC_MODULES) \
xmerl_b64Bin \
xmerl_b64Bin_scan \
xmerl_html \
xmerl_lib \
xmerl_otpsgml \
xmerl_regexp \
xmerl_sgml \
xmerl_simple \
xmerl_text \
xmerl_ucs \
xmerl_uri \
xmerl_validate \
xmerl_xlate \
xmerl_xml \
xmerl_xpath_lib \
xmerl_xpath_parse \
xmerl_xpath_pred \
xmerl_xpath_scan \
xmerl_xsd_type \
xmerl_sax_parser \
xmerl_sax_parser_list \
xmerl_sax_parser_latin1 \
xmerl_sax_parser_utf8 \
xmerl_sax_parser_utf16be \
xmerl_sax_parser_utf16le \
xmerl_sax_simple_dom \
xmerl_sax_old_dom
HRL_FILES = \
../include/xmerl.hrl \
../include/xmerl_xpath.hrl \
../include/xmerl_xsd.hrl
INCLUDE_DIR = ../include
INTERNAL_HRL_FILES = \
xmerl_internal.hrl \
xmerl_sax_old_dom.hrl \
xmerl_sax_parser.hrl
ERL_FILES= $(MODULES:%=%.erl)
APP_FILE= xmerl.app
APP_SRC= $(APP_FILE).src
APP_TARGET= $(EBIN)/$(APP_FILE)
APPUP_FILE= xmerl.appup
APPUP_SRC= $(APPUP_FILE).src
APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
DOC_TARGET_FILES = $(EDOC_MODULES:%=$(DOCDIR)/%.html)
TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_COMPILE_FLAGS += \
-I ../include \
+warn_unused_vars
# +bin_opt_info
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
debug opt: $(TARGET_FILES)
docs:
#docs: $(DOC_TARGET_FILES)
clean:
$(RM) $(TARGET_FILES)
$(RM) xmerl_xpath_parse.erl
$(RM) xmerl_b64Bin.erl
$(RM) xmerl_sax_parser_list.erl
$(RM) xmerl_sax_parser_latin1.erl
$(RM) xmerl_sax_parser_utf8.erl
$(RM) xmerl_sax_parser_utf16be.erl
$(RM) xmerl_sax_parser_utf16le.erl
$(RM) core *~
info:
@echo "MODULES: $(MODULES)"
@echo "EBIN: $(EBIN)"
@echo "EMULATOR: $(EMULATOR)"
@echo "APP_TARGET: $(APP_TARGET)"
@echo "TARGET_FILES: $(TARGET_FILES)"
@echo "DOC_TARGET_FILES: $(DOC_TARGET_FILES)"
@echo "DOCDIR/%html: $(DOCDIR)/%.html"
realclean: clean
$(RM) $(DOC_TARGET_FILES)
# ----------------------------------------------------
# Special Build Targets
# ----------------------------------------------------
EDOC_PATHS = \
-pa $(EDOC_APP)/ebin -pa $(XMERL_APP)/ebin -pa $(SYNTAX_TOOLS_APP)/ebin
$(APP_TARGET): $(APP_SRC) ../vsn.mk
$(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
$(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
xmerl_xpath_parse.erl: xmerl_xpath_parse.yrl
$(yecc_verbose)$(ERLC) -o $(ESRC) $<
xmerl_b64Bin.erl: xmerl_b64Bin.yrl
$(yecc_verbose)$(ERLC) -o $(ESRC) $<
xmerl_sax_parser_list.erl: xmerl_sax_parser_list.erlsrc xmerl_sax_parser_base.erlsrc
$(gen_verbose)cat xmerl_sax_parser_list.erlsrc xmerl_sax_parser_base.erlsrc >$@
xmerl_sax_parser_latin1.erl: xmerl_sax_parser_latin1.erlsrc xmerl_sax_parser_base.erlsrc
$(gen_verbose)cat xmerl_sax_parser_latin1.erlsrc xmerl_sax_parser_base.erlsrc >$@
xmerl_sax_parser_utf8.erl: xmerl_sax_parser_utf8.erlsrc xmerl_sax_parser_base.erlsrc
$(gen_verbose)cat xmerl_sax_parser_utf8.erlsrc xmerl_sax_parser_base.erlsrc >$@
xmerl_sax_parser_utf16be.erl: xmerl_sax_parser_utf16be.erlsrc xmerl_sax_parser_base.erlsrc
$(gen_verbose)cat xmerl_sax_parser_utf16be.erlsrc xmerl_sax_parser_base.erlsrc >$@
xmerl_sax_parser_utf16le.erl: xmerl_sax_parser_utf16le.erlsrc xmerl_sax_parser_base.erlsrc
$(gen_verbose)cat xmerl_sax_parser_utf16le.erlsrc xmerl_sax_parser_base.erlsrc >$@
$(EBIN)/%.beam: %.erl
$(V_ERLC) $(ERL_COMPILE_FLAGS) -o $(EBIN) $<
$(DOCDIR)/%.html: %.erl
$(ERL) -noshell $(EDOC_PATHS) \
-run edoc_run file '"$<"' '[{dir,"$(DOCDIR)"}]' -s erlang halt
#$(DOCDIR)/%.html: %.erl
# $(ERL) $(EDOC_PATHS) -s edoc file $< ['{dir,"$(DOCDIR)"}']
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
#ifeq "${MA_TOP}" ""
#MA_TOP = ../../..
#endif
#include $(MA_TOP)/config/make.release
include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
$(INSTALL_DIR) "$(RELSYSDIR)/src"
$(INSTALL_DATA) $(ERL_FILES) $(INTERNAL_HRL_FILES) $(APP_SRC) $(APPUP_SRC) "$(RELSYSDIR)/src"
$(INSTALL_DATA) xmerl_xpath_parse.yrl "$(RELSYSDIR)/src"
$(INSTALL_DATA) xmerl_b64Bin.yrl "$(RELSYSDIR)/src"
$(INSTALL_DIR) "$(RELSYSDIR)/include"
$(INSTALL_DATA) $(HRL_FILES) "$(RELSYSDIR)/include"
release_docs_spec:
release_tests_spec:
#------------------------------------------------------------
# .hrl dependencies
$(EBIN)/xmerl.beam:../include/xmerl.hrl
$(EBIN)/xmerl_lib.beam:../include/xmerl.hrl
$(EBIN)/xmerl_scan.beam:../include/xmerl.hrl
$(EBIN)/xmerl_xlate.beam:../include/xmerl.hrl
$(EBIN)/xmerl_xml.beam:../include/xmerl.hrl
$(EBIN)/xmerl_html.beam:../include/xmerl.hrl
$(EBIN)/xmerl_text.beam:../include/xmerl.hrl
$(EBIN)/xmerl_eventp.beam:../include/xmerl.hrl
$(EBIN)/xmerl_simple.beam:../include/xmerl.hrl
$(EBIN)/xmerl_xpath.beam:../include/xmerl.hrl
$(EBIN)/xmerl_xpath_lib.beam:../include/xmerl.hrl
$(EBIN)/xmerl_xpath_pred.beam:../include/xmerl.hrl
$(EBIN)/xmerl_xpath_scan.beam:../include/xmerl.hrl
#$(EBIN)/xmerl_xsd.beam:../include/xmerl_xsd.hrl
#$(EBIN)/xmerl_xsd.beam:../include/xmerl.hrl
|