~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to system/doc/top/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# %CopyrightBegin%
 
3
#
 
4
# Copyright Ericsson AB 1999-2010. All Rights Reserved.
 
5
#
 
6
# The contents of this file are subject to the Erlang Public License,
 
7
# Version 1.1, (the "License"); you may not use this file except in
 
8
# compliance with the License. You should have received a copy of the
 
9
# Erlang Public License along with this software. If not, it can be
 
10
# retrieved online at http://www.erlang.org/.
 
11
#
 
12
# Software distributed under the License is distributed on an "AS IS"
 
13
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
14
# the License for the specific language governing rights and limitations
 
15
# under the License.
 
16
#
 
17
# %CopyrightEnd%
 
18
#
 
19
#
 
20
include $(ERL_TOP)/make/target.mk
 
21
include $(ERL_TOP)/make/$(TARGET)/otp.mk
 
22
 
 
23
# ----------------------------------------------------
 
24
# Application version
 
25
# ----------------------------------------------------
 
26
include $(ERL_TOP)/erts/vsn.mk
 
27
 
 
28
APPLICATION=otp-system-documentation
 
29
 
 
30
# ----------------------------------------------------
 
31
# Release directory specification
 
32
# ----------------------------------------------------
 
33
RELSYSDIR = $(RELEASE_PATH)/doc
 
34
 
 
35
GIF_FILES = 
 
36
 
 
37
INFO_FILES = ../../README ../../COPYRIGHT PR.template
 
38
 
 
39
TOPDOCDIR=.
 
40
 
 
41
TOP_HTML_GEN_FILES = \
 
42
        $(HTMLDIR)/incompatible.html \
 
43
        $(HTMLDIR)/highlights.html
 
44
 
 
45
TOP_HTML_FILES = \
 
46
        $(TOP_HTML_GEN_FILES)
 
47
 
 
48
include ../installation_guide/xmlfiles.mk
 
49
include ../system_principles/xmlfiles.mk
 
50
include ../embedded/xmlfiles.mk
 
51
include ../getting_started/xmlfiles.mk
 
52
include ../reference_manual/xmlfiles.mk
 
53
include ../programming_examples/xmlfiles.mk
 
54
include ../efficiency_guide/xmlfiles.mk
 
55
include ../tutorial/xmlfiles.mk
 
56
include ../design_principles/xmlfiles.mk
 
57
include ../oam/xmlfiles.mk
 
58
 
 
59
XML_FILES = \
 
60
        $(INST_GUIDE_CHAPTER_FILES:%=../installation_guide/%) \
 
61
        $(SYSTEM_PRINCIPLES_CHAPTER_FILES:%=../system_principles/%) \
 
62
        $(EMBEDDED_CHAPTER_FILES:%=../embedded/%) \
 
63
        $(GETTING_STARTED_CHAPTER_FILES:%=../getting_started/%) \
 
64
        $(REF_MAN_CHAPTER_FILES:%=../reference_manual/%) \
 
65
        $(PROG_EX_CHAPTER_FILES:%=../programming_examples/%) \
 
66
        $(EFF_GUIDE_CHAPTER_FILES:%=../efficiency_guide/%) \
 
67
        $(TUTORIAL_CHAPTER_FILES:%=../tutorial/%) \
 
68
        $(DESIGN_PRINCIPLES_CHAPTER_FILES:%=../design_principles/%) \
 
69
        $(OAM_CHAPTER_FILES:%=../oam/%) \
 
70
        ../installation_guide/part.xml \
 
71
        ../system_principles/part.xml \
 
72
        ../embedded/part.xml \
 
73
        ../getting_started/part.xml \
 
74
        ../reference_manual/part.xml \
 
75
        ../programming_examples/part.xml \
 
76
        ../efficiency_guide/part.xml \
 
77
        ../tutorial/part.xml \
 
78
        ../design_principles/part.xml \
 
79
        ../oam/part.xml
 
80
 
 
81
BOOK_FILES = book.xml
 
82
 
 
83
HTMLDIR= ../html
 
84
PDFREFDIR= pdf
 
85
 
 
86
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
 
87
TOPDOC=true
 
88
 
 
89
#--------------------------------------------------------------------------
 
90
# We generate the index page from the installed system. This make
 
91
# it important that this is done last. The file index.html.src
 
92
# is used as a template for the resulting page.
 
93
 
 
94
EBIN = ebin
 
95
 
 
96
INDEX_SCRIPT = $(EBIN)/erl_html_tools.$(EMULATOR)
 
97
INDEX_SRC = src/erl_html_tools.erl
 
98
INDEX_FILES = \
 
99
        $(HTMLDIR)/index.html \
 
