1#
2# %CopyrightBegin%
3#
4# Copyright Ericsson AB 1996-2016. All Rights Reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10#     http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18# %CopyrightEnd%
19#
20
21include $(ERL_TOP)/make/target.mk
22include $(ERL_TOP)/make/$(TARGET)/otp.mk
23
24# ----------------------------------------------------
25# Application version
26# ----------------------------------------------------
27include ../vsn.mk
28VSN=$(ERL_DOCGEN_VSN)
29
30# ----------------------------------------------------
31# Release directory specification
32# ----------------------------------------------------
33RELSYSDIR = $(RELEASE_PATH)/lib/erl_docgen-$(VSN)
34
35# ----------------------------------------------------
36# Target Specs
37# ----------------------------------------------------
38MODULES = \
39	docgen_otp_specs \
40	docgen_edoc_xml_cb \
41	docgen_xmerl_xml_cb \
42	docgen_xml_to_chunk
43
44HRL_FILES =
45
46ERL_FILES = $(MODULES:%=%.erl)
47
48TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
49
50APP_FILE = erl_docgen.app
51
52APP_SRC = $(APP_FILE).src
53APP_TARGET = $(EBIN)/$(APP_FILE)
54
55APPUP_FILE = erl_docgen.appup
56
57APPUP_SRC= $(APPUP_FILE).src
58APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
59
60# ----------------------------------------------------
61# FLAGS
62# ----------------------------------------------------
63ERL_COMPILE_FLAGS += -I../../xmerl/include
64
65# ----------------------------------------------------
66# Targets
67# ----------------------------------------------------
68
69debug opt: $(TARGET_FILES)
70
71clean:
72	rm -f $(TARGET_FILES)
73	rm -f core
74
75docs:
76
77
78# ----------------------------------------------------
79# Special Build Targets
80# ----------------------------------------------------
81
82$(APP_TARGET): $(APP_SRC) ../vsn.mk
83	$(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
84
85$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
86	$(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
87
88# ----------------------------------------------------
89# Release Target
90# ----------------------------------------------------
91include $(ERL_TOP)/make/otp_release_targets.mk
92
93release_spec: opt
94	$(INSTALL_DIR) "$(RELSYSDIR)/src"
95	$(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
96	$(INSTALL_DIR) "$(RELSYSDIR)/ebin"
97	$(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
98
99release_docs_spec:
100
101