100
        $(HTMLDIR)/applications.html 
 
101
 
 
102
JAVASCRIPT = $(HTMLDIR)/js/erlresolvelinks.js
 
103
JAVASCRIPT_BUILD_SCRIPT = $(EBIN)/erlresolvelinks.$(EMULATOR)
 
104
JAVASCRIPT_BUILD_SCRIPT_SRC = src/erlresolvelinks.erl
 
105
 
 
106
MAN_INDEX_SCRIPT = $(EBIN)/otp_man_index.$(EMULATOR)
 
107
MAN_INDEX_SRC = src/otp_man_index.erl
 
108
MAN_INDEX = $(HTMLDIR)/man_index.html
 
109
 
 
110
GLOSSARY  = $(HTMLDIR)/glossary.html
 
111
GLOSSARY_SRC = $(ERL_TOP)/system/internal_tools/doctools/src/glossary.erl
 
112
GLOSSARY_SCRIPT = $(EBIN)/glossary.$(EMULATOR)
 
113
 
 
114
TEMPLATES = \
 
115
        templates/index.html.src \
 
116
        templates/applications.html.src
 
117
 
 
118
#--------------------------------------------------------------------------
 
119
 
 
120
$(INDEX_SCRIPT): $(INDEX_SRC)
 
121
        $(ERLC) -o$(EBIN) +warn_unused_vars $<
 
122
 
 
123
# We don't list toc_*.html as targets because we don't know
 
124
$(HTMLDIR)/index.html + $(HTMLDIR)/applications.html: $(INDEX_SCRIPT)
 
125
        echo "Generating index $@"
 
126
# Check if we are building the index from source or an installed release
 
127
        if test "$$RELEASE_ROOT" = "" ; then \
 
128
                $(ERL) -noshell -pa $(EBIN) -s erl_html_tools top_index src $(ERL_TOP) \
 
129
                $(HTMLDIR) $(SYSTEM_VSN) -s erlang halt ;\
 
130
        else \
 
131
                $(ERL) -noshell -pa $(EBIN) -s erl_html_tools top_index rel $(RELEASE_ROOT) \
 
132
                $(HTMLDIR) $(SYSTEM_VSN) -s erlang halt ;\
 
133
        fi
 
134
 
 
135
 
 
136
#--------------------------------------------------------------------------
 
137
 
 
138
$(JAVASCRIPT_BUILD_SCRIPT): $(JAVASCRIPT_BUILD_SCRIPT_SRC)
 
139
        $(ERLC) -o$(EBIN) +warn_unused_vars $<
 
140
 
 
141
$(JAVASCRIPT): $(JAVASCRIPT_BUILD_SCRIPT)
 
142
        erl -noshell -pa $(EBIN) -s erlresolvelinks make -s erlang halt
 
143
        $(INSTALL_DIR) $(HTMLDIR)/js
 
144
        $(INSTALL_DATA) erlresolvelinks.js $(JAVASCRIPT) 
 
145
 
 
146
#--------------------------------------------------------------------------
 
147
 
 
148
$(MAN_INDEX_SCRIPT): $(MAN_INDEX_SRC)
 
149
        $(ERLC) -o$(EBIN) +warn_unused_vars $<
 
150
 
 
151
$(MAN_INDEX): $(MAN_INDEX_SCRIPT)
 
152
# Check if we are building the index from source or an installed release
 
153
        if test "$$RELEASE_ROOT" = "" ; then \
 
154
                $(ERL) -noshell -pa $(EBIN) -s otp_man_index gen src $(ERL_TOP) $@  \
 
155
                        -s erlang halt ;\
 
156
        else \
 
157
                $(ERL) -noshell -pa $(EBIN) -s otp_man_index gen rel $(RELEASE_ROOT) $@  \
 
158
                        -s erlang halt ;\
 
159
        fi
 
160
 
 
161
 
 
162
#--------------------------------------------------------------------------
 
163
 
 
164
$(HTMLDIR)/highlights.html:  highlights.xml
 
165
        date=`date +"%B %e %Y"`; \
 
166
        $(XSLTPROC) --output $(@) --stringparam docgen "$(DOCGEN)" --stringparam topdocdir "$(TOPDOCDIR)" \
 
167
                --stringparam pdfdir "$(PDFREFDIR)"  --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" \
 
168
                --stringparam appver "$(VSN)" -path  $(DOCGEN)/priv/docbuilder_dtd -path  $(DOCGEN)/priv/dtd_html_entities \
 
169
                $(DOCGEN)/priv/xsl/db_html.xsl $<
 
170
 
 
171
 
 
172
$(HTMLDIR)/incompatible.html:  incompatible.xml
 
173
        date=`date +"%B %e %Y"`; \
 
174
        $(XSLTPROC) --output $(@) --stringparam docgen "$(DOCGEN)" --stringparam topdocdir "$(TOPDOCDIR)" \
 
175
                --stringparam pdfdir "$(PDFREFDIR)"  --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" \
 
176
                --stringparam appver "$(VSN)" -path  $(DOCGEN)/priv/docbuilder_dtd -path  $(DOCGEN)/priv/dtd_html_entities \
 
177
                $(DOCGEN)/priv/xsl/db_html.xsl $<
 
178
 
 
179
#--------------------------------------------------------------------------
 
180
 
 
181
$(GLOSSARY_SCRIPT): $(GLOSSARY_SRC)
 
182
        $(ERLC) -o$(EBIN) $(GLOSSARY_SRC)
 
183
 
 
184
$(GLOSSARY): $(GLOSSARY_SCRIPT)
 
185
        $(ERL) -noshell -pa $(EBIN) \
 
186
                -s glossary make ../definitions/term.defs -s erlang halt > \
 
187
                $(GLOSSARY)
 
188
 
 
189
#--------------------------------------------------------------------------
 
190
 
 
191
PR.template: PR.template.src $(ERL_TOP)/erts/vsn.mk
 
192
        sed -e 's;%VSN%;$(VSN);' \
 
193
            -e 's;%SYSTEM_VSN%;$(SYSTEM_VSN);' \
 
194
            $< > $@
 
195
 
 
196
# ----------------------------------------------------
 
197
# FLAGS 
 
198
# ----------------------------------------------------
 
199
XML_FLAGS += 
 
200
DVIPS_FLAGS += 
 
201
 
 
202
# ----------------------------------------------------
 
203
# Targets
 
204
# ----------------------------------------------------
 
205
 
 
206
 
 
207
docs: pdf html $(INFO_FILES)
 
208
 
 
209
local_docs: PDFREFDIR=../pdf
 
210
 
 
211
$(TOP_PDF_FILE): $(XML_FILES)
 
212
 
 
213
pdf: $(TOP_PDF_FILE)
 
214
 
 
215
html:   $(INDEX_FILES) $(TOP_HTML_FILES) \
 
216
        $(MAN_INDEX) $(JAVASCRIPT)
 
217
 
 
218
debug opt: 
 
219
 
 
220
clean:
 
221
        rm -rf  ../html/js
 
222
        rm -f PR.template 
 
223
        rm -f  $(INDEX_FILES) $(TOP_HTML_FILES) $(MAN_INDEX) 
 
224
        rm -f  $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
 
225
        rm -f $(INDEX_SCRIPT) $(GLOSSARY_SCRIPT) \
 
226
                $(JAVASCRIPT_BUILD_SCRIPT) 
 
227
        rm -f erl_crash.dump errs core *~
 
228
 
 
229
# ----------------------------------------------------
 
230
# Release Target
 
231
# ---------------------------------------------------- 
 
232
include $(ERL_TOP)/make/otp_release_targets.mk
 
233
 
 
234
 
 
235
release_docs_spec: docs
 
236
        $(INSTALL_DIR)  $(RELEASE_PATH)
 
237
        $(INSTALL_DATA) $(INFO_FILES) $(RELEASE_PATH)
 
238
        $(INSTALL_DIR)  $(RELSYSDIR)
 
239
        $(INSTALL_DIR)  $(RELSYSDIR)/pdf
 
240
        $(INSTALL_DATA)  \
 
241
                $(TOP_PDF_FILE) $(RELSYSDIR)/pdf
 
242
        $(INSTALL_DATA) $(TOP_HTML_FILES) $(RELSYSDIR) 
 
243
        $(INSTALL_DIR)  $(RELSYSDIR)/js
 
244
        $(INSTALL_DATA)  \
 
245
                $(JAVASCRIPT) $(RELSYSDIR)/js
 
246
        $(INSTALL_DATA) $(INDEX_FILES) $(MAN_INDEX) $(TOP_HTML_FILES) $(RELSYSDIR)
 
247
        $(INSTALL_DIR)  $(RELSYSDIR)/docbuild
 
248
        $(INSTALL_DATA) $(INDEX_SCRIPT) $(MAN_INDEX_SCRIPT) $(JAVASCRIPT_BUILD_SCRIPT) \
 
249
                $(INDEX_SRC) $(MAN_INDEX_SRC) $(JAVASCRIPT_BUILD_SCRIPT_SRC) \
 
250
                $(TEMPLATES) $(RELSYSDIR)/docbuild
 
251
 
 
252
 
 
253
release_spec: