summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang.org>2020-02-24 13:38:53 +0100
committerLukas Larsson <lukas@erlang.org>2020-02-24 13:38:53 +0100
commitdd3b0157d2b20adacd98fea64b3af443b6639b9a (patch)
tree8b2a1bd6678d159e287dcf0a38c3dd58a1526f29
parent912db3529b2485261baf38f5a5855acf4a147fbb (diff)
parent1befa3c8ea9c1ddab1da4c5f94b5c64dc240dacd (diff)
downloaderlang-dd3b0157d2b20adacd98fea64b3af443b6639b9a.tar.gz
Merge branch 'lukas/kernel/code-chunk-lookup/OTP-16494/OTP-16222/OTP-16406/OTP-16499/OTP-16500/OTP-16501/OTP-16502/OTP-16503'
* lukas/kernel/code-chunk-lookup/OTP-16494/OTP-16222/OTP-16406/OTP-16499/OTP-16500/OTP-16501/OTP-16502/OTP-16503: (27 commits) otp: Update doc build instructions with DOC_TARGETS Include erts in travis dialyzer run erts: Fix unmatched return dialyzer warning Move chunk into erlang module for speed Update primary bootstrap Add DOC_TARGETS makefile variable Start work on documentation for EEP-48 Remove term_to_binary of doc chunks doc content Use <code> for monospace, remove anno, add <a marker> Insert newline before paragraph if the previous element did not Generate hidden chunk files for any internal modules Implement EEP-48 aka doc chunks doc: Move typer cli app to REF1 section otp: Refactor doc make system and introduce EEP-48 Fix docs to handle chunk generation Fix mnesia docs to use common name convention Fix ssh type doc to use common name convention Fix ssl doc to use a single name convention Add Module prefix to all callbacks docgen: Remove many dead entities from dtds ...
-rw-r--r--.gitignore4
-rw-r--r--.travis.yml36
-rw-r--r--HOWTO/INSTALL.md10
-rw-r--r--bootstrap/lib/kernel/include/eep48.hrl14
-rw-r--r--bootstrap/lib/stdlib/ebin/shell_docs.beambin0 -> 13036 bytes
-rw-r--r--erts/doc/Makefile37
-rw-r--r--erts/doc/src/.gitignore3
-rw-r--r--erts/doc/src/Makefile113
-rw-r--r--erts/doc/src/epmd_cmd.xml (renamed from erts/doc/src/epmd.xml)13
-rw-r--r--erts/doc/src/erl_cmd.xml (renamed from erts/doc/src/erl.xml)8
-rw-r--r--erts/doc/src/erlang.xml3
-rw-r--r--erts/doc/src/erlc_cmd.xml (renamed from erts/doc/src/erlc.xml)3
-rw-r--r--erts/doc/src/erlsrv_cmd.xml (renamed from erts/doc/src/erlsrv.xml)13
-rw-r--r--erts/doc/src/escript_cmd.xml (renamed from erts/doc/src/escript.xml)3
-rw-r--r--erts/doc/src/ref_man.xml.src18
-rw-r--r--erts/doc/src/run_erl_cmd.xml (renamed from erts/doc/src/run_erl.xml)5
-rw-r--r--erts/doc/src/start_cmd.xml (renamed from erts/doc/src/start.xml)5
-rw-r--r--erts/doc/src/start_erl_cmd.xml (renamed from erts/doc/src/start_erl.xml)7
-rw-r--r--erts/doc/src/werl_cmd.xml (renamed from erts/doc/src/werl.xml)9
-rw-r--r--erts/preloaded/ebin/erl_prim_loader.beambin52296 -> 52304 bytes
-rw-r--r--erts/preloaded/src/erl_prim_loader.erl24
-rw-r--r--erts/test/otp_SUITE.erl16
-rw-r--r--lib/asn1/doc/src/Makefile79
-rw-r--r--lib/asn1/doc/users_guide/Makefile3
-rw-r--r--lib/common_test/doc/src/Makefile89
-rw-r--r--lib/common_test/doc/src/ct_run_cmd.xml (renamed from lib/common_test/doc/src/ct_run.xml)3
-rw-r--r--lib/common_test/doc/src/ref_man.xml2
-rw-r--r--lib/compiler/doc/src/Makefile83
-rw-r--r--lib/crypto/doc/src/Makefile79
-rw-r--r--lib/crypto/doc/src/insidecover.xml26
-rw-r--r--lib/debugger/doc/src/Makefile84
-rw-r--r--lib/debugger/doc/src/attach.jpg (renamed from lib/debugger/doc/src/images/attach.jpg)bin56341 -> 56341 bytes
-rw-r--r--lib/debugger/doc/src/cond_break_dialog.jpg (renamed from lib/debugger/doc/src/images/cond_break_dialog.jpg)bin21770 -> 21770 bytes
-rw-r--r--lib/debugger/doc/src/debugger_chapter.xml14
-rw-r--r--lib/debugger/doc/src/function_break_dialog.jpg (renamed from lib/debugger/doc/src/images/function_break_dialog.jpg)bin13532 -> 13532 bytes
-rw-r--r--lib/debugger/doc/src/interpret.jpg (renamed from lib/debugger/doc/src/images/interpret.jpg)bin28924 -> 28924 bytes
-rw-r--r--lib/debugger/doc/src/line_break_dialog.jpg (renamed from lib/debugger/doc/src/images/line_break_dialog.jpg)bin14414 -> 14414 bytes
-rw-r--r--lib/debugger/doc/src/monitor.jpg (renamed from lib/debugger/doc/src/images/monitor.jpg)bin40742 -> 40742 bytes
-rw-r--r--lib/debugger/doc/src/view.jpg (renamed from lib/debugger/doc/src/images/view.jpg)bin34504 -> 34504 bytes
-rw-r--r--lib/dialyzer/doc/src/Makefile76
-rw-r--r--lib/dialyzer/doc/src/ref_man.xml3
-rw-r--r--lib/dialyzer/doc/src/typer_cmd.xml (renamed from lib/dialyzer/doc/src/typer.xml)12
-rw-r--r--lib/dialyzer/src/dialyzer_cl_parse.erl16
-rw-r--r--lib/diameter/doc/src/Makefile116
-rw-r--r--lib/diameter/doc/src/diameterc_cmd.xml (renamed from lib/diameter/doc/src/diameterc.xml)0
-rw-r--r--lib/diameter/doc/src/files.mk4
-rw-r--r--lib/diameter/doc/src/ref_man.xml2
-rw-r--r--lib/edoc/doc/src/Makefile97
-rw-r--r--lib/eldap/doc/src/Makefile76
-rw-r--r--lib/erl_docgen/doc/src/Makefile78
-rw-r--r--lib/erl_docgen/doc/src/block_tags.xml16
-rw-r--r--lib/erl_docgen/doc/src/doc_storage.xml61
-rw-r--r--lib/erl_docgen/doc/src/inline_tags.xml40
-rw-r--r--lib/erl_docgen/doc/src/part.xml1
-rw-r--r--lib/erl_docgen/priv/bin/chunk.escript30
-rw-r--r--lib/erl_docgen/priv/bin/specs_gen.escript3
-rw-r--r--lib/erl_docgen/priv/css/Makefile9
-rw-r--r--lib/erl_docgen/priv/dtd/Makefile7
-rw-r--r--lib/erl_docgen/priv/dtd/bookinsidecover.dtd37
-rw-r--r--lib/erl_docgen/priv/dtd/cites.dtd36
-rw-r--r--lib/erl_docgen/priv/dtd/common.dtd27
-rw-r--r--lib/erl_docgen/priv/dtd/fascicules.dtd36
-rw-r--r--lib/erl_docgen/priv/dtd/report.dtd141
-rw-r--r--lib/erl_docgen/priv/dtd/terms.dtd37
-rw-r--r--lib/erl_docgen/priv/images/Makefile9
-rw-r--r--lib/erl_docgen/priv/js/flipmenu/Makefile10
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl136
-rw-r--r--lib/erl_docgen/priv/xsl/db_pdf.xsl2
-rw-r--r--lib/erl_docgen/src/Makefile3
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl2
-rw-r--r--lib/erl_docgen/src/docgen_xml_to_chunk.erl757
-rw-r--r--lib/erl_docgen/src/erl_docgen.app.src3
-rw-r--r--lib/erl_interface/doc/src/Makefile69
-rw-r--r--lib/erl_interface/doc/src/erl_call_cmd.xml (renamed from lib/erl_interface/doc/src/erl_call.xml)0
-rw-r--r--lib/erl_interface/doc/src/ref_man.xml2
-rw-r--r--lib/et/doc/src/Makefile80
-rw-r--r--lib/et/doc/src/et_collector.xml24
-rw-r--r--lib/et/doc/src/files.mk2
-rw-r--r--lib/et/src/et_collector.erl2
-rw-r--r--lib/eunit/doc/src/Makefile127
-rw-r--r--lib/ftp/doc/src/Makefile102
-rw-r--r--lib/hipe/doc/src/Makefile76
-rw-r--r--lib/inets/doc/src/Makefile100
-rw-r--r--lib/inets/doc/src/httpd_util.xml8
-rw-r--r--lib/inets/doc/src/introduction.xml2
-rw-r--r--lib/inets/doc/src/part.xml2
-rw-r--r--lib/inets/src/http_server/httpd.erl3
-rw-r--r--lib/jinterface/doc/src/Makefile68
-rw-r--r--lib/kernel/doc/src/Makefile108
-rw-r--r--lib/kernel/doc/src/code.xml32
-rw-r--r--lib/kernel/doc/src/net.xml2
-rw-r--r--lib/kernel/include/eep48.hrl14
-rw-r--r--lib/kernel/src/Makefile3
-rw-r--r--lib/kernel/src/code.erl142
-rw-r--r--lib/kernel/src/code_server.erl33
-rw-r--r--lib/kernel/src/kernel.app.src3
-rw-r--r--lib/kernel/test/code_SUITE.erl45
-rw-r--r--lib/megaco/doc/src/Makefile122
-rw-r--r--lib/megaco/doc/src/definitions/term.defs.xml1518
-rw-r--r--lib/megaco/doc/src/files.mk2
-rw-r--r--lib/megaco/doc/src/megaco.xml17
-rw-r--r--lib/mnesia/doc/misc/Makefile2
-rw-r--r--lib/mnesia/doc/src/Makefile81
-rw-r--r--lib/mnesia/doc/src/Mnesia_chap4.xmlsrc8
-rw-r--r--lib/mnesia/doc/src/mnesia.xml6
-rw-r--r--lib/observer/doc/src/Makefile88
-rw-r--r--lib/observer/doc/src/cdv_cmd.xml (renamed from lib/observer/doc/src/cdv.xml)2
-rw-r--r--lib/observer/doc/src/ref_man.xml2
-rw-r--r--lib/observer/doc/src/ttb.xml17
-rw-r--r--lib/observer/doc/src/ttb_ug.xml4
-rw-r--r--lib/odbc/doc/src/Makefile76
-rw-r--r--lib/os_mon/doc/src/Makefile71
-rw-r--r--lib/parsetools/doc/src/Makefile71
-rw-r--r--lib/parsetools/doc/src/leex.xml12
-rw-r--r--lib/parsetools/doc/src/ref_man.xml6
-rw-r--r--lib/public_key/doc/src/Makefile105
-rw-r--r--lib/reltool/doc/src/Makefile77
-rw-r--r--lib/reltool/doc/src/files.mk3
-rw-r--r--lib/runtime_tools/doc/src/Makefile77
-rw-r--r--lib/runtime_tools/doc/src/dbg.xml2
-rw-r--r--lib/sasl/doc/src/Makefile76
-rw-r--r--lib/snmp/doc/src/Makefile126
-rw-r--r--lib/snmp/doc/src/files.mk16
-rw-r--r--lib/snmp/doc/src/snmp_pdus.xml1
-rw-r--r--lib/ssh/doc/src/Makefile87
-rw-r--r--lib/ssh/doc/src/ssh.xml6
-rw-r--r--lib/ssl/doc/src/Makefile86
-rw-r--r--lib/ssl/doc/src/ssl.xml2
-rw-r--r--lib/stdlib/doc/src/Makefile72
-rw-r--r--lib/stdlib/doc/src/c.xml58
-rw-r--r--lib/stdlib/doc/src/ref_man.xml1
-rw-r--r--lib/stdlib/doc/src/shell_docs.xml120
-rw-r--r--lib/stdlib/doc/src/specs.xml1
-rw-r--r--lib/stdlib/src/Makefile1
-rw-r--r--lib/stdlib/src/c.erl82
-rw-r--r--lib/stdlib/src/edlin_expand.erl78
-rw-r--r--lib/stdlib/src/shell_default.erl15
-rw-r--r--lib/stdlib/src/shell_docs.erl684
-rw-r--r--lib/stdlib/src/stdlib.app.src1
-rw-r--r--lib/stdlib/test/Makefile6
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE.erl32
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps.erl (renamed from lib/stdlib/test/ExpandTestCaps.erl)0
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps1.erl (renamed from lib/stdlib/test/ExpandTestCaps1.erl)0
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE_data/expand_test.erl (renamed from lib/stdlib/test/expand_test.erl)0
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE_data/expand_test1.erl (renamed from lib/stdlib/test/expand_test1.erl)0
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE_data/unicode_expand.erl (renamed from lib/stdlib/test/unicode_expand.erl)0
-rw-r--r--lib/stdlib/test/shell_docs_SUITE.erl88
-rw-r--r--lib/syntax_tools/doc/src/Makefile101
-rw-r--r--lib/tftp/doc/src/Makefile100
-rw-r--r--lib/tools/doc/src/Makefile77
-rw-r--r--lib/tools/doc/src/cprof.xml2
-rw-r--r--lib/tools/doc/src/xref.xml2
-rw-r--r--lib/tools/emacs/Makefile16
-rw-r--r--lib/tools/src/eprof.erl2
-rw-r--r--lib/wx/doc/src/Makefile95
-rw-r--r--lib/xmerl/doc/src/Makefile118
-rw-r--r--lib/xmerl/doc/src/xmerl_sax_parser.xml8
-rw-r--r--make/doc.mk215
-rw-r--r--make/otp.mk.in24
-rw-r--r--make/otp_release_targets.mk18
-rwxr-xr-xscripts/build-otp2
-rwxr-xr-xscripts/run-dialyzer1
-rw-r--r--system/doc/definitions/term.defs.xml1525
-rw-r--r--system/doc/design_principles/Makefile13
-rw-r--r--system/doc/efficiency_guide/Makefile14
-rw-r--r--system/doc/embedded/Makefile16
-rw-r--r--system/doc/general_info/Makefile15
-rw-r--r--system/doc/getting_started/Makefile14
-rw-r--r--system/doc/installation_guide/Makefile13
-rw-r--r--system/doc/oam/Makefile14
-rw-r--r--system/doc/programming_examples/Makefile16
-rw-r--r--system/doc/reference_manual/Makefile30
-rw-r--r--system/doc/system_architecture_intro/Makefile16
-rw-r--r--system/doc/system_principles/Makefile15
-rw-r--r--system/doc/top/Makefile41
-rw-r--r--system/doc/top/print.html2
-rw-r--r--system/doc/tutorial/Makefile12
177 files changed, 3031 insertions, 7252 deletions
diff --git a/.gitignore b/.gitignore
index 754d13515c..f06f8291f4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -185,6 +185,8 @@ JAVADOC-GENERATED
/lib/*/doc/pdf/*.pdf
/lib/*/doc/src/*.fo
/lib/*/doc/xml/*.xml
+/lib/*/doc/xml/*.ent
+/lib/*/doc/chunks/*.chunk
/lib/config.log
/lib/config.status
@@ -283,6 +285,8 @@ JAVADOC-GENERATED
/erts/doc/pdf/*.pdf
/erts/doc/src/*.fo
/erts/doc/xml/*.xml
+/erts/doc/xml/figures/*.png
+/erts/doc/chunks/*.chunk
/erts/doc/man[0-9]/*.[0-9]
/erts/doc/CONF_INFO
diff --git a/.travis.yml b/.travis.yml
index 2f063bfd8d..b94af2281a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,7 +36,24 @@ matrix:
script:
- ./scripts/build-otp
- ./scripts/run-dialyzer
-
+ # Doc build second as it also takes a long time to run
+ - env: Linux64Docbuild
+ script:
+ - ./scripts/build-otp docs
+ deploy:
+ provider: pages
+ repo: erlang/cd
+ target-branch: master
+ skip-cleanup: true
+ keep-history: false
+ verbose: true
+ github-token: $ERLANG_CD_GITHUB_TOKEN
+ on:
+ # We only deploy on pushes to branches
+ all_branches: true
+ tags: false
+ condition: $TRAVIS_PULL_REQUEST = "false"
+ repo: erlang/otp
- env: Linux32
services:
- docker
@@ -91,23 +108,6 @@ matrix:
- xsltproc
- libxml2-utils
- - env: Linux64Docbuild
- script:
- - ./scripts/build-otp docs
- deploy:
- provider: pages
- repo: erlang/cd
- target-branch: master
- skip-cleanup: true
- keep-history: false
- verbose: true
- github-token: $ERLANG_CD_GITHUB_TOKEN
- on:
- # We only deploy on pushes to branches
- all_branches: true
- tags: false
- condition: $TRAVIS_PULL_REQUEST = "false"
- repo: erlang/otp
# This stage publishes a otp bundle that contains multiple
# Erlang/OTP source repositories
- stage: deploy
diff --git a/HOWTO/INSTALL.md b/HOWTO/INSTALL.md
index 0c7de9d4e6..3af9091468 100644
--- a/HOWTO/INSTALL.md
+++ b/HOWTO/INSTALL.md
@@ -217,6 +217,12 @@ Build the documentation.
$ make docs
+It is possible to limit which types of documentation is build by passing the `DOC_TARGETS`
+environment variable to `make docs`. The currently available types are: `html`, `pdf`, `man` and
+`chunks`. Example:
+
+ $ make docs DOC_TARGETS=chunks
+
#### Build Issues ####
We have sometimes experienced problems with Oracle's `java` running out of
@@ -247,6 +253,8 @@ or using the `release_docs` target.
$ make release_docs RELEASE_ROOT=<release dir>
+It is possible to limit which types of documentation is released using the same `DOC_TARGETS`
+environment variable as when building documentation.
### Accessing the Documentation ###
@@ -261,6 +269,8 @@ After installation you can access the documentation by
* Browsing the html pages by loading the page `/usr/local/lib/erlang/doc/erlang/index.html`
or `<BaseDir>/lib/erlang/doc/erlang/index.html` if the prefix option has been used.
+* Read the embedded documentation by using the built-in shell functions `h/1,2,3` or
+ `ht/1,2,3`.
### How to Install the Pre-formatted Documentation ###
diff --git a/bootstrap/lib/kernel/include/eep48.hrl b/bootstrap/lib/kernel/include/eep48.hrl
new file mode 100644
index 0000000000..2ce9a1430a
--- /dev/null
+++ b/bootstrap/lib/kernel/include/eep48.hrl
@@ -0,0 +1,14 @@
+-define(NATIVE_FORMAT,<<"application/erlang+html">>).
+-define(CURR_DOC_VERSION, {1,0,0}).
+-record(docs_v1, {anno,
+ beam_language = erlang,
+ format = ?NATIVE_FORMAT,
+ module_doc,
+ metadata = #{ otp_doc_vsn => ?CURR_DOC_VERSION },
+ docs}).
+
+-record(docs_v1_entry, {kind_name_arity,
+ anno,
+ signature,
+ doc,
+ metadata}).
diff --git a/bootstrap/lib/stdlib/ebin/shell_docs.beam b/bootstrap/lib/stdlib/ebin/shell_docs.beam
new file mode 100644
index 0000000000..82bf544fc1
--- /dev/null
+++ b/bootstrap/lib/stdlib/ebin/shell_docs.beam
Binary files differ
diff --git a/erts/doc/Makefile b/erts/doc/Makefile
deleted file mode 100644
index f26a43592e..0000000000
--- a/erts/doc/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-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%
-#
-
-#
-# Default Rules
-#
-OTP_MAKE_ROOT=/home/super/otp/otp_make
-include $(OTP_MAKE_ROOT)/otp.mk
-
-#
-# Macros
-#
-SUB_DIRECTORIES = src
-
-SPECIAL_TARGETS =
-
-#
-# Default Subdir Targets
-#
-include $(OTP_MAKE_ROOT)/otp_subdir.mk
diff --git a/erts/doc/src/.gitignore b/erts/doc/src/.gitignore
new file mode 100644
index 0000000000..abe9a7d858
--- /dev/null
+++ b/erts/doc/src/.gitignore
@@ -0,0 +1,3 @@
+ref_man.xml
+specs.xml
+part.xml \ No newline at end of file
diff --git a/erts/doc/src/Makefile b/erts/doc/src/Makefile
index bb96293947..3e2eb80b50 100644
--- a/erts/doc/src/Makefile
+++ b/erts/doc/src/Makefile
@@ -37,15 +37,15 @@ RELSYSDIR = $(RELEASE_PATH)/$(APPLICATION)-$(VSN)
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
-XML_REF1_FILES = epmd.xml \
- erl.xml \
- erlc.xml \
- escript.xml \
- werl.xml \
- erlsrv.xml \
- start_erl.xml \
- run_erl.xml \
- start.xml
+XML_REF1_FILES = epmd_cmd.xml \
+ erl_cmd.xml \
+ erlc_cmd.xml \
+ escript_cmd.xml \
+ werl_cmd.xml \
+ erlsrv_cmd.xml \
+ start_erl_cmd.xml \
+ run_erl_cmd.xml \
+ start_cmd.xml
ifeq ($(USE_ESOCK), yes)
XML_REF3_ESOCK_EFILES = socket.xml
@@ -72,13 +72,16 @@ XML_REF3_EFILES = \
zlib.xml \
$(XML_REF3_ESOCK_EFILES)
-XML_REF3_FILES = \
- $(XML_REF3_EFILES) \
+XML_REF3_CREF = \
driver_entry.xml \
erl_nif.xml \
erl_driver.xml \
erts_alloc.xml
+XML_REF3_FILES = \
+ $(XML_REF3_EFILES) \
+ $(XML_REF3_CREF)
+
XML_PART_FILES = \
part.xml internal.xml
@@ -96,7 +99,6 @@ XML_INTERNAL_FILES = \
SuperCarrier.xml \
CountingInstructions.xml
-
XML_CHAPTER_FILES = \
introduction.xml \
tty.xml \
@@ -118,32 +120,24 @@ TOPDOCDIR=../../../doc
BOOK_FILES = book.xml
-GIF_FILES = \
+IMAGE_FILES = \
erl_ext_fig.gif
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF1_FILES) $(XML_APPLICATION_FILES)
+HTML_EXTRA_FILES = $(ERL_TOP)/erts/example/time_compat.erl \
+ $(ERL_TOP)/lib/kernel/examples/gen_tcp_dist/src/gen_tcp_dist.erl
+
XML_GEN_FILES = $(XML_INTERNAL_FILES:%=$(XMLDIR)/%)
-# ----------------------------------------------------
+NO_CHUNKS = $(XML_REF3_CREF) erl_tracer.xml
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
+# ----------------------------------------------------
-INFO_FILE = ../../info
INFO_FILE_SRC = ../../info.src
-MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1)
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_EFILES:%.xml=$(SPECDIR)/specs_%.xml)
-
TOP_SPECS_FILE = specs.xml
XML_FIGURE_DIR = $(XMLDIR)/figures
@@ -153,60 +147,24 @@ PNG_FILES = $(notdir $(INTERNAL_DOC_PNG_FILES))
XMLDIR_PNG_FILES = $(PNG_FILES:%=$(XML_FIGURE_DIR)/%)
# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-KERNEL_SRC=$(ERL_TOP)/lib/kernel/src
-KERNEL_INCLUDE=$(ERL_TOP)/lib/kernel/include
-SPECS_FLAGS = -I$(KERNEL_SRC) -I$(KERNEL_INCLUDE)
-
-# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-_create_dirs := $(shell mkdir -p $(XML_FIGURE_DIR))
+include $(ERL_TOP)/make/doc.mk
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
+_create_dirs := $(shell mkdir -p $(XML_FIGURE_DIR))
$(XML_FIGURE_DIR)/%.png: ../../emulator/internal_doc/figures/%.png
$(INSTALL_DATA) $< $@
-docs: part ref_man specs figures man pdf html $(INFO_FILE)
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN1_FILES) $(MAN3_FILES)
-
-ref_man: ref_man.xml
-part: part.xml
-specs: specs.xml
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
+html: figures
$(INFO_FILE): $(INFO_FILE_SRC) $(ERL_TOP)/make/$(TARGET)/otp.mk
sed -e 's;%RELEASE%;$(SYSTEM_VSN);' $(INFO_FILE_SRC) > $(INFO_FILE)
figures: $(XMLDIR_PNG_FILES)
-debug opt:
-
-ldocs: xmllint local_docs
-
-clean:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN1DIR)/*
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECDIR)/*
- rm -f errs core *~
-
-$(SPECDIR)/specs_%.xml:
+## This rule generate dummy specs for all XML_REF3_CREF's
+$(XML_REF3_CREF:%.xml=$(SPECDIR)/specs_%.xml): $(@:%.xml=%.xml)
$(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \
-o$(dir $@) -module $(patsubst $(SPECDIR)/specs_%.xml,%,$@)
@@ -229,25 +187,10 @@ specs.xml: specs.xml.src
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
+release_html_spec: release_figures
+
+release_figures:
$(INSTALL_DIR) "$(RELSYSDIR)/doc/html/figures"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
$(INSTALL_DATA) $(XMLDIR)/figures/* \
"$(RELSYSDIR)/doc/html/figures"
- $(INSTALL_DATA) $(ERL_TOP)/erts/example/time_compat.erl \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(ERL_TOP)/lib/kernel/examples/gen_tcp_dist/src/gen_tcp_dist.erl \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DATA) $(MAN1_FILES) "$(RELEASE_PATH)/man/man1"
-
-release_spec:
diff --git a/erts/doc/src/epmd.xml b/erts/doc/src/epmd_cmd.xml
index 75353cbc07..ee886bd68e 100644
--- a/erts/doc/src/epmd.xml
+++ b/erts/doc/src/epmd_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -19,11 +19,11 @@
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.
-
+
</legalnotice>
<title>epmd</title>
- <prepared>Claes Wikstr&ouml;m</prepared>
+ <prepared>Claes Wikstr&ouml;m</prepared>
<responsible></responsible>
<docno>1</docno>
<approved></approved>
@@ -295,9 +295,8 @@
<title>Logging</title>
<p>On some operating systems <em>syslog</em> will be used for
error reporting when <c>epmd</c> runs as a daemon. To enable
- the error logging, you must edit the
- <path unix="" windows="">/etc/syslog.conf</path> file and add an
- entry:</p>
+ the error logging, you must edit the /etc/syslog.conf file and
+ add an entry:</p>
<code type="none"><![CDATA[
!epmd
@@ -334,5 +333,3 @@
<p>To restrict access further, firewall software must be used.</p>
</section>
</comref>
-
-
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl_cmd.xml
index e94d71e27b..64663ce95e 100644
--- a/erts/doc/src/erl.xml
+++ b/erts/doc/src/erl_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -181,7 +181,7 @@
which is used to start the system; see
<seealso marker="init"><c>init(3)</c></seealso>. Unless
<c><![CDATA[File]]></c> contains an absolute path, the system searches
- for <c><![CDATA[File.boot]]></c> in the current and
+ for <c><![CDATA[File.boot]]></c> in the current and
<c><![CDATA[$ROOT/bin]]></c> directories.</p>
<p>Defaults to <c><![CDATA[$ROOT/bin/start.boot]]></c>.</p>
</item>
@@ -852,7 +852,7 @@
<p>Sets the range of characters that the system considers printable in
heuristic detection of strings. This typically affects the shell,
debugger, and <c>io:format</c> functions (when <c>~tp</c> is used in
- the format string).</p>
+ the format string).</p>
<p>Two values are supported for <c>Range</c>:</p>
<taglist>
<tag><c>latin1</c></tag>
@@ -1275,7 +1275,7 @@
node identifiers can be omitted. If omitted, the thread ID
defaults to <c>t0</c>, the core ID defaults to <c>c0</c>,
the processor ID defaults to <c>p0</c>, and the node ID is
- left undefined. Either each logical processor must
+ left undefined. Either each logical processor must
belong to only one NUMA node, or no logical
processors must belong to any NUMA nodes.</p>
<p>Both increasing and decreasing <c><![CDATA[<IdRange>]]></c>s
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index ec30006fad..7c8591f719 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -8271,7 +8271,7 @@ Metadata = #{ pid => pid(),
</func>
<func>
- <name name="system_info" arity="1" clause_i="76" since=""/>
+ <name name="system_info" arity="1" clause_i="77" since=""/>
<fsummary>System info overview.</fsummary>
<desc>
<p>Returns information about the current system.
@@ -9602,6 +9602,7 @@ Metadata = #{ pid => pid(),
<name name="system_info" arity="1" clause_i="75" since=""/> <!-- version -->
<name name="system_info" arity="1" clause_i="76" since=""/> <!-- wordsize -->
<!-- <name name="system_info" arity="1" clause_i="77"/> overview -->
+ <!-- When adding any entry, make sure to update the overview clause_i -->
<fsummary>Information about the system.</fsummary>
<desc>
<marker id="system_info_misc_tags"/>
diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc_cmd.xml
index f1f2c786da..55a4712b25 100644
--- a/erts/doc/src/erlc.xml
+++ b/erts/doc/src/erlc_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -387,4 +387,3 @@ erlc +export_all file.erl</pre>
<seealso marker="snmp:snmp"><c>snmp(3)</c></seealso></p>
</section>
</comref>
-
diff --git a/erts/doc/src/erlsrv.xml b/erts/doc/src/erlsrv_cmd.xml
index 6c08b25220..1db5fcd9db 100644
--- a/erts/doc/src/erlsrv.xml
+++ b/erts/doc/src/erlsrv_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -43,7 +43,7 @@
Windows services applet in a manner similar to other services.</p>
<p>Notice that <c>erlsrv</c> is not a general service utility for Windows,
- but designed for embedded Erlang systems.</p>
+ but designed for embedded Erlang systems.</p>
<p><c>erlsrv</c> also provides a command-line interface for registering,
changing, starting, and stopping services.</p>
@@ -471,10 +471,10 @@
<code type="none"><![CDATA[
#include <windows.h>
-/*
+/*
** A Console control handler that ignores the log off events,
** and lets the default handler take care of other events.
-*/
+*/
BOOL WINAPI service_aware_handler(DWORD ctrl){
if(ctrl == CTRL_LOGOFF_EVENT)
return TRUE;
@@ -485,8 +485,8 @@ BOOL WINAPI service_aware_handler(DWORD ctrl){
void initialize_handler(void){
char buffer[2];
- /*
- * We assume we are running as a service if this
+ /*
+ * We assume we are running as a service if this
* environment variable is defined.
*/
if(GetEnvironmentVariable("ERLSRV_SERVICE_NAME",buffer,
@@ -530,4 +530,3 @@ void initialize_handler(void){
<c>release_handler(3)</c></seealso></p>
</section>
</comref>
-
diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript_cmd.xml
index be1664b39f..4ca7e46e6e 100644
--- a/erts/doc/src/escript.xml
+++ b/erts/doc/src/escript_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -448,4 +448,3 @@ ok
</taglist>
</section>
</comref>
-
diff --git a/erts/doc/src/ref_man.xml.src b/erts/doc/src/ref_man.xml.src
index 7dd003763c..5b327165d4 100644
--- a/erts/doc/src/ref_man.xml.src
+++ b/erts/doc/src/ref_man.xml.src
@@ -34,24 +34,24 @@
<xi:include href="atomics.xml"/>
<xi:include href="counters.xml"/>
<xi:include href="driver_entry.xml"/>
- <xi:include href="epmd.xml"/>
- <xi:include href="erl.xml"/>
+ <xi:include href="epmd_cmd.xml"/>
+ <xi:include href="erl_cmd.xml"/>
<xi:include href="erlang.xml"/>
- <xi:include href="erlc.xml"/>
+ <xi:include href="erlc_cmd.xml"/>
<xi:include href="erl_driver.xml"/>
<xi:include href="erl_nif.xml"/>
<xi:include href="erl_prim_loader.xml"/>
- <xi:include href="erlsrv.xml"/>
+ <xi:include href="erlsrv_cmd.xml"/>
<xi:include href="erl_tracer.xml"/>
<xi:include href="erts_alloc.xml"/>
- <xi:include href="escript.xml"/>
+ <xi:include href="escript_cmd.xml"/>
<xi:include href="init.xml"/>
<xi:include href="persistent_term.xml"/>
- <xi:include href="run_erl.xml"/>
+ <xi:include href="run_erl_cmd.xml"/>
%ESOCK_USE_SOCKET_XML%
- <xi:include href="start.xml"/>
- <xi:include href="start_erl.xml"/>
- <xi:include href="werl.xml"/>
+ <xi:include href="start_cmd.xml"/>
+ <xi:include href="start_erl_cmd.xml"/>
+ <xi:include href="werl_cmd.xml"/>
<xi:include href="zlib.xml"/>
</application>
diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl_cmd.xml
index fa36457489..9f1984f784 100644
--- a/erts/doc/src/run_erl.xml
+++ b/erts/doc/src/run_erl_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -19,7 +19,7 @@
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.
-
+
</legalnotice>
<title>run_erl</title>
@@ -213,4 +213,3 @@
<seealso marker="start_erl"><c>start_erl(1)</c></seealso></p>
</section>
</comref>
-
diff --git a/erts/doc/src/start.xml b/erts/doc/src/start_cmd.xml
index 6eac47fe94..9f208d43bb 100644
--- a/erts/doc/src/start.xml
+++ b/erts/doc/src/start_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -19,7 +19,7 @@
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.
-
+
</legalnotice>
<title>start</title>
@@ -70,4 +70,3 @@
<seealso marker="start_erl"><c>start_erl(1)</c></seealso></p>
</section>
</comref>
-
diff --git a/erts/doc/src/start_erl.xml b/erts/doc/src/start_erl_cmd.xml
index 4887d4606e..e9cb248da4 100644
--- a/erts/doc/src/start_erl.xml
+++ b/erts/doc/src/start_erl_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -19,7 +19,7 @@
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.
-
+
</legalnotice>
<title>start_erl</title>
@@ -89,7 +89,7 @@
only option <c>-rootdir</c> is specified, the directory is
assumed to be &lt;Erlang root&gt;\\releases.</p>
</item>
- <tag><c>-rootdir &lt;Erlang root directory&gt;</c></tag>
+ <tag><c>-rootdir &lt;Erlang root directory&gt;</c></tag>
<item>
<p>Mandatory if <c>-reldir</c> is not specified and no
<c><![CDATA[RELDIR]]></c> exists in the environment. This
@@ -166,4 +166,3 @@
<c>release_handler(3)</c></seealso></p>
</section>
</comref>
-
diff --git a/erts/doc/src/werl.xml b/erts/doc/src/werl_cmd.xml
index 792fe204e8..4f25565c64 100644
--- a/erts/doc/src/werl.xml
+++ b/erts/doc/src/werl_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -19,7 +19,7 @@
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.
-
+
</legalnotice>
<title>werl</title>
@@ -62,7 +62,7 @@
<p>In cases where you want to redirect standard input and/or
standard output or use Erlang in a pipeline, <c>werl</c> is
not suitable, and the <c>erl</c> program is to be used instead.</p>
-
+
<p>The <c>werl</c> window is in many ways modeled after the <c>xterm</c>
window present on other platforms, as the <c>xterm</c> model
fits well with line-oriented command-based interaction. This
@@ -102,7 +102,7 @@
use <c>Ctrl-P</c>.</p>
</item>
</list>
-
+
<p>A drop-down box in the toolbar contains the command
history. Selecting a command in the drop-down box inserts the command
at the prompt, as if you used the keyboard to retrieve the
@@ -115,4 +115,3 @@
</list>
</description>
</comref>
-
diff --git a/erts/preloaded/ebin/erl_prim_loader.beam b/erts/preloaded/ebin/erl_prim_loader.beam
index 5ac67854c5..9490303fb8 100644
--- a/erts/preloaded/ebin/erl_prim_loader.beam
+++ b/erts/preloaded/ebin/erl_prim_loader.beam
Binary files differ
diff --git a/erts/preloaded/src/erl_prim_loader.erl b/erts/preloaded/src/erl_prim_loader.erl
index 89c535c43a..658a138694 100644
--- a/erts/preloaded/src/erl_prim_loader.erl
+++ b/erts/preloaded/src/erl_prim_loader.erl
@@ -300,18 +300,18 @@ check_file_result(Func, Target, {error,Reason}) ->
%% This is equal to calling logger:error/2 which
%% we don't want to do from code_server during system boot.
%% We don't want to call logger:timestamp() either.
- try
- logger ! {log,error,#{label=>{?MODULE,file_error},report=>Report},
- #{pid=>self(),
- gl=>group_leader(),
- time=>os:system_time(microsecond),
- error_logger=>#{tag=>error_report,
- type=>std_error}}}
- catch _:_ ->
- %% If logger has not been started yet we just display it
- erlang:display({?MODULE,file_error}),
- erlang:display(Report)
- end,
+ _ = try
+ logger ! {log,error,#{label=>{?MODULE,file_error},report=>Report},
+ #{pid=>self(),
+ gl=>group_leader(),
+ time=>os:system_time(microsecond),
+ error_logger=>#{tag=>error_report,
+ type=>std_error}}}
+ catch _:_ ->
+ %% If logger has not been started yet we just display it
+ erlang:display({?MODULE,file_error}),
+ erlang:display(Report)
+ end,
error
end;
check_file_result(_, _, Other) ->
diff --git a/erts/test/otp_SUITE.erl b/erts/test/otp_SUITE.erl
index c5e0dfe649..3f4f3f9574 100644
--- a/erts/test/otp_SUITE.erl
+++ b/erts/test/otp_SUITE.erl
@@ -57,8 +57,14 @@ init_per_suite(Config) ->
{error,bad_name} ->
Erts = filename:join([code:root_dir(),"erts","preloaded","ebin"]),
{ok,_} = xref:add_directory(Server, Erts, []);
- _ ->
- ok
+ LibDir ->
+ case file:read_file_info(filename:join([LibDir,"ebin"])) of
+ {error,enoent} ->
+ Erts = filename:join([LibDir, "preloaded","ebin"]),
+ {ok,_} = xref:add_directory(Server, Erts, []);
+ _ ->
+ ok
+ end
end,
[{xref_server,Server}|Config].
@@ -91,9 +97,9 @@ undefined_functions(Config) when is_list(Config) ->
_ ->
Fd = open_log(Config, "undefined_functions"),
foreach(fun ({MFA1,MFA2}) ->
- io:format("~s calls undefined ~s",
- [format_mfa(Server, MFA1),
- format_mfa(MFA2)]),
+ ct:pal("~s calls undefined ~s",
+ [format_mfa(Server, MFA1),
+ format_mfa(MFA2)]),
io:format(Fd, "~s ~s\n",
[format_mfa(Server, MFA1),
format_mfa(MFA2)])
diff --git a/lib/asn1/doc/src/Makefile b/lib/asn1/doc/src/Makefile
index 9c0d865884..c18f567240 100644
--- a/lib/asn1/doc/src/Makefile
+++ b/lib/asn1/doc/src/Makefile
@@ -21,6 +21,7 @@
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
# ----------------------------------------------------
# Application version
# ----------------------------------------------------
@@ -29,11 +30,6 @@ VSN=$(ASN1_VSN)
APPLICATION=asn1
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -47,6 +43,7 @@ XML_PART_FILES = part.xml
XML_HTML_FILE = \
notes_history.xml
+
XML_CHAPTER_FILES = \
asn1_introduction.xml \
asn1_getting_started.xml \
@@ -60,77 +57,11 @@ XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
XML_GEN_FILES = $(GEN_XML:%=$(XMLDIR)/%)
-GIF_FILES = \
+IMAGE_FILES = \
exclusive_Win_But.gif \
selective_Window2.gif \
selective_TypeList.gif
-# ----------------------------------------------------
-
-ASN1_FILES = \
- Seq.asn \
- Seq.asn1config
-
-INFO_FILE = ../../info
-EXTRA_FILES = \
- $(DEFAULT_HTML_FILES) \
- $(ASN1_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(GEN_XML:%.xml=$(HTMLDIR)/%.html) \
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(GEN_XML) errs core *~
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
+include $(ERL_TOP)/make/doc.mk
-release_spec:
+.SECONDARY: $(XML_GEN_FILES)
diff --git a/lib/asn1/doc/users_guide/Makefile b/lib/asn1/doc/users_guide/Makefile
index 38196f5e1c..079af7ac1f 100644
--- a/lib/asn1/doc/users_guide/Makefile
+++ b/lib/asn1/doc/users_guide/Makefile
@@ -40,8 +40,7 @@ PSFIG_FILES=
USERS_GUIDE = users_guide.sgml
EXTRA_GEN_FILES= $(SGML_FILES:.sgml=.html) \
- users_guide_frame.html users_guide_first.html \
- min_head.gif
+ users_guide_frame.html users_guide_first.html
HTML_FILES= $(USERS_GUIDE:.sgml=.html)
diff --git a/lib/common_test/doc/src/Makefile b/lib/common_test/doc/src/Makefile
index ae06572752..3a37cac09c 100644
--- a/lib/common_test/doc/src/Makefile
+++ b/lib/common_test/doc/src/Makefile
@@ -27,10 +27,6 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
include ../../vsn.mk
VSN=$(COMMON_TEST_VSN)
APPLICATION=common_test
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# ----------------------------------------------------
# Target Specs
@@ -39,7 +35,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
CT_XML_FILES = $(CT_MODULES:=.xml)
XML_APPLICATION_FILES = ref_man.xml
-XML_REF1_FILES = ct_run.xml
+XML_REF1_FILES = ct_run_cmd.xml
# REMEMBER: links to HTML files for these modules in ref_man.xml
XML_REF3_FILES = ct.xml \
ct_master.xml \
@@ -80,95 +76,18 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
-GIF_FILES = \
+IMAGE_FILES = \
tc_execution.gif \
config.gif \
html_logs.gif
-INSTALL_NOTES = ../../notes.html
-
XML_FILES=$(XML_APPLICATION_FILES) $(XML_REF1_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \
$(XML_PART_FILES) $(XML_CHAPTER_FILES) $(BOOK_FILES)
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1)
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
-
TOP_SPECS_FILE = specs.xml
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-SPECS_FLAGS = -I../../include -I../../../snmp/include \
- -I../../../kernel/include
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: man pdf html
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-man: $(MAN6_FILES) $(MAN3_FILES) $(MAN1_FILES)
+NO_CHUNKS = ct_hooks.xml
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN1DIR)/*
- rm -f $(MAN3DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECDIR)/*
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DATA) $(MAN1DIR)/* "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6DIR)/* "$(RELEASE_PATH)/man/man6"
-
-release_spec:
-release_tests_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/common_test/doc/src/ct_run.xml b/lib/common_test/doc/src/ct_run_cmd.xml
index 5b962ed5c7..3a9b8bbc03 100644
--- a/lib/common_test/doc/src/ct_run.xml
+++ b/lib/common_test/doc/src/ct_run_cmd.xml
@@ -11,7 +11,7 @@
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
@@ -226,4 +226,3 @@
</section>
</comref>
-
diff --git a/lib/common_test/doc/src/ref_man.xml b/lib/common_test/doc/src/ref_man.xml
index 1ac20db5c2..e916fc7cec 100644
--- a/lib/common_test/doc/src/ref_man.xml
+++ b/lib/common_test/doc/src/ref_man.xml
@@ -33,7 +33,7 @@
</description>
<xi:include href="common_test_app.xml"/>
- <xi:include href="ct_run.xml"/>
+ <xi:include href="ct_run_cmd.xml"/>
<xi:include href="ct.xml"/>
<xi:include href="ct_master.xml"/>
<xi:include href="ct_cover.xml"/>
diff --git a/lib/compiler/doc/src/Makefile b/lib/compiler/doc/src/Makefile
index 2fb163b9e7..e1c445662c 100644
--- a/lib/compiler/doc/src/Makefile
+++ b/lib/compiler/doc/src/Makefile
@@ -28,94 +28,19 @@ VSN=$(COMPILER_VSN)
APPLICATION=compiler
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-COMPILER_DIR = $(ERL_TOP)/lib/compiler/src
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
XML_REF3_FILES = compile.xml
+EDOC_REF3_FILES = cerl.xml cerl_trees.xml cerl_clauses.xml
XML_PART_FILES = internal.xml
-XML_CHAPTER_FILES = notes.xml
+XML_NOTES_FILES = notes.xml
BOOK_FILES = book.xml
-GIF_FILES =
-
XML_FILES = \
- $(BOOK_FILES) $(XML_CHAPTER_FILES) \
+ $(BOOK_FILES) $(XML_NOTES_FILES) \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-XML_INTERNAL_FILES = \
- cerl.xml cerl_trees.xml cerl_clauses.xml
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-XML_GEN_FILES = $(XML_INTERNAL_FILES:%=$(XMLDIR)/%)
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-$(XML_INTERNAL_FILES:%=$(XMLDIR)/%): $(COMPILER_DIR)/$(@:$(XMLDIR)/%.xml=%.erl)
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(COMPILER_VSN) -dir $(XMLDIR) $(COMPILER_DIR)/$(@:$(XMLDIR)/%.xml=%.erl)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/crypto/doc/src/Makefile b/lib/crypto/doc/src/Makefile
index 8da494dad6..5460129c64 100644
--- a/lib/crypto/doc/src/Makefile
+++ b/lib/crypto/doc/src/Makefile
@@ -27,11 +27,6 @@ VSN=$(CRYPTO_VSN)
APPLICATION=crypto
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -47,78 +42,8 @@ BOOK_FILES = book.xml
XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \
$(XML_PART_FILES) $(XML_CHAPTER_FILES)
-GIF_FILES =
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
+IMAGE_FILES =
TOP_SPECS_FILE = specs.xml
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-#in ssh it looks like this: SPECS_FLAGS = -I../../../public_key/include -I../../../public_key/src -I../../..
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES) $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt valgrind:
-
-clean clean_docs clean_tex:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECS_FILES)
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6DIR)/* "$(RELEASE_PATH)/man/man6"
-
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/crypto/doc/src/insidecover.xml b/lib/crypto/doc/src/insidecover.xml
deleted file mode 100644
index bf2427afdf..0000000000
--- a/lib/crypto/doc/src/insidecover.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE bookinsidecover SYSTEM "bookinsidecover.dtd">
-
-<bookinsidecover>
-
- The Erlang/OTP SSL application includes software developed by the
- OpenSSL Project for use in the OpenSSL Toolkit
- (http://www.openssl.org/). Copyright (c) 1998-2002 The OpenSSL
- Project. All rights reserved.
-
- <br/>
- This product includes cryptographic software written by Eric Young
- (eay@cryptsoft.com). This product includes software written by Tim
- Hudson (tjh@cryptsoft.com). Copyright (C) 1995-1998 Eric Young
- (eay@cryptsoft.com). All rights reserved.
-
- <br/>
- For further OpenSSL and SSLeay license information se the chapter
- <bold>Licenses</bold>.
-
- <vfill/>
- <br/>
- <tt>http://www.erlang.org</tt>
- <br/>
-</bookinsidecover>
-
diff --git a/lib/debugger/doc/src/Makefile b/lib/debugger/doc/src/Makefile
index 49b5a4be57..b02d35b802 100644
--- a/lib/debugger/doc/src/Makefile
+++ b/lib/debugger/doc/src/Makefile
@@ -30,11 +30,6 @@ VSN=$(DEBUGGER_VSN)
APPLICATION=debugger
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -49,74 +44,13 @@ XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) $(XML_PART_FILES) \
$(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-GIF_FILES = \
- images/attach.jpg \
- images/cond_break_dialog.jpg \
- images/function_break_dialog.jpg \
- images/interpret.jpg \
- images/line_break_dialog.jpg \
- images/monitor.jpg \
- images/view.jpg
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.jpg: %.jpg
- $(INSTALL_DIR) $(HTMLDIR)/images
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-debug opt:
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR_DATA) $(HTMLDIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
+IMAGE_FILES = \
+ attach.jpg \
+ cond_break_dialog.jpg \
+ function_break_dialog.jpg \
+ interpret.jpg \
+ line_break_dialog.jpg \
+ monitor.jpg \
+ view.jpg
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/debugger/doc/src/images/attach.jpg b/lib/debugger/doc/src/attach.jpg
index 95f227d21b..95f227d21b 100644
--- a/lib/debugger/doc/src/images/attach.jpg
+++ b/lib/debugger/doc/src/attach.jpg
Binary files differ
diff --git a/lib/debugger/doc/src/images/cond_break_dialog.jpg b/lib/debugger/doc/src/cond_break_dialog.jpg
index 40bcb299a9..40bcb299a9 100644
--- a/lib/debugger/doc/src/images/cond_break_dialog.jpg
+++ b/lib/debugger/doc/src/cond_break_dialog.jpg
Binary files differ
diff --git a/lib/debugger/doc/src/debugger_chapter.xml b/lib/debugger/doc/src/debugger_chapter.xml
index 3c37d4b924..fc7edf07a0 100644
--- a/lib/debugger/doc/src/debugger_chapter.xml
+++ b/lib/debugger/doc/src/debugger_chapter.xml
@@ -153,7 +153,7 @@
<p>A line breakpoint is created at a certain line in a module.</p>
- <image file="images/line_break_dialog.jpg">
+ <image file="line_break_dialog.jpg">
<icaption>Line Break Dialog Window</icaption>
</image>
@@ -185,7 +185,7 @@
<seealso marker="int#get_binding/2"><c>int:get_binding(Variable,Bindings)</c></seealso>.
The function returns <c>unbound</c> or <c>{value,Value}</c>.</p>
- <image file="images/cond_break_dialog.jpg">
+ <image file="cond_break_dialog.jpg">
<icaption>Conditional Break Dialog Window</icaption>
</image>
@@ -225,7 +225,7 @@ c_break(Bindings) ->
<p>A function breakpoint is a set of line breakpoints, one at
the first line of each clause in the specified function.</p>
- <image file="images/function_break_dialog.jpg">
+ <image file="function_break_dialog.jpg">
<icaption>Function Break Dialog Window</icaption>
</image>
@@ -307,7 +307,7 @@ c_break(Bindings) ->
modules</p></item>
</list>
- <image file="images/monitor.jpg">
+ <image file="monitor.jpg">
<icaption>Monitor Window</icaption>
</image>
@@ -593,7 +593,7 @@ c_break(Bindings) ->
<pre>
4> c(module, debug_info).</pre>
- <image file="images/interpret.jpg">
+ <image file="interpret.jpg">
<icaption>Interpret Modules Window</icaption>
</image>
@@ -624,7 +624,7 @@ c_break(Bindings) ->
been attached to. Notice that when attaching to a process, its
execution is automatically stopped.</p>
- <image file="images/attach.jpg">
+ <image file="attach.jpg">
<icaption>Attach Process Window</icaption>
</image>
@@ -819,7 +819,7 @@ c_break(Bindings) ->
<p>The View Module window displays the contents of an interpreted
module and makes it possible to set breakpoints.</p>
- <image file="images/view.jpg">
+ <image file="view.jpg">
<icaption>View Module Window</icaption>
</image>
diff --git a/lib/debugger/doc/src/images/function_break_dialog.jpg b/lib/debugger/doc/src/function_break_dialog.jpg
index db56d5a096..db56d5a096 100644
--- a/lib/debugger/doc/src/images/function_break_dialog.jpg
+++ b/lib/debugger/doc/src/function_break_dialog.jpg
Binary files differ
diff --git a/lib/debugger/doc/src/images/interpret.jpg b/lib/debugger/doc/src/interpret.jpg
index 030c06fa23..030c06fa23 100644
--- a/lib/debugger/doc/src/images/interpret.jpg
+++ b/lib/debugger/doc/src/interpret.jpg
Binary files differ
diff --git a/lib/debugger/doc/src/images/line_break_dialog.jpg b/lib/debugger/doc/src/line_break_dialog.jpg
index 18ac6a9f81..18ac6a9f81 100644
--- a/lib/debugger/doc/src/images/line_break_dialog.jpg
+++ b/lib/debugger/doc/src/line_break_dialog.jpg
Binary files differ
diff --git a/lib/debugger/doc/src/images/monitor.jpg b/lib/debugger/doc/src/monitor.jpg
index 32f210cbf2..32f210cbf2 100644
--- a/lib/debugger/doc/src/images/monitor.jpg
+++ b/lib/debugger/doc/src/monitor.jpg
Binary files differ
diff --git a/lib/debugger/doc/src/images/view.jpg b/lib/debugger/doc/src/view.jpg
index 7ffd511eff..7ffd511eff 100644
--- a/lib/debugger/doc/src/images/view.jpg
+++ b/lib/debugger/doc/src/view.jpg
Binary files differ
diff --git a/lib/dialyzer/doc/src/Makefile b/lib/dialyzer/doc/src/Makefile
index 3ce777392b..bcceb3b661 100644
--- a/lib/dialyzer/doc/src/Makefile
+++ b/lib/dialyzer/doc/src/Makefile
@@ -26,15 +26,11 @@ VSN=$(DIALYZER_VSN)
APPLICATION=dialyzer
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = dialyzer.xml typer.xml
+XML_REF3_FILES = dialyzer.xml
+XML_REF1_FILES = typer_cmd.xml
XML_PART_FILES = part.xml
XML_CHAPTER_FILES = dialyzer_chapter.xml notes.xml
@@ -43,72 +39,10 @@ BOOK_FILES = book.xml
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
- $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-
-
-# ----------------------------------------------------
-
-TEXT_FILES = \
- ../about.txt \
- ../manual.txt \
- ../warnings.txt
+ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF1_FILES) \
+ $(XML_APPLICATION_FILES)
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/dialyzer/doc/src/ref_man.xml b/lib/dialyzer/doc/src/ref_man.xml
index d8cf324232..74455143b1 100644
--- a/lib/dialyzer/doc/src/ref_man.xml
+++ b/lib/dialyzer/doc/src/ref_man.xml
@@ -31,6 +31,5 @@
<description>
</description>
<xi:include href="dialyzer.xml"/>
- <xi:include href="typer.xml"/>
+ <xi:include href="typer_cmd.xml"/>
</application>
-
diff --git a/lib/dialyzer/doc/src/typer.xml b/lib/dialyzer/doc/src/typer_cmd.xml
index 524956ed4b..b9e75bdd2a 100644
--- a/lib/dialyzer/doc/src/typer.xml
+++ b/lib/dialyzer/doc/src/typer_cmd.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE erlref SYSTEM "erlref.dtd">
+<!DOCTYPE comref SYSTEM "comref.dtd">
-<erlref>
+<comref>
<header>
<copyright>
<year>2006</year><year>2017</year>
@@ -29,9 +29,9 @@
<rev></rev>
<file>type.xml</file>
</header>
- <module>typer</module>
- <modulesummary>Typer, a Type annotator for ERlang programs.
- </modulesummary>
+ <com>typer</com>
+ <comsummary>Typer, a Type annotator for ERlang programs.
+ </comsummary>
<description>
<p>TypEr shows type information for Erlang modules to the user.
Additionally, it can annotate the code of files with such type
@@ -154,4 +154,4 @@ typer [--help] [--version] [--plt PLT] [--edoc]
</section>
-</erlref>
+</comref>
diff --git a/lib/dialyzer/src/dialyzer_cl_parse.erl b/lib/dialyzer/src/dialyzer_cl_parse.erl
index cadc2116b0..a3ec1b92f1 100644
--- a/lib/dialyzer/src/dialyzer_cl_parse.erl
+++ b/lib/dialyzer/src/dialyzer_cl_parse.erl
@@ -330,12 +330,16 @@ get_lib_dir(Apps) ->
get_lib_dir([H|T], Acc) ->
NewElem =
case code:lib_dir(list_to_atom(H)) of
- {error, bad_name} ->
- case H =:= "erts" of % hack for including erts in an un-installed system
- true -> filename:join(code:root_dir(), "erts/preloaded/ebin");
- false -> H
- end;
- LibDir -> LibDir ++ "/ebin"
+ {error, bad_name} -> H;
+ LibDir when H =:= "erts" -> % hack for including erts in an un-installed system
+ EbinDir = filename:join([LibDir,"ebin"]),
+ case file:read_file_info(EbinDir) of
+ {error,enoent} ->
+ filename:join([LibDir,"preloaded","ebin"]);
+ _ ->
+ EbinDir
+ end;
+ LibDir -> filename:join(LibDir,"ebin")
end,
get_lib_dir(T, [NewElem|Acc]);
get_lib_dir([], Acc) ->
diff --git a/lib/diameter/doc/src/Makefile b/lib/diameter/doc/src/Makefile
index 7c7fbeafef..3553b68510 100644
--- a/lib/diameter/doc/src/Makefile
+++ b/lib/diameter/doc/src/Makefile
@@ -24,8 +24,6 @@ include ../../vsn.mk
VSN = $(DIAMETER_VSN)
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
@@ -35,118 +33,29 @@ XML_REF_FILES = $(XML_REF1_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES)
XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) \
$(XML_REF_FILES) \
- $(XML_PART_FILES) $(XML_CHAPTER_FILES) \
- $(XML_EXTRA_FILES)
-
-INFO_FILE = ../../info
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
-MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1)
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN4_FILES = $(XML_REF4_FILES:%.xml=$(MAN4DIR)/%.4)
+XML_GEN_FILES = $(XMLDIR)/seehere.ent $(patsubst %.ent,$(XMLDIR)/%.ent,$(XML_EXTRA_FILES))
-PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+EXTRA_FILES=depend.mk $(XMLDIR)/seehere.ent
-STANDARD_DIR = ../standard
+NO_CHUNKS = diameter_app.xml diameter_transport.xml
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
+include $(ERL_TOP)/make/doc.mk
-docs: pdf html man
+$(XMLDIR)/seehere.ent: Makefile seealso.ent
+ $(gen_verbose) sed -f seehere.sed seealso.ent > $@
+$(XMLDIR)/%.ent: %.ent
+ $(gen_verbose) cp $< $@
ldocs: local_docs $(INDEX_TARGET)
-$(PDF_FILE): $(XML_FILES)
-
-pdf: $(PDF_FILE)
-
-html: gifs $(HTMLDIR)/index.html
-
-clean clean_docs: clean_pdf clean_html clean_man
- rm -f errs core *~
- rm -f depend.mk seehere.ent
-
-clean_pdf:
- rm -f $(PDFDIR)/*
-
-clean_man:
- rm -f $(MAN1DIR)/* $(MAN3DIR)/* $(MAN4DIR)/*
-
-clean_html:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-man: $(MAN1_FILES) $(MAN3_FILES) $(MAN4_FILES)
-
-$(INDEX_TARGET): $(INDEX_SRC) $(APP_FILE)
+depend.mk: depend.sed Makefile $(XMLDIR)/seehere.ent $(XMLDIR)/seealso.ent $(XML_REF_FILES) $(XML_CHAPTER_FILES)
$(gen_verbose) \
- sed -e 's/%VSN%/$(VSN)/; \
- s/%ERLANG_SITE%/www\.erlang\.se\//; \
- s/%UP_ONE_LEVEL%/..\/..\/..\/doc\/index.html/; \
- s/%OFF_PRINT%/pdf\/diameter-$(VSN).pdf/' $< > $@
-
-depend: depend.mk
-
-debug opt:
-
-info:
- @echo ""
- @echo "INDEX_FILE = $(INDEX_FILE)"
- @echo "INDEX_SRC = $(INDEX_SRC)"
- @echo "INDEX_TARGET = $(INDEX_TARGET)"
- @echo ""
- @echo "XML_APPLICATION_FILES = $(XML_APPLICATION_FILES)"
- @echo "XML_PART_FILES = $(XML_PART_FILES)"
- @echo "XML_REF1_FILES = $(XML_REF1_FILES)"
- @echo "XML_REF3_FILES = $(XML_REF3_FILES)"
- @echo "XML_REF4_FILES = $(XML_REF4_FILES)"
- @echo "XML_CHAPTER_FILES = $(XML_CHAPTER_FILES)"
- @echo ""
- @echo "GIF_FILES = $(GIF_FILES)"
- @echo ""
- @echo "MAN1_FILES = $(MAN1_FILES)"
- @echo "MAN3_FILES = $(MAN3_FILES)"
- @echo "MAN4_FILES = $(MAN4_FILES)"
- @echo ""
- @echo "DEFAULT_HTML_FILES = $(DEFAULT_HTML_FILES)"
- @echo "DEFAULT_GIF_FILES = $(DEFAULT_GIF_FILES)"
- @echo ""
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: $(LOCAL)docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man4"
- $(INSTALL_DATA) $(PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(HTMLDIR)/*.* "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DATA) $(MAN1_FILES) "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DATA) $(MAN3_FILES) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN4_FILES) "$(RELEASE_PATH)/man/man4"
- [ -z "$(LOCAL)" ] || cp -r $(HTMLDIR)/js "$(RELSYSDIR)/doc/html"
- echo $(LOCAL)
-
-release_spec:
-
-depend.mk: depend.sed Makefile seealso.ent \
- $(XML_REF_FILES) $(XML_CHAPTER_FILES)
- $(gen_verbose)
- $(V_at) \
- sed -f seehere.sed seealso.ent > seehere.ent
- $(V_at) \
(for f in $(XML_REF_FILES) $(XML_CHAPTER_FILES); do \
sed -f $< $$f | sed "s@%FILE%@`basename $$f .xml`@g"; \
done) \
@@ -154,7 +63,4 @@ depend.mk: depend.sed Makefile seealso.ent \
-include depend.mk
-.PHONY: clean clean_html clean_man clean_pdf \
- depend debug opt info \
- docs gifs html ldocs man pdf \
- release_docs_spec release_spec
+.PHONY: depend ldocs
diff --git a/lib/diameter/doc/src/diameterc.xml b/lib/diameter/doc/src/diameterc_cmd.xml
index 8f1c660989..8f1c660989 100644
--- a/lib/diameter/doc/src/diameterc.xml
+++ b/lib/diameter/doc/src/diameterc_cmd.xml
diff --git a/lib/diameter/doc/src/files.mk b/lib/diameter/doc/src/files.mk
index 4c1297f6cc..ab47beb99e 100644
--- a/lib/diameter/doc/src/files.mk
+++ b/lib/diameter/doc/src/files.mk
@@ -22,7 +22,7 @@ XML_APPLICATION_FILES = \
ref_man.xml
XML_REF1_FILES = \
- diameterc.xml
+ diameterc_cmd.xml
XML_REF3_FILES = \
diameter.xml \
@@ -52,4 +52,4 @@ XML_CHAPTER_FILES = \
BOOK_FILES = \
book.xml
-GIF_FILES =
+IMAGE_FILES =
diff --git a/lib/diameter/doc/src/ref_man.xml b/lib/diameter/doc/src/ref_man.xml
index a0ef28844d..d57e121c60 100644
--- a/lib/diameter/doc/src/ref_man.xml
+++ b/lib/diameter/doc/src/ref_man.xml
@@ -40,7 +40,7 @@ applications on top of the Diameter protocol. </p>
</description>
<xi:include href="diameter.xml"/>
-<xi:include href="diameterc.xml"/>
+<xi:include href="diameterc_cmd.xml"/>
<xi:include href="diameter_app.xml"/>
<xi:include href="diameter_codec.xml"/>
<xi:include href="diameter_dict.xml"/>
diff --git a/lib/edoc/doc/src/Makefile b/lib/edoc/doc/src/Makefile
index 3e53e75c75..29244467f9 100644
--- a/lib/edoc/doc/src/Makefile
+++ b/lib/edoc/doc/src/Makefile
@@ -25,22 +25,10 @@ VSN=$(EDOC_VSN)
APPLICATION=edoc
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
-# Man page source directory (with .erl files)
-# ----------------------------------------------------
-SRC_DIR = $(ERL_TOP)/lib/edoc/src
-INC_DIR = $(ERL_TOP)/lib/edoc/include
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = \
- edoc.xml \
+EDOC_REF3_FILES = edoc.xml \
edoc_doclet.xml \
edoc_extract.xml \
edoc_layout.xml \
@@ -48,7 +36,7 @@ XML_REF3_FILES = \
edoc_run.xml
XML_PART_FILES = part.xml
-XML_CHAPTER_FILES = chapter.xml
+EDOC_CHAPTER_FILE = chapter.xml
XML_NOTES_FILES = notes.xml
BOOK_FILES = book.xml
@@ -57,89 +45,12 @@ XML_FILES=\
$(BOOK_FILES) $(XML_APPLICATION_FILES) \
$(XML_PART_FILES) $(XML_NOTES_FILES)
-XML_GEN_FILES=$(XML_REF3_FILES:%=$(XMLDIR)/%) $(XML_CHAPTER_FILES:%=$(XMLDIR)/%)
-
-# ----------------------------------------------------
-INFO_FILE = ../../info
-
-HTML_FILES = \
- $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-EXTRA_FILES = \
- $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_NOTES_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
INCLUDES_DIR = ../../include
INCLUDES = $(INCLUDES_DIR)/edoc_doclet.hrl
DTDS_DIR = ../../priv
DTDS = $(DTDS_DIR)/edoc.dtd
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES)
-
-$(XML_REF3_FILES:%=$(XMLDIR)/%):
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(EDOC_VSN) -i $(ERL_TOP)/lib/edoc/include -dir $(XMLDIR) $(SRC_DIR)/$(@:$(XMLDIR)/%.xml=%.erl)
-
-$(XML_CHAPTER_FILES:%=$(XMLDIR)/%): ../overview.edoc
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(EDOC_VSN) -chapter -dir $(XMLDIR) $<
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(XML_REF3_FILES) $(XML_CHAPTER_FILES) *.html
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(INCLUDES) $(DTDS) "$(RELSYSDIR)/doc/html"
+HTML_EXTRA_FILES = $(DTDS) $(INCLUDES)
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/eldap/doc/src/Makefile b/lib/eldap/doc/src/Makefile
index bf1eca267a..3eaee276a0 100644
--- a/lib/eldap/doc/src/Makefile
+++ b/lib/eldap/doc/src/Makefile
@@ -27,11 +27,6 @@ VSN=$(ELDAP_VSN)
APPLICATION=eldap
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -45,73 +40,6 @@ BOOK_FILES = book.xml
XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \
$(XML_PART_FILES) $(XML_CHAPTER_FILES)
-GIF_FILES =
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES) $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt valgrind:
-
-clean clean_docs clean_tex:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-# $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
-# $(INSTALL_DATA) $(MAN6DIR)/* "$(RELEASE_PATH)/man/man6"
-
-
-release_spec:
+IMAGE_FILES =
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/erl_docgen/doc/src/Makefile b/lib/erl_docgen/doc/src/Makefile
index d6d2550425..33eb44a049 100644
--- a/lib/erl_docgen/doc/src/Makefile
+++ b/lib/erl_docgen/doc/src/Makefile
@@ -29,11 +29,6 @@ VSN=$(ERL_DOCGEN_VSN)
APPLICATION=erl_docgen
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -52,7 +47,8 @@ XML_CHAPTER_FILES = \
inline_tags.xml \
header_tags.xml \
character_entities.xml \
- block_tags.xml
+ block_tags.xml \
+ doc_storage.xml
BOOK_FILES = book.xml
@@ -64,75 +60,9 @@ TECHNICAL_DESCR_FILES =
EXAMPLE_FILES = \
example.txt
-GIF_FILES = \
+IMAGE_FILES = \
man.gif
# ----------------------------------------------------
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-docs: pdf html man
-
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-$(HTMLDIR)/example.txt: example.txt
- $(INSTALL_DATA) $< $@
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs examples $(HTML_REF_MAN_FILE)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
- rm -f $(JD_HTML) $(JD_PACK)
-
-man: $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-examples: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6DIR)/* "$(RELEASE_PATH)/man/man6"
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/erl_docgen/doc/src/block_tags.xml b/lib/erl_docgen/doc/src/block_tags.xml
index ceed9305f4..bcaec0fbd1 100644
--- a/lib/erl_docgen/doc/src/block_tags.xml
+++ b/lib/erl_docgen/doc/src/block_tags.xml
@@ -42,7 +42,6 @@
<seealso marker="#listTAG">&lt;list&gt;</seealso>,
<seealso marker="#taglistTAG">&lt;taglist&gt;</seealso>,
<seealso marker="#codeincludeTAG">&lt;codeinclude&gt;</seealso> and
- <seealso marker="#erlevalTAG">&lt;erleval&gt;</seealso>.
</p>
<section>
@@ -131,21 +130,6 @@ start(Pid) ->
</section>
<section>
- <marker id="erlevalTAG"></marker>
- <title>&lt;erleval&gt; - Erlang Evaluation</title>
-
- <p>Include the result from evaluating an Erlang expression. Example:
- </p>
- <code><![CDATA[
-<erleval expr="{A,b,C}={a,b,c}. "/>
- ]]></code>
- <p>results in:</p>
- <erleval expr="{A,b,C}={a,b,c}. "></erleval>
-
- <p>Note the '.' and space after the expression.</p>
- </section>
-
- <section>
<marker id="listTAG"></marker>
<title>&lt;list&gt; - List</title>
diff --git a/lib/erl_docgen/doc/src/doc_storage.xml b/lib/erl_docgen/doc/src/doc_storage.xml
new file mode 100644
index 0000000000..9eee863e3d
--- /dev/null
+++ b/lib/erl_docgen/doc/src/doc_storage.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>1997</year><year>2016</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+ <title>Documentation Storage</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ <file>doc_storage.xml</file>
+ </header>
+
+ <section>
+ <title>EEP-48: Documentation storage and format</title>
+ <p><url href="https://www.erlang.org/erlang-enhancement-proposals/eep-0048.html">EEP-48</url>
+ defines a common documentation storage format for module documentation in the Erlang/OTP
+ ecosystem. Erl_Docgen can generate documentation in this format from XML files following
+ the DTD's descibed in the other User's Guides in this application.</p>
+ <p>Some special considerations have to be taken when writing documentation that
+ should also be available through EEP-48 style storage.</p>
+ <list>
+ <item>The <c>#PCDATA</c> within <c>&lt;name&gt;</c> tags must be parseable to figure out the arity of the function.</item>
+ <item>It is not allowed to mix <c>&lt;name&gt;</c> tags with #PCDATA and attributes.</item>
+ <item>All <c>&lt;name&gt;</c> tags within <c>&lt;func&gt;</c> has to have a <c>since</c> attribute.</item>
+ <item>All callback function documentations have to start with a <c>Module</c> prefix.</item>
+ </list>
+ </section>
+
+ <section>
+ <title>Erlang Documentation Format</title>
+ <p>When generating documentation for generic storage</p>
+ </section>
+
+ <section>
+ <title>See Also</title>
+ <p>
+ <seealso marker="stdlib:shell_docs"><c>shell_docs(3)</c></seealso>,
+ <seealso marker="kernel:code#get_doc-1"><c>code:get_doc(3)</c></seealso>
+ </p>
+ </section>
+
+</chapter>
diff --git a/lib/erl_docgen/doc/src/inline_tags.xml b/lib/erl_docgen/doc/src/inline_tags.xml
index 25b0cd4d87..2b5239c855 100644
--- a/lib/erl_docgen/doc/src/inline_tags.xml
+++ b/lib/erl_docgen/doc/src/inline_tags.xml
@@ -171,45 +171,5 @@
</p>
</section>
- <section>
- <marker id="termTAG"></marker>
- <marker id="termdefTAG"></marker>
- <title>&lt;term&gt;, &lt;termdef&gt; - Glossary</title>
-
- <p>Used to highlight a term with a local (for this document only) or
- global definition. The identity of the term is given by
- the <c>id</c> attribute.</p>
-
- <p>For a locally defined term, the tag contains a
- <c>&lt;termdef&gt;</c>, which in turn contains an explanation of
- the term as plain text. Example:</p>
- <pre><![CDATA[
-<term id="HTML"><termdef>Hyper-Text Markup Language</termdef></term>
- ]]></pre>
-
- <p>In the generated HTML, it is the term name which will be visible.
- For locally defined terms, the id and the name are the same.
- The name has a hypertext link to the definition in the glossary.
- Example:</p>
- <pre><![CDATA[
-<term id="HTML"><termdef>Hyper-Text Markup Language</termdef></term>
- ]]></pre>
- <p>results in: <term id="HTML"><termdef>Hyper-Text Markup Language</termdef></term>
- </p>
-
- <p>If a term is defined both locally and globally, the global
- definition takes precedence.</p>
- </section>
-
- <section>
- <marker id="citeTAG"></marker>
- <marker id="citedefTAG"></marker>
- <title>&lt;cite&gt;, &lt;citedef&gt; - Bibliography</title>
-
- <p>Works the same way as <c>&lt;term&gt;</c> and
- <c>&lt;termdef&gt;</c>, but for a bibliography list rather than
- a glossary.</p>
-
- </section>
</chapter>
diff --git a/lib/erl_docgen/doc/src/part.xml b/lib/erl_docgen/doc/src/part.xml
index 0e97af7169..91ff979af5 100644
--- a/lib/erl_docgen/doc/src/part.xml
+++ b/lib/erl_docgen/doc/src/part.xml
@@ -40,5 +40,6 @@
<xi:include href="block_tags.xml"/>
<xi:include href="inline_tags.xml"/>
<xi:include href="character_entities.xml"/>
+ <xi:include href="doc_storage.xml"/>
</part>
diff --git a/lib/erl_docgen/priv/bin/chunk.escript b/lib/erl_docgen/priv/bin/chunk.escript
new file mode 100644
index 0000000000..a9ea6b9b73
--- /dev/null
+++ b/lib/erl_docgen/priv/bin/chunk.escript
@@ -0,0 +1,30 @@
+#!/usr/bin/env escript
+%% -*- erlang -*-
+%%! +A 1 +SDio 1 +S 1 -mode minimal
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2020. 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%
+%%----------------------------------------------------------------------
+%% File : chunk.escript
+%%
+%% Created : 1 Nov 2018 by Kenneth Lundin <uabkeld@elxa31hr002>
+%%
+%% Trampoline to xml to chunk creation.
+%%----------------------------------------------------------------------
+
+main(Args) ->
+ docgen_xml_to_chunk:main(Args).
diff --git a/lib/erl_docgen/priv/bin/specs_gen.escript b/lib/erl_docgen/priv/bin/specs_gen.escript
index 116240530d..96b63aa667 100644
--- a/lib/erl_docgen/priv/bin/specs_gen.escript
+++ b/lib/erl_docgen/priv/bin/specs_gen.escript
@@ -48,7 +48,8 @@ main(Args) ->
parse(["-o"++Dir | Opts], InclFs, _, Module) ->
parse(Opts, InclFs, Dir, Module);
parse(["-I"++I | Opts], InclFs, Dir, Module) ->
- parse(Opts, [I | InclFs], Dir, Module);
+ Is = filelib:wildcard(I),
+ parse(Opts, Is ++ InclFs, Dir, Module);
parse(["-module", Module | Opts], InclFs, Dir, _) ->
parse(Opts, InclFs, Dir, Module);
parse([File], InclFs, Dir, no_module) ->
diff --git a/lib/erl_docgen/priv/css/Makefile b/lib/erl_docgen/priv/css/Makefile
index e3d2ee7e3f..da2ef5ad15 100644
--- a/lib/erl_docgen/priv/css/Makefile
+++ b/lib/erl_docgen/priv/css/Makefile
@@ -53,7 +53,9 @@ CSS_FILES = \
# ----------------------------------------------------
debug opt:
-docs:
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
clean:
$(RM) $(TARGET_FILES)
@@ -64,16 +66,17 @@ clean:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/css"
$(INSTALL_DATA) $(CSS_FILES) "$(RELSYSDIR)/priv/css"
-release_docs_spec:
+release_html_spec: html
$(INSTALL_DIR) "$(RELEASE_PATH)/doc"
$(INSTALL_DATA) $(CSS_FILES) ../nyi.html "$(RELEASE_PATH)/doc"
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+
release_tests_spec:
diff --git a/lib/erl_docgen/priv/dtd/Makefile b/lib/erl_docgen/priv/dtd/Makefile
index e35e5f8826..fd8d8a43c7 100644
--- a/lib/erl_docgen/priv/dtd/Makefile
+++ b/lib/erl_docgen/priv/dtd/Makefile
@@ -46,7 +46,6 @@ DTD_FILES = \
fileref.dtd \
xhtml1-frameset.dtd \
appref.dtd \
- cites.dtd \
common.image.dtd \
cref.dtd \
part.dtd \
@@ -55,13 +54,9 @@ DTD_FILES = \
common.dtd \
common.refs.dtd \
erlref.dtd \
- report.dtd \
xhtml1-transitional.dtd \
- bookinsidecover.dtd \
common.entities.dtd \
- common.table.dtd \
- fascicules.dtd \
- terms.dtd
+ common.table.dtd
ENT_FILES = \
xhtml-special.ent \
diff --git a/lib/erl_docgen/priv/dtd/bookinsidecover.dtd b/lib/erl_docgen/priv/dtd/bookinsidecover.dtd
deleted file mode 100644
index ae22c45884..0000000000
--- a/lib/erl_docgen/priv/dtd/bookinsidecover.dtd
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
- ``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.
-
- The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
- All Rights Reserved.''
-
- $Id$
--->
-<!ENTITY % ISOlat1 SYSTEM "xhtml-lat1.ent" >
-%ISOlat1;
-
-<!ENTITY amp "&#x0026;" >
-<!ENTITY gt "&#x003E;" >
-<!ENTITY lt "&#x003C;" >
-
-<!ELEMENT bookinsidecover (#PCDATA|br|theheader|vfill|tt|bold)* >
-
-<!ELEMENT tt (#PCDATA|br|theheader|vfill)* >
-<!ELEMENT bold (#PCDATA|br|theheader|vfill)* >
-<!ELEMENT vfill EMPTY >
-<!ELEMENT theheader EMPTY >
-<!ATTLIST theheader tag (title|prepared|responsible|docno|
- approved|checked|date|rev|file|
- none) "none" >
-
-<!ELEMENT br EMPTY >
diff --git a/lib/erl_docgen/priv/dtd/cites.dtd b/lib/erl_docgen/priv/dtd/cites.dtd
deleted file mode 100644
index 4558947db0..0000000000
--- a/lib/erl_docgen/priv/dtd/cites.dtd
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
- ``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.
-
- The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
- All Rights Reserved.''
-
- $Id$
--->
-<!ENTITY % ISOlat1 SYSTEM "xhtml-lat1.ent" >
-%ISOlat1;
-
-<!ENTITY amp "&#x0026;" >
-<!ENTITY gt "&#x003E;" >
-<!ENTITY lt "&#x003C;" >
-
-<!-- Structure -->
-
-<!ELEMENT cites (cite)* >
-<!ELEMENT cite (id, shortdef, def, resp?) >
-<!ELEMENT id (#PCDATA) >
-<!ELEMENT shortdef (#PCDATA) >
-<!ELEMENT def (#PCDATA|c|i|em)* >
-<!ELEMENT resp (#PCDATA) >
-<!ELEMENT c (#PCDATA) >
-<!ELEMENT em (#PCDATA|c)* >
diff --git a/lib/erl_docgen/priv/dtd/common.dtd b/lib/erl_docgen/priv/dtd/common.dtd
index 90a8d7cbdb..ca680c15b6 100644
--- a/lib/erl_docgen/priv/dtd/common.dtd
+++ b/lib/erl_docgen/priv/dtd/common.dtd
@@ -22,9 +22,8 @@
<!ENTITY % common.entities SYSTEM "common.entities.dtd" >
%common.entities;
-<!ENTITY % block "p|pre|code|list|taglist|codeinclude|
- erleval" >
-<!ENTITY % inline "#PCDATA|c|i|em|strong|term|cite|br|path|seealso|
+<!ENTITY % block "p|pre|code|list|taglist|codeinclude" >
+<!ENTITY % inline "#PCDATA|c|i|em|strong|term|br|seealso|
url|marker|anno|image" >
<!-- XXX -->
<!ELEMENT p (%inline;)* >
@@ -43,26 +42,9 @@
<!ELEMENT strong (#PCDATA|c|anno)* >
<!ELEMENT anno (#PCDATA) >
-<!-- XXX -->
-<!ELEMENT term (termdef?) >
-<!ATTLIST term id CDATA #REQUIRED >
-<!ELEMENT termdef (#PCDATA) >
-<!ELEMENT cite (citedef?) >
-<!ATTLIST cite id CDATA #REQUIRED >
-<!ELEMENT citedef (ctitle,cauthor,chowpublished) >
-<!ELEMENT ctitle (#PCDATA) >
-<!ELEMENT cauthor (#PCDATA) >
-<!ELEMENT chowpublished (#PCDATA) >
-
<!-- XXX -->
<!ELEMENT br EMPTY >
-<!-- Path -->
-
-<!ELEMENT path (#PCDATA) >
-<!ATTLIST path unix CDATA ""
- windows CDATA "" >
-
<!-- List -->
<!ELEMENT list (item+) >
@@ -86,8 +68,3 @@
<!ATTLIST codeinclude file CDATA #REQUIRED
tag CDATA ""
type (erl|c|none) "none" >
-
-<!-- ErlEval -->
-
-<!ELEMENT erleval EMPTY >
-<!ATTLIST erleval expr CDATA #REQUIRED >
diff --git a/lib/erl_docgen/priv/dtd/fascicules.dtd b/lib/erl_docgen/priv/dtd/fascicules.dtd
deleted file mode 100644
index 073d0cc1d9..0000000000
--- a/lib/erl_docgen/priv/dtd/fascicules.dtd
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
- ``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.
-
- The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
- All Rights Reserved.''
-
- $Id$
--->
-
-<!ENTITY % ISOlat1 SYSTEM "xhtml-lat1.ent" >
-%ISOlat1;
-
-<!ENTITY amp "&#x0026;" >
-<!ENTITY gt "&#x003E;" >
-<!ENTITY lt "&#x003C;" >
-
-<!-- Structure -->
-
-<!ELEMENT fascicules (fascicule)+ >
-<!ELEMENT fascicule (#PCDATA) >
-<!ATTLIST fascicule file CDATA #REQUIRED
- href CDATA #REQUIRED
- entry (yes|no) "no" >
-
diff --git a/lib/erl_docgen/priv/dtd/report.dtd b/lib/erl_docgen/priv/dtd/report.dtd
deleted file mode 100644
index 3dd1c3d347..0000000000
--- a/lib/erl_docgen/priv/dtd/report.dtd
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
- ``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.
-
- The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
- All Rights Reserved.''
-
- $Id$
--->
-
-<!ENTITY % ISOlat1 SYSTEM "xhtml-lat1.ent" >
-%ISOlat1;
-
-<!ENTITY amp "&#x0026;" >
-<!ENTITY gt "&#x003E;" >
-<!ENTITY lt "&#x003C;" >
-
-<!ENTITY % header "title,prepared,responsible,docno,approved,
- checked,date,rev,file" >
-<!ENTITY % block "p|pre|code|list|taglist|erlinclude|
- codeinclude|erleval" >
-<!ENTITY % inline "#PCDATA|i|b|c|em|term|cite|br|path|seealso|
- url|marker" >
-
-<!-- Structure -->
-
-<!ELEMENT report (header,section+) >
-<!ELEMENT header (title,prepared,responsible?,docno,approved?,
- checked?,date,rev,file?) >
-<!ELEMENT title (#PCDATA) >
-<!ELEMENT prepared (#PCDATA) >
-<!ELEMENT responsible (#PCDATA) >
-<!ELEMENT docno (#PCDATA) >
-<!ELEMENT approved (#PCDATA) >
-<!ELEMENT checked (#PCDATA) >
-<!ELEMENT date (#PCDATA) >
-<!ELEMENT rev (#PCDATA) >
-<!ELEMENT file (#PCDATA) >
-
-<!ELEMENT section (marker*,title,
- (%block;|quote|warning|note|dont|do|br|image|marker|
- table|section)*) >
-<!ELEMENT p (%inline;|index)* >
-<!ELEMENT pre (#PCDATA|seealso|url|input)* >
-<!ELEMENT input (#PCDATA|seealso|url)* >
-<!ELEMENT code (#PCDATA) >
-<!ATTLIST code type (erl|c|none) "none" >
-<!ELEMENT quote (p)* >
-<!ELEMENT warning (%block;|quote|br|image|marker|table)* >
-<!ELEMENT note (%block;|quote|br|image|marker|table)* >
-<!ELEMENT dont (%block;|quote|br|image|marker|table)* >
-<!ELEMENT do (%block;|quote|br|image|marker|table)* >
-<!ELEMENT i (#PCDATA|b|c|em)* >
-<!ELEMENT b (#PCDATA|i|c|em)* >
-<!ELEMENT c (#PCDATA) >
-<!ELEMENT em (#PCDATA|i|b|c)* >
-<!ELEMENT term (termdef?) >
-<!ATTLIST term id CDATA #REQUIRED >
-<!ELEMENT termdef (#PCDATA) >
-<!ELEMENT cite (citedef?) >
-<!ATTLIST cite id CDATA #REQUIRED >
-<!ELEMENT citedef (ctitle,cauthor,chowpublished) >
-<!ELEMENT ctitle (#PCDATA) >
-<!ELEMENT cauthor (#PCDATA) >
-<!ELEMENT chowpublished (#PCDATA) >
-<!ELEMENT br EMPTY >
-
-<!-- Path -->
-
-<!ELEMENT path (#PCDATA) >
-<!ATTLIST path unix CDATA ""
- windows CDATA "" >
-
-<!-- List -->
-
-<!ELEMENT list (item+) >
-<!ATTLIST list type (ordered|bulleted) "bulleted" >
-<!ELEMENT taglist (tag,item)+ >
-<!ELEMENT tag (#PCDATA|i|b|c|em|seealso|url)* >
-<!ELEMENT item (%inline;|%block;)* >
-
-<!-- Image -->
-
-<!ELEMENT image (icaption?) >
-<!ATTLIST image file CDATA #REQUIRED >
-<!ELEMENT icaption (#PCDATA) >
-
-<!-- References -->
-
-<!ELEMENT seealso (#PCDATA) >
-<!ATTLIST seealso marker CDATA #REQUIRED >
-<!ELEMENT url (#PCDATA) >
-<!ATTLIST url href CDATA #REQUIRED >
-<!ELEMENT marker EMPTY >
-<!ATTLIST marker id CDATA #REQUIRED >
-
-<!-- Table -->
-
-<!ELEMENT table (row+,tcaption?) >
-<!ATTLIST table width CDATA "0"
- colspec CDATA "" >
-<!ELEMENT row (cell+) >
-<!ELEMENT cell (%inline;)* >
-<!ATTLIST cell align (left|center|right) "left"
- valign (top|middle|bottom) "middle" >
-<!ELEMENT tcaption (#PCDATA) >
-
-<!-- ErlInclude -->
-
-<!ELEMENT erlinclude EMPTY >
-<!ATTLIST erlinclude file CDATA #REQUIRED
- tag CDATA #REQUIRED >
-
-<!-- CodeInclude -->
-
-<!ELEMENT codeinclude EMPTY >
-<!ATTLIST codeinclude file CDATA #REQUIRED
- tag CDATA ""
- type (erl|c|none) "none" >
-
-<!-- ErlEval -->
-
-<!ELEMENT erleval EMPTY >
-<!ATTLIST erleval expr CDATA #REQUIRED >
-
-<!-- Index FOR COMPATIBILITY -->
-
-<!ELEMENT index EMPTY >
-<!ATTLIST index txt CDATA #REQUIRED >
-
diff --git a/lib/erl_docgen/priv/dtd/terms.dtd b/lib/erl_docgen/priv/dtd/terms.dtd
deleted file mode 100644
index c2965eb61c..0000000000
--- a/lib/erl_docgen/priv/dtd/terms.dtd
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
- ``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.
-
- The Initial Developer of the Original Code is Ericsson AB.
- Portions created by Ericsson are Copyright 1999-2007, Ericsson AB.
- All Rights Reserved.''
-
- $Id$
--->
-<!ENTITY % ISOlat1 SYSTEM "xhtml-lat1.ent" >
-%ISOlat1;
-
-<!ENTITY amp "&#x0026;" >
-<!ENTITY gt "&#x003E;" >
-<!ENTITY lt "&#x003C;" >
-
-<!-- Structure -->
-
-<!ELEMENT terms (term)* >
-<!ELEMENT term (id, shortdef, def, resp?) >
-<!ELEMENT id (#PCDATA) >
-<!ELEMENT shortdef (#PCDATA) >
-<!ELEMENT def (#PCDATA|c|i|em)* >
-<!ELEMENT resp (#PCDATA) >
-<!ELEMENT c (#PCDATA) >
-<!ELEMENT em (#PCDATA|c)* >
-
diff --git a/lib/erl_docgen/priv/images/Makefile b/lib/erl_docgen/priv/images/Makefile
index cd98399b6a..b0263524fb 100644
--- a/lib/erl_docgen/priv/images/Makefile
+++ b/lib/erl_docgen/priv/images/Makefile
@@ -54,7 +54,9 @@ PNG_FILES = \
# ----------------------------------------------------
debug opt:
-docs:
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
clean:
$(RM) $(TARGET_FILES)
@@ -70,11 +72,12 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/images"
$(INSTALL_DATA) $(GIF_FILES) $(PNG_FILES) "$(RELSYSDIR)/priv/images"
-
-release_docs_spec:
+release_html_spec:
$(INSTALL_DIR) "$(RELEASE_PATH)/doc"
$(INSTALL_DATA) $(PNG_FILES) "$(RELEASE_PATH)/doc"
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+
release_tests_spec:
diff --git a/lib/erl_docgen/priv/js/flipmenu/Makefile b/lib/erl_docgen/priv/js/flipmenu/Makefile
index ad6d4acb6c..be0bed74fb 100644
--- a/lib/erl_docgen/priv/js/flipmenu/Makefile
+++ b/lib/erl_docgen/priv/js/flipmenu/Makefile
@@ -56,7 +56,9 @@ JS_FILES = \
# ----------------------------------------------------
debug opt:
-docs:
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
clean:
$(RM) $(TARGET_FILES)
@@ -67,17 +69,17 @@ clean:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/js/flipmenu"
$(INSTALL_DATA) $(JS_FILES) $(GIF_FILES) "$(RELSYSDIR)/priv/js/flipmenu"
-
-release_docs_spec:
+release_html_spec: html
$(INSTALL_DIR) "$(RELEASE_PATH)/doc/js/flipmenu"
$(INSTALL_DATA) $(JS_FILES) $(GIF_FILES) "$(RELEASE_PATH)/doc/js/flipmenu"
$(INSTALL_DATA) ../highlight.js ../highlight.pack.js "$(RELEASE_PATH)/doc/js/"
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+
release_tests_spec:
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
index aee496b948..8408d634bd 100644
--- a/lib/erl_docgen/priv/xsl/db_html.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -2532,30 +2532,6 @@
</xsl:template>
- <xsl:template match="term">
- <xsl:value-of select="@id"/>
- <!-- xsl:choose>
- <xsl:when test="boolean(termdef)">
- <xsl:choose>
- <xsl:when test="ancestor::parts">
- <a href="users_guide_glossary.html#{@id}"><xsl:value-of select="@id"/></a>
- </xsl:when>
- <xsl:when test="ancestor::applications">
- <a href="ref_man_glossary.html#{@id}"><xsl:value-of select="@id"/></a>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- <xsl:otherwise>
- <a href="{$topdocdir}/glossary.html#{@id}"><xsl:value-of select="@id"/></a>
- </xsl:otherwise>
- </xsl:choose -->
- </xsl:template>
-
- <xsl:template match="cite">
- <xsl:value-of select="@id"/>
- </xsl:template>
-
-
<!-- Release Notes -->
<xsl:template match="releasenotes">
@@ -2609,118 +2585,6 @@
</div>
</xsl:template>
- <!-- Glossary -->
- <xsl:template name="glossary">
- <xsl:param name="type"/>
- <xsl:document href="{$outdir}/{$type}_glossary.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <link rel="stylesheet" href="{$topdocdir}/otp_doc.css" type="text/css"/>
- <title>Erlang Documentation -- <xsl:value-of select="header/title"/></title>
- </head>
- <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000">
-
- <div id="container">
- <script id="js" type="text/javascript" language="JavaScript" src="{$topdocdir}/js/flipmenu/flipmenu.js"/>
- <script id="js2" type="text/javascript" src="{$topdocdir}/js/erlresolvelinks.js"></script>
-
- <!-- Generate menu -->
- <xsl:call-template name="menu"/>
-
- <div id="content">
- <div class="innertube">
- <h1>Glossary</h1>
- </div>
-
- <dl>
- <xsl:for-each select="descendant::term">
- <xsl:sort select="@id"/>
- <xsl:if test="boolean(termdef)">
- <dt><a name="{@id}"><strong><xsl:value-of select="@id"/></strong></a></dt>
- <dd><xsl:value-of select="termdef"/></dd>
- </xsl:if>
- </xsl:for-each>
- </dl>
-
- <div class="footer">
- <hr/>
- <p>
- <xsl:value-of select="$copyright"/>
- <xsl:value-of select="header/copyright/year[1]"/>
- <xsl:text>-</xsl:text>
- <xsl:value-of select="header/copyright/year[2]"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="header/copyright/holder"/>
- </p>
- </div>
-
- </div>
- </div>
-
- </body>
- </html>
-
- </xsl:document>
- </xsl:template>
-
- <!-- Bibliography -->
- <xsl:template name="bibliography">
-
- <xsl:param name="type"/>
- <xsl:document href="{$outdir}/{$type}_bibliography.html" method="html" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <link rel="stylesheet" href="{$topdocdir}/otp_doc.css" type="text/css"/>
- <title>Erlang Documentation -- <xsl:value-of select="header/title"/></title>
- </head>
- <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000">
-
- <div id="container">
- <script id="js" type="text/javascript" language="JavaScript" src="{$topdocdir}/js/flipmenu/flipmenu.js"/>
- <script id="js2" type="text/javascript" src="{$topdocdir}/js/erlresolvelinks.js"></script>
-
- <!-- Generate menu -->
- <xsl:call-template name="menu"/>
-
- <div id="content">
- <div class="innertube">
- <h1>Bibliography</h1>
- </div>
-
- <table>
- <xsl:for-each select="descendant::cite">
- <xsl:sort select="@id"/>
- <xsl:if test="boolean(citedef)">
- <tr>
- <td><xsl:value-of select="@id"/></td>
- <td><xsl:value-of select="citedef"/></td>
- </tr>
- </xsl:if>
- </xsl:for-each>
- </table>
-
- <div class="footer">
- <hr/>
- <p>
- <xsl:value-of select="$copyright"/>
- <xsl:value-of select="header/copyright/year[1]"/>
- <xsl:text>-</xsl:text>
- <xsl:value-of select="header/copyright/year[2]"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="header/copyright/holder"/>
- </p>
- </div>
-
- </div>
- </div>
-
- </body>
- </html>
-
- </xsl:document>
- </xsl:template>
-
-
<!-- Special templates to calculate the arity of functions -->
<xsl:template name="calc-arity">
<xsl:param name="string"/>
diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl
index 7080394298..0e559f6067 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl
@@ -980,7 +980,7 @@
</fo:block>
- <xsl:apply-templates select="section|quote|warning|note|br|image|marker|table|p|pre|code|list|taglist|codeinclude|erleval">
+ <xsl:apply-templates select="section|quote|warning|note|br|image|marker|table|p|pre|code|list|taglist|codeinclude">
<xsl:with-param name="partnum" select="$partnum"/>
<xsl:with-param name="chapnum"><xsl:number/></xsl:with-param>
</xsl:apply-templates>
diff --git a/lib/erl_docgen/src/Makefile b/lib/erl_docgen/src/Makefile
index 82d051e9bb..4c6f542ebb 100644
--- a/lib/erl_docgen/src/Makefile
+++ b/lib/erl_docgen/src/Makefile
@@ -38,7 +38,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/erl_docgen-$(VSN)
MODULES = \
docgen_otp_specs \
docgen_edoc_xml_cb \
- docgen_xmerl_xml_cb
+ docgen_xmerl_xml_cb \
+ docgen_xml_to_chunk
HRL_FILES =
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
index 5342d02947..3354597de8 100644
--- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
@@ -781,7 +781,7 @@ functions(Fs) ->
function(_Name, E=#xmlElement{content = Es}) ->
TypeSpec = get_content(typespec, Es),
[?NL,{func, [ ?NL,
- {name,
+ {name, [{since,""}],
case funcheader(TypeSpec) of
[] ->
signature(get_content(args, Es),
diff --git a/lib/erl_docgen/src/docgen_xml_to_chunk.erl b/lib/erl_docgen/src/docgen_xml_to_chunk.erl
new file mode 100644
index 0000000000..32bfe980ef
--- /dev/null
+++ b/lib/erl_docgen/src/docgen_xml_to_chunk.erl
@@ -0,0 +1,757 @@
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2020. 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%
+%%----------------------------------------------------------------------
+%% File : docgen_xml_to_chunk
+%%
+%% Created : 1 Nov 2018 by Kenneth Lundin <uabkeld@elxa31hr002>
+%%
+%% Does translation of Erlang XML docs to EEP-48 doc chunks.
+%%----------------------------------------------------------------------
+-module(docgen_xml_to_chunk).
+-export([main/1]).
+
+-include_lib("kernel/include/eep48.hrl").
+
+main([FromBeam, _Escript, ToChunk]) ->
+ %% The given module is not documented, generate a hidden beam chunk file
+ Name = filename:basename(filename:rootname(FromBeam)) ++ ".erl",
+
+ EmptyDocs = #docs_v1{ anno = erl_anno:set_file(Name, erl_anno:new(0)),
+ module_doc = hidden, docs = []},
+ ok = file:write_file(ToChunk, term_to_binary(EmptyDocs,[compressed])),
+ ok;
+main([FromXML, FromBeam, _Escript, ToChunk]) ->
+ _ = erlang:process_flag(max_heap_size,20 * 1000 * 1000),
+ case docs(FromXML, FromBeam) of
+ {error, Reason} ->
+ io:format("Failed to create chunks: ~p~n",[Reason]),
+ erlang:halt(1);
+ {docs_v1,_,_,_,_,#{ source := S },[]} when
+ %% This is a list of all modules that do are known not have any functions
+ S =/= "../xml/gen_fsm.xml",
+ S =/= "../xml/shell_default.xml",
+ S =/= "../xml/user.xml",
+ S =/= "../xml/wxClipboardTextEvent.xml",
+ S =/= "../xml/wxDisplayChangedEvent.xml",
+ S =/= "../xml/wxGBSizerItem.xml",
+ S =/= "../xml/wxGraphicsBrush.xml",
+ S =/= "../xml/wxGraphicsFont.xml",
+ S =/= "../xml/wxGraphicsPen.xml",
+ S =/= "../xml/wxInitDialogEvent.xml",
+ S =/= "../xml/wxMaximizeEvent.xml",
+ S =/= "../xml/wxMouseCaptureLostEvent.xml",
+ S =/= "../xml/wxPaintEvent.xml",
+ S =/= "../xml/wxPreviewCanvas.xml",
+ S =/= "../xml/wxSysColourChangedEvent.xml",
+ S =/= "../xml/wxTaskBarIconEvent.xml",
+ S =/= "../xml/wxWindowCreateEvent.xml",
+ S =/= "../xml/wxWindowDestroyEvent.xml",
+ S =/= "../xml/wxDataObject.xml"
+ ->
+ io:format("Failed to create chunks: no functions found ~s~n",[S]),
+ erlang:halt(1),
+ ok;
+ Docs ->
+ ok = file:write_file(ToChunk, term_to_binary(Docs,[compressed]))
+ end.
+
+%% Error handling
+%%----------------------------------------------------------------------
+
+-define(error(Reason),
+ throw({dom_error, Reason})).
+
+%%----------------------------------------------------------------------
+
+%%======================================================================
+%% Records
+%%======================================================================
+
+%%----------------------------------------------------------------------
+%% State record for the validator
+%%----------------------------------------------------------------------
+-record(state, {
+ tags=[], %% Tag stack
+ cno=[], %% Current node number
+ namespaces = [], %% NameSpace stack
+ dom=[] %% DOM structure
+ }).
+
+%%======================================================================
+%% External functions
+%%======================================================================
+
+%%----------------------------------------------------------------------
+%% Function: initial_state() -> Result
+%% Parameters:
+%% Result:
+%% Description:
+%%----------------------------------------------------------------------
+initial_state() ->
+ #state{}.
+
+%%----------------------------------------------------------------------
+%% Function: get_dom(State) -> Result
+%% Parameters:
+%% Result:
+%% Description:
+%%----------------------------------------------------------------------
+get_dom(#state{dom=Dom}) ->
+ Dom.
+
+%%----------------------------------------------------------------------
+%% Function: event(Event, LineNo, State) -> Result
+%% Parameters:
+%% Result:
+%% Description:
+%%----------------------------------------------------------------------
+event(Event, _LineNo, State) ->
+ build_dom(Event, State).
+
+
+%%======================================================================
+%% Internal functions
+%%======================================================================
+
+%%----------------------------------------------------------------------
+%% Function : build_dom(Event, State) -> Result
+%% Parameters: Event = term()
+%% State = #xmerl_sax_simple_dom_state{}
+%% Result : #xmerl_sax_simple_dom_state{} |
+%% Description:
+%%----------------------------------------------------------------------
+
+%% Document
+%%----------------------------------------------------------------------
+build_dom(startDocument, State) ->
+ State#state{dom=[startDocument]};
+build_dom(endDocument,
+ #state{dom=[{Tag, Attributes, Content} |D]} = State) ->
+ case D of
+ [startDocument] ->
+ State#state{dom=[{Tag, Attributes,
+ lists:reverse(Content)}]};
+ [Decl, startDocument] ->
+ State#state{dom=[Decl, {Tag, Attributes,
+ lists:reverse(Content)}]};
+ _ ->
+ %% endDocument is also sent by the parser when a fault occur to tell
+ %% the event receiver that no more input will be sent
+ State
+ end;
+
+%% Element
+%%----------------------------------------------------------------------
+build_dom({startElement, _Uri, LocalName, _QName, Attributes},
+ #state{tags=T, dom=D} = State) ->
+
+ A = parse_attributes(LocalName, Attributes),
+ CName = list_to_atom(LocalName),
+
+ State#state{tags=[CName |T],
+ dom=[{CName,
+ lists:reverse(A),
+ []
+ } | D]};
+build_dom({endElement, _Uri, LocalName, _QName},
+ #state{tags=[_ |T],
+ dom=[{CName, CAttributes, CContent},
+ {PName, PAttributes, PContent} = _Parent | D]} = State) ->
+ case list_to_atom(LocalName) of
+ CName ->
+ SectionDepth = length([E || E <- T, E =:= section]),
+ MappedCName =
+ case CName of
+ title ->
+ lists:nth(SectionDepth+1,[h1,h2,h3]);
+ section when SectionDepth > 0 ->
+ p;
+ CName -> CName
+ end,
+
+ State#state{tags=T,
+ dom=[{PName, PAttributes,
+ [{MappedCName, CAttributes,
+ lists:reverse(CContent)}
+ |PContent]
+ } | D]};
+ _ ->
+ ?error("Got end of element: " ++ LocalName ++ " but expected: " ++
+ CName)
+ end;
+
+%% Text
+%%----------------------------------------------------------------------
+build_dom({characters, String},
+ #state{dom=[{Name, Attributes, Content}| D]} = State) ->
+ HtmlEnts = [{"&nbsp;",[160]},
+ {"&times;",[215]},
+ {"&plusmn;",[177]},
+ {"&ouml;","ö"},
+ {"&auml;","ä"},
+ {"&aring;","å"}
+ ],
+
+ NoHtmlEnt =
+ lists:foldl(
+ fun({Pat,Sub},Str) ->
+ re:replace(Str,Pat,Sub,[global,unicode])
+ end,String,HtmlEnts),
+
+ case re:run(NoHtmlEnt,"&[a-z]*;",[{capture,first,binary},unicode]) of
+ nomatch -> ok;
+ {match,[<<"&lt;">>]} -> ok;
+ {match,[<<"&gt;">>]} -> ok;
+ Else -> throw({found_illigal_thing,Else,String})
+ end,
+ NewContent =
+ [unicode:characters_to_binary(NoHtmlEnt,utf8)| Content],
+ State#state{dom=[{Name, Attributes, NewContent} | D]};
+
+build_dom({ignorableWhitespace, String},
+ #state{dom=[{Name,_,_} = _E|_]} = State) ->
+ case lists:member(Name,
+ [p,pre,input,code,quote,warning,
+ note,dont,do,c,i,em,strong,
+ seealso,tag,item]) of
+ true ->
+% io:format("Keep ign white: ~p ~p~n",[String, _E]),
+ build_dom({characters, String}, State);
+ false ->
+ State
+ end;
+
+build_dom({startEntity, SysId}, State) ->
+ io:format("startEntity:~p~n",[SysId]),
+ State;
+
+%% Default
+%%----------------------------------------------------------------------
+build_dom(_E, State) ->
+ State.
+
+%%----------------------------------------------------------------------
+%% Function : parse_attributes(ElName, Attributes) -> Result
+%% Parameters:
+%% Result :
+%% Description:
+%%----------------------------------------------------------------------
+parse_attributes(ElName, Attributes) ->
+ parse_attributes(ElName, Attributes, 1, []).
+
+parse_attributes(_, [], _, Acc) ->
+ Acc;
+parse_attributes(ElName, [{_Uri, _Prefix, LocalName, AttrValue} |As], N, Acc) ->
+ parse_attributes(ElName, As, N+1, [{list_to_atom(LocalName), AttrValue} |Acc]).
+
+docs(OTPXml, FromBEAM)->
+ case xmerl_sax_parser:file(OTPXml,
+ [skip_external_dtd,
+ {event_fun,fun event/3},
+ {event_state,initial_state()}]) of
+ {ok,Tree,_} ->
+ {ok, {Module, Chunks}} = beam_lib:chunks(FromBEAM,[exports,abstract_code]),
+ Dom = get_dom(Tree),
+ NewDom = transform(Dom,[]),
+ Chunk = to_chunk(NewDom, OTPXml, Module, proplists:get_value(abstract_code, Chunks)),
+ verify_chunk(Module,proplists:get_value(exports, Chunks), Chunk),
+ Chunk;
+ Else ->
+ {error,Else}
+ end.
+
+verify_chunk(M, Exports, #docs_v1{ docs = Docs } = Doc) ->
+
+ %% Make sure that each documented function actually is exported
+ Exported = [begin
+ FA = {F,A},
+ {M,F,A,lists:member(FA,Exports)}
+ end || {{function,F,A},_,_,_,_} <- Docs],
+ lists:foreach(fun({_M,_F,_A,true}) ->
+ ok
+ end,Exported),
+
+ try
+ shell_docs:validate(Doc)
+ catch Err ->
+ throw({maps:get(<<"en">>,Doc#docs_v1.module_doc), Err})
+ end.
+
+%% skip <erlref> but transform and keep its content
+transform([{erlref,_Attr,Content}|T],Acc) ->
+ Module = [Mod || Mod = {module,_,_} <- Content],
+ NewContent = Content -- Module,
+ [{module,SinceAttr,[Mname]}] = Module,
+ Since = case proplists:get_value(since,SinceAttr) of
+ undefined -> [];
+ [] -> [];
+ Vsn -> [{since,Vsn}]
+ end,
+ transform([{module,[{name,Mname}|Since],NewContent}|T],Acc);
+
+%% skip <header> and all of its content
+transform([{header,_Attr,_Content}|T],Acc) ->
+ transform(T,Acc);
+transform([{section,Attr,Content}|T],Acc) ->
+ transform(T,[{section,Attr,transform(Content,[])}|Acc]);
+
+%% transform <list><item> to <ul><li> or <ol><li> depending on type attribute
+transform([{list,Attr,Content}|T],Acc) ->
+ transform([transform_list(Attr,Content)|T],Acc);
+
+%% transform <taglist>(tag,item+)+ to <dl>(dt,item+)+
+transform([{taglist,Attr,Content}|T],Acc) ->
+ transform([transform_taglist(Attr,Content)|T],Acc);
+
+%% remove <anno> as it is only used to validate specs vs xml src
+transform([{anno,[],Content}|T],Acc) ->
+ transform([Content|T],Acc);
+
+%% transform <c> to <code>
+transform([{c,[],Content}|T],Acc) ->
+ transform(T, [{code,[],transform(Content,[])}|Acc]);
+
+%% transform <code> to <pre><code>
+transform([{code,Attr,Content}|T],Acc) ->
+ transform(T, [{pre,[],[{code,Attr,transform(Content,[])}]}|Acc]);
+%% transform <pre> to <pre><code>
+transform([{pre,Attr,Content}|T],Acc) ->
+ transform(T, [{pre,[],[{code,Attr,transform(Content,[])}]}|Acc]);
+
+%% transform <funcs> with <func> as children
+transform([{funcs,_Attr,Content}|T],Acc) ->
+ Fns = {functions,[],transform_funcs(Content, [])},
+ transform(T,[Fns|Acc]);
+%% transform <datatypes> with <datatype> as children
+transform([{datatypes,_Attr,Content}|T],Acc) ->
+ Dts = transform(Content, []),
+ transform(T,[{datatypes,[],Dts}|Acc]);
+transform([{datatype,_Attr,Content}|T],Acc) ->
+ transform(T,transform_datatype(Content, []) ++ Acc);
+%% Ignore <datatype_title>
+transform([{datatype_title,_Attr,_Content}|T],Acc) ->
+ transform(T,Acc);
+%% transform <desc>Content</desc> to Content
+transform([{desc,_Attr,Content}|T],Acc) ->
+ transform(T,[transform(Content,[])|Acc]);
+transform([{strong,Attr,Content}|T],Acc) ->
+ transform([{em,Attr,Content}|T],Acc);
+%% transform <marker id="name"/> to <a id="name"/>....
+transform([{marker,Attr,Content}|T],Acc) ->
+ transform(T,[{a,Attr,transform(Content,[])}|Acc]);
+%% transform <url href="external URL"> Content</url> to <a href....
+transform([{url,Attr,Content}|T],Acc) ->
+ transform(T,[{a,Attr,transform(Content,[])}|Acc]);
+%% transform note/warning/do/don't to <p class="thing">
+transform([{What,[],Content}|T],Acc)
+ when What =:= note; What =:= warning; What =:= do; What =:= dont ->
+ WhatP = {p,[{class,atom_to_list(What)}], transform(Content,[])},
+ transform(T,[WhatP|Acc]);
+
+transform([{type,_,[]}|_] = Dom,Acc) ->
+ %% Types are laid out sequentially in the source xml so we need to
+ %% parse them like that here too.
+ case transform_types(Dom,[]) of
+ {[],T} ->
+ transform(T,Acc);
+ {Types,T} ->
+ %% We sort the types here because in the source xml
+ %% the description and the declaration do not have
+ %% to be next to each other. But we want to have that
+ %% for the doc chunks.
+ NameSort = fun({li,A,_},{li,B,_}) ->
+ NameA = proplists:get_value(name,A),
+ NameB = proplists:get_value(name,B),
+ if NameA == NameB ->
+ length(A) =< length(B);
+ true ->
+ NameA < NameB
+ end
+ end,
+ transform(T,[{ul,[{class,"types"}],lists:sort(NameSort,Types)}|Acc])
+ end;
+transform([{type_desc,Attr,_Content}|T],Acc) ->
+ %% We skip any type_desc with the variable attribute
+ true = proplists:is_defined(variable, Attr),
+ transform(T,Acc);
+transform([{type,[],Content}|T],Acc) ->
+ transform(T,[{ul,[{class,"types"}],transform(Content,[])}|Acc]);
+transform([{v,[],Content}|T],Acc) ->
+ transform(T, [{li,[{class,"type"}],transform(Content,[])}|Acc]);
+transform([{d,[],Content}|T],Acc) ->
+ transform(T, [{li,[{class,"description"}],transform(Content,[])}|Acc]);
+
+transform([Tag = {seealso,_Attr,_Content}|T],Acc) ->
+ transform([transform_seealso(Tag)|T],Acc);
+
+transform([{term,Attr,[]}|T],Acc) ->
+ transform([list_to_binary(proplists:get_value(id,Attr))|T],Acc);
+
+transform([{fsummary,_,_}|T],Acc) ->
+ %% We skip fsummary as it many times is just a duplicate of the
+ %% first line of the docs.
+ transform(T,Acc);
+
+transform([{input,_,Content}|T],Acc) ->
+ %% Just remove input as it is not used by anything
+ transform(T,[transform(Content,[])|Acc]);
+
+%% Tag and Attr is used as is but Content is transformed
+transform([{Tag,Attr,Content}|T],Acc) ->
+ transform(T,[{Tag,Attr,transform(Content,[])}|Acc]);
+transform([Binary|T],Acc) ->
+ transform(T,[Binary|Acc]);
+transform([],Acc) ->
+ lists:flatten(lists:reverse(Acc)).
+
+transform_list([{type,"ordered"}],Content) ->
+ {ol,[],[{li,A2,C2}||{item,A2,C2}<-Content]};
+transform_list(_,Content) ->
+ {ul,[],[{li,A2,C2}||{item,A2,C2}<-Content]}.
+
+transform_types([{type,Attr,[]}|T],Acc) ->
+ case proplists:is_defined(name,Attr) of
+ true ->
+ transform_types(T, [{li,Attr,[]}|Acc]);
+ false ->
+ true = proplists:is_defined(variable, Attr),
+ transform_types(T, Acc)
+ end;
+transform_types([{type_desc,Attr,Content}|T],Acc) ->
+ case proplists:is_defined(name,Attr) of
+ true ->
+ TypeDesc = transform(Content,[]),
+ transform_types(T, [{li,Attr ++ [{class,"description"}],TypeDesc}|Acc]);
+ false ->
+ true = proplists:is_defined(variable, Attr),
+ transform_types(T, Acc)
+ end;
+transform_types([{type,_,_}|_T],_Acc) ->
+ throw(mixed_type_declarations);
+transform_types(Dom,Acc) ->
+ {lists:reverse(Acc),Dom}.
+
+transform_taglist(Attr,Content) ->
+ Items =
+ lists:map(fun({tag,A,C}) ->
+ {dt,A,C};
+ ({item,A,C}) ->
+ {dd,A,C}
+ end, Content),
+ {dl,Attr,Items}.
+
+%% if we have {func,[],[{name,...},{name,....},...]}
+%% we convert it to one {func,[],[{name,...}] per arity lowest first.
+transform_funcs([Func|T],Acc) ->
+ transform_funcs(T,func2func(Func) ++ Acc);
+transform_funcs([],Acc) ->
+ lists:reverse(Acc).
+
+func2func({func,Attr,Contents}) ->
+
+ ContentsNoName = [NC||NC <- Contents, element(1,NC) /= name],
+
+ EditLink =
+ case proplists:get_value(ghlink,Attr) of
+ undefined ->
+ #{};
+ GhLink ->
+ #{ edit_url =>
+ iolist_to_binary(["https://github.com/erlang/otp/edit/",GhLink]) }
+ end,
+
+ VerifyNameList =
+ fun(NameList, Test) ->
+ %% Assert that we don't mix ways to write <name>
+ [begin
+ ok = Test(C),
+ {proplists:get_value(name,T),proplists:get_value(arity,T)}
+ end || {name,T,C} <- NameList]
+ end,
+
+ NameList = [Name || {name,_,_} = Name <- Contents],
+
+ %% "Since" is hard to accurately as there can be multiple <name> per <func> and they
+ %% can refer to the same or other arities. This should be improved in the future but
+ %% for now we set since to a comma separated list of all since attributes.
+ SinceMD =
+ case [proplists:get_value(since, SinceAttr) ||
+ {name,SinceAttr,_} <- NameList, proplists:get_value(since, SinceAttr) =/= []] of
+ [] -> EditLink;
+ Sinces ->
+ EditLink#{ since => unicode:characters_to_binary(
+ lists:join(",",lists:usort(Sinces))) }
+ end,
+
+ Functions =
+ case NameList of
+ [{name,_,[]}|_] ->
+ %% Spec style function docs
+ TagsToFA =
+ fun(Tags) ->
+ {proplists:get_value(name,Tags),
+ proplists:get_value(arity,Tags)}
+ end,
+
+ _ = VerifyNameList(NameList,fun([]) -> ok end),
+
+ FAs = [TagsToFA(FAttr) || {name,FAttr,[]} <- NameList ],
+ FAClauses = lists:usort([{TagsToFA(FAttr),proplists:get_value(clause_i,FAttr)}
+ || {name,FAttr,[]} <- NameList ]),
+ Signature = [iolist_to_binary([F,"/",A]) || {F,A} <- FAs],
+ lists:map(
+ fun({F,A}) ->
+ Specs = [{func_to_atom(CF),list_to_integer(CA),C}
+ || {{CF,CA},C} <- FAClauses,
+ F =:= CF, A =:= CA],
+ {function,[{name,F},{arity,list_to_integer(A)},
+ {signature,Signature},
+ {meta,SinceMD#{ signature => Specs }}],
+ ContentsNoName}
+ end, lists:usort(FAs));
+ NameList ->
+ %% Manual style function docs
+ FAs = lists:flatten([func_to_tuple(NameString) || {name, _Attr, NameString} <- NameList]),
+
+ _ = VerifyNameList(NameList,fun([_|_]) -> ok end),
+
+ Signature = [strip_tags(NameString) || {name, _Attr, NameString} <- NameList],
+ [{function,[{name,F},{arity,A},
+ {signature,Signature},
+ {meta,SinceMD}],ContentsNoName}
+ || {F,A} <- lists:usort(FAs)]
+ end,
+ transform(Functions,[]).
+
+func_to_tuple(Chars) ->
+ try
+ [Name,Args] = string:split(strip_tags(Chars),"("),
+ Arities = parse_args(unicode:characters_to_list(Args)),
+ [{unicode:characters_to_list(Name),Arity} || Arity <- Arities]
+ catch E:R:ST ->
+ io:format("Failed to parse: ~p~n",[Chars]),
+ erlang:raise(E,R,ST)
+ end.
+
+%% This function parses a documentation <name> attribute to figure
+%% out the arities if that function. Example:
+%% "start([go,Mode] [,Extra])" returns [1, 2].
+%%
+%% This assumes that when a single <name> describes many arities
+%% the arities are listed with [, syntax.
+parse_args(")" ++ _) ->
+ [0];
+parse_args(Args) ->
+ parse_args(unicode:characters_to_list(Args),1,[]).
+parse_args([$[,$,|T],Arity,[]) ->
+ parse_args(T,Arity,[$[]) ++ parse_args(T,Arity+1,[]);
+parse_args([$,|T],Arity,[]) ->
+ parse_args(T,Arity+1,[]);
+parse_args([Open|T],Arity,Stack)
+ when Open =:= $[; Open =:= ${; Open =:= $( ->
+ parse_args(T,Arity,[Open|Stack]);
+parse_args([$]|T],Arity,[$[|Stack]) ->
+ parse_args(T,Arity,Stack);
+parse_args([$}|T],Arity,[${|Stack]) ->
+ parse_args(T,Arity,Stack);
+parse_args([$)|T],Arity,[$(|Stack]) ->
+ parse_args(T,Arity,Stack);
+parse_args([$)|_T],Arity,[]) ->
+ [Arity];
+parse_args([_H|T],Arity,Stack) ->
+ parse_args(T,Arity,Stack).
+
+strip_tags([{_Tag,_Attr,Content}|T]) ->
+ [Content | strip_tags(T)];
+strip_tags([H|T]) when not is_tuple(H) ->
+ [H | strip_tags(T)];
+strip_tags([]) ->
+ [].
+
+transform_datatype(Dom,_Acc) ->
+ ContentsNoName = transform([NC||NC <- Dom, element(1,NC) /= name],[]),
+ [case N of
+ {name,NameAttr,[]} ->
+ {datatype,NameAttr,ContentsNoName};
+ {name,[],Content} ->
+ [{Name,Arity}] = func_to_tuple(Content),
+ Signature = strip_tags(Content),
+ {datatype,[{name,Name},{n_vars,integer_to_list(Arity)},
+ {signature,Signature}],ContentsNoName}
+ end || N = {name,_,_} <- Dom].
+
+transform_seealso({seealso,Attr,_Content}) ->
+ {a, Attr, _Content}.
+
+to_chunk(Dom, Source, Module, AST) ->
+ [{module,MAttr,Mcontent}] = Dom,
+
+ ModuleDocs = lists:flatmap(
+ fun({Tag,_,Content}) when Tag =:= description;
+ Tag =:= section ->
+ Content;
+ ({_,_,_}) ->
+ []
+ end, Mcontent),
+
+ TypeMeta = add_types(AST, maps:from_list([{source,Source}|MAttr])),
+
+ TypeMap = maps:get(types, TypeMeta, []),
+
+ Anno = erl_anno:set_file(atom_to_list(Module)++".erl",erl_anno:new(0)),
+
+ Types = lists:flatten([Types || {datatypes,[],Types} <- Mcontent]),
+
+ TypeEntries =
+ lists:map(
+ fun({datatype,Attr,Descr}) ->
+ TypeName = func_to_atom(proplists:get_value(name,Attr)),
+ TypeArity = case proplists:get_value(n_vars,Attr) of
+ undefined ->
+ find_type_arity(TypeName, TypeMap);
+ Arity ->
+ list_to_integer(Arity)
+ end,
+ TypeArgs = lists:join(",",[lists:concat(["Arg",I]) || I <- lists:seq(1,TypeArity)]),
+ PlaceholderSig = io_lib:format("-type ~p(~s) :: term().",[TypeName,TypeArgs]),
+ TypeSignature = proplists:get_value(
+ signature,Attr,[iolist_to_binary(PlaceholderSig)]),
+ MetaSig =
+ case maps:get({TypeName, TypeArity}, TypeMap, undefined) of
+ undefined ->
+ #{};
+ Sig ->
+ #{ signature => [Sig] }
+ end,
+ docs_v1_entry(type, Anno, TypeName, TypeArity, TypeSignature, MetaSig, Descr)
+ end, Types),
+
+ Functions = lists:flatten([Functions || {functions,[],Functions} <- Mcontent]),
+
+ FuncEntrys =
+ lists:flatmap(
+ fun({function,Attr,Fdoc}) ->
+ case func_to_atom(proplists:get_value(name,Attr)) of
+ callback ->
+ [];
+ Name ->
+ Arity = proplists:get_value(arity,Attr),
+ Signature = proplists:get_value(signature,Attr),
+ FMeta = proplists:get_value(meta,Attr),
+ MetaWSpec = add_spec(AST,FMeta),
+ [docs_v1_entry(function, Anno, Name, Arity, Signature, MetaWSpec, Fdoc)]
+ end
+ end, Functions),
+
+ docs_v1(ModuleDocs, Anno, TypeMeta, FuncEntrys ++ TypeEntries).
+
+docs_v1(DocContents, Anno, Metadata, Docs) ->
+ #docs_v1{ anno = Anno,
+ module_doc = #{<<"en">> => shell_docs:normalize(DocContents)},
+ metadata = maps:merge(Metadata, (#docs_v1{})#docs_v1.metadata),
+ docs = Docs }.
+
+docs_v1_entry(Kind, Anno, Name, Arity, Signature, Metadata, DocContents) ->
+ AnnoWLine =
+ case Metadata of
+ #{ signature := [Sig|_] } ->
+ erl_anno:set_line(element(2, Sig), Anno);
+ _NoSignature ->
+ Anno
+ end,
+ {{Kind, Name, Arity}, AnnoWLine, lists:flatten(Signature),
+ #{ <<"en">> => shell_docs:normalize(DocContents)}, Metadata}.
+
+%% A special list_to_atom that handles
+%% 'and'
+%% Destroy
+%% 'begin'
+func_to_atom(List) ->
+ case erl_scan:string(List) of
+ {ok,[{atom,_,Fn}],_} -> Fn;
+ {ok,[{var,_,Fn}],_} -> Fn;
+ {ok,[{Fn,_}],_} -> Fn;
+ {ok,[{var,_,_},{':',_},_],_} ->
+ callback
+ end.
+
+-define(IS_TYPE(TO),(TO =:= type orelse TO =:= opaque)).
+
+add_spec(no_abstract_code, Meta) ->
+ Meta;
+add_spec({raw_abstract_v1, AST}, Meta = #{ signature := Specs } ) ->
+ Meta#{ signature := add_spec_clauses(AST, merge_clauses(Specs,#{})) };
+add_spec(_, Meta) ->
+ Meta.
+
+add_types(no_abstract_code, Meta) ->
+ Meta;
+add_types({raw_abstract_v1, AST}, Meta) ->
+ Meta#{ types =>
+ maps:from_list(
+ [{{Name,length(Args)},T} || T = {attribute,_,TO,{Name, _, Args}} <- AST,
+ ?IS_TYPE(TO)]) }.
+
+add_spec_clauses(AST, [{{F,A},Clauses}|T]) ->
+ [filter_clauses(find_spec(AST,F,A),Clauses) | add_spec_clauses(AST,T)];
+add_spec_clauses(_AST, []) ->
+ [].
+
+filter_clauses(Spec,[undefined]) ->
+ Spec;
+filter_clauses({attribute,Ln,spec,{FA,Clauses}},ClauseIds) ->
+ {_,FilteredClauses} =
+ lists:foldl(
+ fun({TO,_,_,_} = C,{Cnt,Acc}) when ?IS_TYPE(TO) ->
+ case lists:member(integer_to_list(Cnt),ClauseIds) of
+ true ->
+ {Cnt+1,[C | Acc]};
+ false ->
+ {Cnt+1,Acc}
+ end
+ end, {1, []}, Clauses),
+ {attribute,Ln,spec,{FA,lists:reverse(FilteredClauses)}}.
+
+merge_clauses([{F,A,Clause}|T],Acc) ->
+ merge_clauses(T,Acc#{ {F,A} => [Clause | maps:get({F,A},Acc,[])]});
+merge_clauses([],Acc) ->
+ maps:to_list(Acc).
+
+find_type_arity(Name, [{{Name,_},{attribute,_,TO,{Name,_,Args}}}|_T]) when ?IS_TYPE(TO) ->
+ length(Args);
+find_type_arity(Name, [_|T]) ->
+ find_type_arity(Name,T);
+find_type_arity(Name, Map) when is_map(Map) ->
+ find_type_arity(Name, maps:to_list(Map)).
+
+find_spec(AST, Func, Arity) ->
+ Specs = lists:filter(fun({attribute,_,spec,{{F,A},_}}) ->
+ F =:= Func andalso A =:= Arity;
+ ({attribute,_,spec,{{_,F,A},_}}) ->
+ F =:= Func andalso A =:= Arity;
+ (_) ->
+ false
+ end, AST),
+ case Specs of
+ [S] ->
+ S;
+ [] ->
+ io:format("Could not find spec for ~p/~p~n",[Func,Arity]),
+ exit(1)
+ end.
diff --git a/lib/erl_docgen/src/erl_docgen.app.src b/lib/erl_docgen/src/erl_docgen.app.src
index 171c697585..c2641f30df 100644
--- a/lib/erl_docgen/src/erl_docgen.app.src
+++ b/lib/erl_docgen/src/erl_docgen.app.src
@@ -3,7 +3,8 @@
{vsn, "%VSN%"},
{modules, [docgen_otp_specs,
docgen_edoc_xml_cb,
- docgen_xmerl_xml_cb
+ docgen_xmerl_xml_cb,
+ docgen_xml_to_chunk
]
},
{registered,[]},
diff --git a/lib/erl_interface/doc/src/Makefile b/lib/erl_interface/doc/src/Makefile
index 27b55aa769..95f3e77c61 100644
--- a/lib/erl_interface/doc/src/Makefile
+++ b/lib/erl_interface/doc/src/Makefile
@@ -36,7 +36,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# Target Specs
# ----------------------------------------------------
-XML_REF1_FILES = erl_call.xml
+XML_REF1_FILES = erl_call_cmd.xml
XML_REF3_FILES = ei_global.xml \
ei.xml \
ei_connect.xml \
@@ -51,72 +51,9 @@ XML_CHAPTER_FILES = ei_users_guide.xml notes.xml
XML_FILES = $(XML_REF1_FILES) $(XML_REF3_FILES) $(BOOK_FILES) \
$(XML_APPLICATION_FILES) $(XML_PART_FILES) $(XML_CHAPTER_FILES)
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-GIF_FILES =
-
-MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1)
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN1_FILES) $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt lcnt:
-
-clean clean_docs clean_tex:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN1DIR)/*
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
+NO_CHUNKS=$(XML_REF3_FILES)
# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DATA) $(MAN1_FILES) "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3_FILES) "$(RELEASE_PATH)/man/man3"
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/erl_interface/doc/src/erl_call.xml b/lib/erl_interface/doc/src/erl_call_cmd.xml
index 91cb9dbd32..91cb9dbd32 100644
--- a/lib/erl_interface/doc/src/erl_call.xml
+++ b/lib/erl_interface/doc/src/erl_call_cmd.xml
diff --git a/lib/erl_interface/doc/src/ref_man.xml b/lib/erl_interface/doc/src/ref_man.xml
index 4c79f44ff0..d00868562f 100644
--- a/lib/erl_interface/doc/src/ref_man.xml
+++ b/lib/erl_interface/doc/src/ref_man.xml
@@ -36,5 +36,5 @@
<xi:include href="ei_connect.xml"/>
<xi:include href="registry.xml"/>
<xi:include href="ei_global.xml"/>
- <xi:include href="erl_call.xml"/>
+ <xi:include href="erl_call_cmd.xml"/>
</application>
diff --git a/lib/et/doc/src/Makefile b/lib/et/doc/src/Makefile
index 93e2f8eeee..fb13e07d9e 100644
--- a/lib/et/doc/src/Makefile
+++ b/lib/et/doc/src/Makefile
@@ -29,87 +29,11 @@ include ../../vsn.mk
VSN=$(ET_VSN)
APPLICATION=et
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
-# Target Specs
-# ----------------------------------------------------
-
include files.mk
-# ----------------------------------------------------
-
XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
- $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
XML_GEN_FILES = $(GEN_XML:%=$(XMLDIR)/%)
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(GEN_XML:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%: %
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: images $(HTML_REF_MAN_FILE)
-
-clean clean_docs:
- for file in $(XML_FILES); do \
- if [ -f $$file\src ]; then \
- rm -f $$file; \
- fi \
- done
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-man: $(MAN3_FILES)
-
-images: $(IMAGE_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
-
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/et/doc/src/et_collector.xml b/lib/et/doc/src/et_collector.xml
index f908612797..d258be2d40 100644
--- a/lib/et/doc/src/et_collector.xml
+++ b/lib/et/doc/src/et_collector.xml
@@ -139,19 +139,6 @@
</desc>
</func>
<func>
- <name since="">load_event_file(CollectorPid, FileName) -> {ok, BadBytes} | exit(Reason)</name>
- <fsummary>Load the event table from a file</fsummary>
- <type>
- <v>CollectorPid = pid()</v>
- <v>FileName = string()</v>
- <v>BadBytes = integer(X) where X >= 0</v>
- <v>Reason = term()</v>
- </type>
- <desc>
- <p>Load the event table from a file.</p>
- </desc>
- </func>
- <func>
<name since="">report(Handle, TraceOrEvent) -> {ok, Continuation} | exit(Reason)</name>
<name since="">report_event(Handle, DetailLevel, FromTo, Label, Contents) -> {ok, Continuation} | exit(Reason)</name>
<name since="">report_event(Handle, DetailLevel, From, To, Label, Contents) -> {ok, Continuation} | exit(Reason)</name>
@@ -193,17 +180,6 @@
</desc>
</func>
<func>
- <name since="">get_table_handle(CollectorPid) -> Handle</name>
- <fsummary>Return a table handle</fsummary>
- <type>
- <v>CollectorPid = pid()</v>
- <v>Handle = record(table_handle)</v>
- </type>
- <desc>
- <p>Return a table handle.</p>
- </desc>
- </func>
- <func>
<name since="">get_global_pid() -> CollectorPid | exit(Reason)</name>
<fsummary>Return a the identity of the globally registered collector if there is any</fsummary>
<type>
diff --git a/lib/et/doc/src/files.mk b/lib/et/doc/src/files.mk
index c9041caa81..24815d0674 100644
--- a/lib/et/doc/src/files.mk
+++ b/lib/et/doc/src/files.mk
@@ -38,7 +38,6 @@ GEN_XML = \
et_desc.xml \
et_examples.xml
-
BOOK_FILES = book.xml
IMAGE_FILES = \
@@ -53,4 +52,3 @@ IMAGE_FILES = \
sim_trans_mgr_actors.png \
sim_trans_move_actor.png \
sim_trans_write_lock.png
-
diff --git a/lib/et/src/et_collector.erl b/lib/et/src/et_collector.erl
index 3609238509..7fa5dbda38 100644
--- a/lib/et/src/et_collector.erl
+++ b/lib/et/src/et_collector.erl
@@ -40,12 +40,10 @@
start_trace_client/3,
start_trace_port/1,
- %% load_event_file/2,
save_event_file/3,
clear_table/1,
get_global_pid/0,
- %% get_table_handle/1,
get_table_size/1,
change_pattern/2,
make_key/2,
diff --git a/lib/eunit/doc/src/Makefile b/lib/eunit/doc/src/Makefile
index 117542cb37..22f2460fe9 100644
--- a/lib/eunit/doc/src/Makefile
+++ b/lib/eunit/doc/src/Makefile
@@ -29,43 +29,22 @@ VSN=$(EUNIT_VSN)
APPLICATION=eunit
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
-# Help application directory specification
-# ----------------------------------------------------
-
-EDOC_DIR = $(ERL_TOP)/lib/edoc
-SYNTAX_TOOLS_DIR = $(ERL_TOP)/lib/syntax_tools
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
-EUNIT_DIR = $(ERL_TOP)/lib/eunit/src
-EUNIT_INC_DIR = $(ERL_TOP)/lib/eunit/include
-
-EUNIT_MODULES = \
- eunit eunit_surefire
XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = $(EUNIT_MODULES:=.xml)
-
-XML_PART_FILES = \
- part.xml
+EDOC_REF3_FILES = \
+ eunit.xml eunit_surefire.xml
-XML_CHAPTER_FILES = \
+EDOC_CHAPTER_FILE = \
chapter.xml
XML_NOTES_FILES = \
notes.xml
-HTML_EXAMPLE_FILES =
-
-HTML_STYLESHEET_FILES = \
- ../stylesheet.css
+XML_PART_FILES = \
+ part.xml
BOOK_FILES = book.xml
@@ -73,100 +52,6 @@ XML_FILES = \
$(BOOK_FILES) $(XML_NOTES_FILES) \
$(XML_PART_FILES) $(XML_APPLICATION_FILES)
-XML_GEN_FILES = $(XML_REF3_FILES:%=$(XMLDIR)/%) $(XML_CHAPTER_FILES:%=$(XMLDIR)/%)
-
-# ----------------------------------------------------
-INFO_FILE = ../../info
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-
-EXTRA_FILES = \
- $(DEFAULT_HTML_FILES) \
- $(DEFAULT_GIF_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)\
- $(XML_NOTES_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-
# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-$(XML_REF3_FILES:%=$(XMLDIR)/%):
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(EUNIT_VSN) -i $(EUNIT_INC_DIR) -dir $(XMLDIR) $(EUNIT_DIR)/$(@:$(XMLDIR)/%.xml=%.erl)
-
-$(XML_CHAPTER_FILES:%=$(XMLDIR)/%):
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(EUNIT_VSN) -chapter -dir $(XMLDIR) ../overview.edoc
-
-info:
- @echo "XML_PART_FILES: $(XML_PART_FILES)"
- @echo "XML_APPLICATION_FILES: $(XML_APPLICATION_FILES)"
- @echo "EUNIT_XML_FILES: $(EUNIT_XML_FILES)"
- @echo "EUNIT_MODULES: $(EUNIT_MODULES)"
- @echo "HTML_FILES: $(HTML_FILES)"
- @echo "HTMLDIR: $(HTMLDIR)"
- @echo "DEFAULT_GIF_FILES: $(DEFAULT_GIF_FILES)"
- @echo "DEFAULT_HTML_FILES: $(DEFAULT_HTML_FILES)"
- @echo "EXTRA_FILES: $(EXTRA_FILES)"
-
-xml: $(XML_REF3_FILES) $(XML_CHAPTER_FILES)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(XML_REF3_FILES) $(XML_CHAPTER_FILES) *.html
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/ftp/doc/src/Makefile b/lib/ftp/doc/src/Makefile
index 20fbbc73a9..fc95e83ae8 100644
--- a/lib/ftp/doc/src/Makefile
+++ b/lib/ftp/doc/src/Makefile
@@ -26,12 +26,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# ----------------------------------------------------
include ../../vsn.mk
VSN=$(FTP_VSN)
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
+APPLICATION=ftp
# ----------------------------------------------------
# Target Specs
@@ -59,97 +54,6 @@ XML_FILES = \
$(XML_REF3_FILES) \
$(XML_APPLICATION_FILES)
-# GIF_FILES = ftp.gif
-
-
-# ----------------------------------------------------
-
-HTML_FILES = \
- $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-EXTRA_FILES = \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-ldocs: local_docs
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs: clean_html clean_man clean_pdf
- rm -rf $(XMLDIR)
- rm -f errs core *~
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-clean_pdf:
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
-
-clean_html:
- rm -rf $(TOP_HTML_FILES) $(HTMLDIR)/*
-
-clean_man:
- rm -f $(MAN3_FILES)
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
+# IMAGE_FILES = ftp.gif
-info:
- @echo "GIF_FILES:\n$(GIF_FILES)"
- @echo ""
- @echo "EXTRA_FILES:\n$(EXTRA_FILES)"
- @echo ""
- @echo "HTML_FILES:\n$(HTML_FILES)"
- @echo ""
- @echo "TOP_HTML_FILES:\n$(TOP_HTML_FILES)"
- @echo ""
- @echo "XML_REF3_FILES:\n$(XML_REF3_FILES)"
- @echo ""
- @echo "XML_REF6_FILES:\n$(XML_REF6_FILES)"
- @echo ""
- @echo "XML_CHAPTER_FILES:\n$(XML_CHAPTER_FILES)"
- @echo ""
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/hipe/doc/src/Makefile b/lib/hipe/doc/src/Makefile
index 104c15f2bb..e517e90fd0 100644
--- a/lib/hipe/doc/src/Makefile
+++ b/lib/hipe/doc/src/Makefile
@@ -28,11 +28,6 @@ VSN=$(HIPE_VSN)
APPLICATION=hipe
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -47,73 +42,4 @@ XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-GIF_FILES =
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-EXTRA_FILES = \
- $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-distclean: clean
-realclean: clean
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
-
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/inets/doc/src/Makefile b/lib/inets/doc/src/Makefile
index cbc0e384d8..a4405c5728 100644
--- a/lib/inets/doc/src/Makefile
+++ b/lib/inets/doc/src/Makefile
@@ -26,12 +26,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# ----------------------------------------------------
include ../../vsn.mk
VSN=$(INETS_VSN)
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
+APPLICATION=inets
# ----------------------------------------------------
# Target Specs
@@ -71,97 +66,8 @@ XML_FILES = \
$(XML_REF3_FILES) \
$(XML_APPLICATION_FILES)
-# GIF_FILES = inets.gif
-
-
-# ----------------------------------------------------
-
-HTML_FILES = \
- $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-EXTRA_FILES = \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-ldocs: local_docs
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs: clean_html clean_man clean_pdf
- rm -rf $(XMLDIR)
- rm -f errs core *~
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
+NO_CHUNKS = httpd_custom_api.xml
-debug opt:
-
-clean_pdf:
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
-
-clean_html:
- rm -rf $(TOP_HTML_FILES) $(HTMLDIR)/*
-
-clean_man:
- rm -f $(MAN3_FILES)
-
-
-# ----------------------------------------------------
-# Release Target
# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
-info:
- @echo "GIF_FILES:\n$(GIF_FILES)"
- @echo ""
- @echo "EXTRA_FILES:\n$(EXTRA_FILES)"
- @echo ""
- @echo "HTML_FILES:\n$(HTML_FILES)"
- @echo ""
- @echo "TOP_HTML_FILES:\n$(TOP_HTML_FILES)"
- @echo ""
- @echo "XML_REF3_FILES:\n$(XML_REF3_FILES)"
- @echo ""
- @echo "XML_REF6_FILES:\n$(XML_REF6_FILES)"
- @echo ""
- @echo "XML_CHAPTER_FILES:\n$(XML_CHAPTER_FILES)"
- @echo ""
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/inets/doc/src/httpd_util.xml b/lib/inets/doc/src/httpd_util.xml
index e0f947f860..cd22b89314 100644
--- a/lib/inets/doc/src/httpd_util.xml
+++ b/lib/inets/doc/src/httpd_util.xml
@@ -171,9 +171,7 @@
<desc>
<p><c>lookup_mime</c> returns the MIME type associated with a
specific file suffix as specified in the file <c>mime.types</c>
- (located in the
- <path unix="$SERVER_ROOT/conf/mime.types" windows="%SERVER_ROOT%\conf\mime.types">
- config directory</path>).</p>
+ (located in the config directory).</p>
</desc>
</func>
@@ -191,9 +189,7 @@
<desc>
<p><c>lookup_mime_default</c> returns the MIME type associated
with a specific file suffix as specified in the
- <c>mime.types</c> file (located in the
- <path unix="$SERVER_ROOT/conf/mime.types" windows="%SERVER_ROOT%\conf\mime.types">
- config directory</path>).
+ <c>mime.types</c> file (located in the config directory).
If no appropriate association is found, the value of <c>DefaultType</c> is
returned.</p>
</desc>
diff --git a/lib/inets/doc/src/introduction.xml b/lib/inets/doc/src/introduction.xml
index faf911f188..a5037b02dd 100644
--- a/lib/inets/doc/src/introduction.xml
+++ b/lib/inets/doc/src/introduction.xml
@@ -37,7 +37,7 @@
<p><c>Inets</c> is a container for Internet clients and servers
including the following:</p>
<list type="bulleted">
- <item>An <term id="HTTP"></term> client and server</item>
+ <item>An HTTP client and server</item>
</list>
<p>The HTTP client and server are HTTP 1.1 compliant as
defined in
diff --git a/lib/inets/doc/src/part.xml b/lib/inets/doc/src/part.xml
index b9c8ed674c..eca680cdb6 100644
--- a/lib/inets/doc/src/part.xml
+++ b/lib/inets/doc/src/part.xml
@@ -33,7 +33,7 @@
<p>The <c>Inets</c> application provides a set of
Internet-related services as follows:</p>
<list type="bulleted">
- <item>An <term id="HTTP"></term> client and server</item>
+ <item>An HTTP client and server</item>
</list>
<p>The HTTP client and server are HTTP 1.1 compliant as
defined in
diff --git a/lib/inets/src/http_server/httpd.erl b/lib/inets/src/http_server/httpd.erl
index da785d8b43..ae35f109ed 100644
--- a/lib/inets/src/http_server/httpd.erl
+++ b/lib/inets/src/http_server/httpd.erl
@@ -41,7 +41,8 @@
reload_config/2,
info/1,
info/2,
- info/3
+ info/3,
+ info/4
]).
-deprecated({parse_query, 1,
diff --git a/lib/jinterface/doc/src/Makefile b/lib/jinterface/doc/src/Makefile
index f5cba9d074..348cf0e429 100644
--- a/lib/jinterface/doc/src/Makefile
+++ b/lib/jinterface/doc/src/Makefile
@@ -53,14 +53,9 @@ BOOK_FILES = book.xml
XML_FILES = $(BOOK_FILES) $(XML_APP_FILES) $(XML_REF3_FILES) \
$(XML_PART_FILES) $(XML_CHAPTER_FILES)
-GIF_FILES =
-#------------------------------------------------------
-
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+NO_CHUNKS=$(XML_REF3_FILES)
+#------------------------------------------------------
JAVADOC = javadoc
JAVADOC_PKGS = com.ericsson.otp.erlang
@@ -86,75 +81,20 @@ JAVA_DOC_FILES = \
stylesheet.css \
help-doc.html
-INFO_FILE = ../../info
-JAVA_EXTRA_FILES = $(JAVA_DOC_FILES:%=$(HTMLDIR)/java/%)
-
JAVA_GEN_FILES = \
$(JAVA_FILES:%=$(JAVADOC_DEST)/$(JAVA_PKG_PATH)/%.html) \
$(JAVADOC_DEST)/$(JAVA_PKG_PATH)/package-summary.html \
$(JAVADOC_DEST)/$(JAVA_PKG_PATH)/package-tree.html \
$(JAVADOC_DEST)/$(JAVA_PKG_PATH)/package-frame.html
-
-# ----------------------------------------------------
-
-
-HTML_FILES = \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-TOP_HTML_FILES = $(INDEX_TARGET)
-
-INDEX_FILE = index.html
-INDEX_TARGET = $(DOCDIR)/$(INDEX_FILE)
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html jdoc man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
jdoc:$(JAVA_SRC_FILES)
(cd ../../java_src;$(JAVADOC) -sourcepath . -d $(JAVADOC_DEST) \
-windowtitle $(JAVADOC_TITLE) $(JAVADOC_PKGS))
touch jdoc
-man:
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR_DATA) $(HTMLDIR) "$(RELSYSDIR)/doc/html"
-
+docs: jdoc
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/kernel/doc/src/Makefile b/lib/kernel/doc/src/Makefile
index 40bac8bb3a..9b004b3781 100644
--- a/lib/kernel/doc/src/Makefile
+++ b/lib/kernel/doc/src/Makefile
@@ -28,11 +28,6 @@ VSN=$(KERNEL_VSN)
APPLICATION=kernel
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -98,86 +93,8 @@ XML_FILES = \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES)\
$(XML_REF6_FILES) $(XML_APPLICATION_FILES)
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN4_FILES = $(XML_REF4_FILES:%.xml=$(MAN4DIR)/%.4)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
-
TOP_SPECS_FILE = specs.xml
-
-# ----------------------------------------------------
-# FIGURES
-# ----------------------------------------------------
-# In order to update the figures you have to have both dia
-# and imagemagick installed.
-# The generated .png file must be committed.
-
-update_png:
- dia --export=logger_arch.eps logger_arch.dia
- convert logger_arch.eps -resize 65% logger_arch.png
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-SPECS_ESRC = ../../src
-
-SPECS_FLAGS = -I../../include
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%: %
- $(INSTALL_DATA) $< $@
-
-docs: man pdf html
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: images $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES) $(MAN4_FILES) $(MAN6_FILES)
-
-images: $(IMAGE_FILES:%=$(HTMLDIR)/%)
-
-info:
- @echo "XML_APPLICATION_FILES: $(XML_APPLICATION_FILES)"
- @echo "XML_REF3_ESOCK_FILES: $(XML_REF3_ESOCK_FILES)"
- @echo "XML_REF3_FILES: $(XML_REF3_FILES)"
- @echo "XML_REF4_FILES: $(XML_REF4_FILES)"
- @echo "XML_REF6_FILES: $(XML_REF6_FILES)"
- @echo "XML_PART_FILES: $(XML_PART_FILES)"
- @echo "XML_CHAPTER_FILES: $(XML_CHAPTER_FILES)"
- @echo "BOOK_FILES: $(BOOK_FILES)"
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(MAN4DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECDIR)/*
- rm -f errs core *~ *.eps
-
$(SPECDIR)/specs_erl_prim_loader_stub.xml:
$(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \
-o$(dir $@) -module erl_prim_loader_stub
@@ -191,24 +108,17 @@ $(SPECDIR)/specs_zlib_stub.xml:
$(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \
-o$(dir $@) -module zlib_stub
+NO_CHUNKS = erl_prim_loader_stub.xml erlang_stub.xml init_stub.xml zlib_stub.xml
# ----------------------------------------------------
-# Release Target
+# FIGURES
# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
+# In order to update the figures you have to have both dia
+# and imagemagick installed.
+# The generated .png file must be committed.
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man4"
- $(INSTALL_DATA) $(MAN4_FILES) "$(RELEASE_PATH)/man/man4"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
+update_png:
+ dia --export=logger_arch.eps logger_arch.dia
+ convert logger_arch.eps -resize 65% logger_arch.png
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/kernel/doc/src/code.xml b/lib/kernel/doc/src/code.xml
index 268eb5e839..45538d3239 100644
--- a/lib/kernel/doc/src/code.xml
+++ b/lib/kernel/doc/src/code.xml
@@ -705,6 +705,21 @@ ok = code:finish_loading(Prepared),
</desc>
</func>
<func>
+ <name name="all_available" arity="0" since="OTP @OTP-16494@"/>
+ <fsummary>Get all available modules.</fsummary>
+ <type name="loaded_filename"/>
+ <type name="loaded_ret_atoms"/>
+ <type_desc name="loaded_filename"><c><anno>Filename</anno></c> is an absolute
+ filename.</type_desc>
+ <desc>
+ <p>Returns a list of tuples <c>{<anno>Module</anno>, <anno>Filename</anno>,
+ <anno>Loaded</anno>}</c> for all available modules. A module is considered
+ to be available if it either is loaded or would be loaded if called.
+ <c><anno>Filename</anno></c> is normally the absolute filename, as described for
+ <seealso marker="#is_loaded/1"><c>is_loaded/1</c></seealso>.</p>
+ </desc>
+ </func>
+ <func>
<name name="all_loaded" arity="0" since=""/>
<fsummary>Get all loaded modules.</fsummary>
<type name="loaded_filename"/>
@@ -721,6 +736,7 @@ ok = code:finish_loading(Prepared),
<func>
<name name="which" arity="1" since=""/>
<fsummary>The object code file of a module.</fsummary>
+ <type name="loaded_filename"/>
<type name="loaded_ret_atoms"/>
<desc>
<p>If the module is not loaded, this function searches the code
@@ -753,6 +769,22 @@ rpc:call(Node, code, load_binary, [Module, Filename, Binary]),
</desc>
</func>
<func>
+ <name name="get_doc" arity="1" since="OTP @OTP-16406@"/>
+ <fsummary>Gets the documentation for a module.</fsummary>
+ <desc>
+ <p>Searches the code path for a documentation chunk
+ and returns ut if available. If no documentation chunk
+ can be found the function tries to generate documentation
+ from the debug information in the module. If no debug
+ information is available, this function will return
+ <c>{error,missing}</c>.
+ </p>
+ <p>For more information about the documentation chunk see
+ <seealso marker="erl_docgen:doc_storage">Documentation Storage</seealso>
+ in Erl_Docgen's User's Guide.</p>
+ </desc>
+ </func>
+ <func>
<name name="root_dir" arity="0" since=""/>
<fsummary>Root directory of Erlang/OTP.</fsummary>
<desc>
diff --git a/lib/kernel/doc/src/net.xml b/lib/kernel/doc/src/net.xml
index d60e1af311..d7732e714a 100644
--- a/lib/kernel/doc/src/net.xml
+++ b/lib/kernel/doc/src/net.xml
@@ -122,7 +122,7 @@
<funcs>
<func>
- <name name="gethostname" arity="0"/>
+ <name name="gethostname" arity="0" since="OTP 22.0"/>
<fsummary>Get hostname.</fsummary>
<desc>
<p>Returns the name of the current host.</p>
diff --git a/lib/kernel/include/eep48.hrl b/lib/kernel/include/eep48.hrl
new file mode 100644
index 0000000000..2ce9a1430a
--- /dev/null
+++ b/lib/kernel/include/eep48.hrl
@@ -0,0 +1,14 @@
+-define(NATIVE_FORMAT,<<"application/erlang+html">>).
+-define(CURR_DOC_VERSION, {1,0,0}).
+-record(docs_v1, {anno,
+ beam_language = erlang,
+ format = ?NATIVE_FORMAT,
+ module_doc,
+ metadata = #{ otp_doc_vsn => ?CURR_DOC_VERSION },
+ docs}).
+
+-record(docs_v1_entry, {kind_name_arity,
+ anno,
+ signature,
+ doc,
+ metadata}).
diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile
index fdd57f2b07..a5e24c9d67 100644
--- a/lib/kernel/src/Makefile
+++ b/lib/kernel/src/Makefile
@@ -149,7 +149,8 @@ MODULES = \
HRL_FILES= ../include/file.hrl ../include/inet.hrl ../include/inet_sctp.hrl \
../include/dist.hrl ../include/dist_util.hrl \
- ../include/net_address.hrl ../include/logger.hrl
+ ../include/net_address.hrl ../include/logger.hrl ../include/eep48.hrl
+
INTERNAL_HRL_FILES= application_master.hrl disk_log.hrl \
erl_epmd.hrl file_int.hrl hipe_ext_format.hrl \
diff --git a/lib/kernel/src/code.erl b/lib/kernel/src/code.erl
index e205d6450c..71a20231d4 100644
--- a/lib/kernel/src/code.erl
+++ b/lib/kernel/src/code.erl
@@ -20,6 +20,7 @@
-module(code).
-include_lib("kernel/include/logger.hrl").
+-include("eep48.hrl").
%% This is the interface module to the code server. It also contains
%% some implementation details. See also related modules: code_*.erl
@@ -44,6 +45,7 @@
soft_purge/1,
is_loaded/1,
all_loaded/0,
+ all_available/0,
stop/0,
root_dir/0,
lib_dir/0,
@@ -68,6 +70,7 @@
rehash/0,
start_link/0,
which/1,
+ get_doc/1,
where_is_file/1,
where_is_file/2,
set_primary_archive/4,
@@ -220,6 +223,53 @@ get_object_code(Mod) when is_atom(Mod) -> call({get_object_code, Mod}).
Loaded :: loaded_filename().
all_loaded() -> call(all_loaded).
+-spec all_available() -> [{Module, Filename, Loaded}] when
+ Module :: string(),
+ Filename :: loaded_filename(),
+ Loaded :: boolean().
+all_available() ->
+ case code:get_mode() of
+ interactive ->
+ all_available(get_path(), #{});
+ embedded ->
+ all_available([], #{})
+ end.
+all_available([Path|Tail], Acc) ->
+ case erl_prim_loader:list_dir(Path) of
+ {ok, Files} ->
+ all_available(Tail, all_available(Path, Files, Acc));
+ _Error ->
+ all_available(Tail, Acc)
+ end;
+all_available([], AllModules) ->
+ AllLoaded = [{atom_to_list(M),Path,true} || {M,Path} <- all_loaded()],
+ AllAvailable =
+ maps:fold(
+ fun(File, Path, Acc) ->
+ [{filename:rootname(File), filename:append(Path, File), false} | Acc]
+ end, [], AllModules),
+ OrderFun = fun F({A,_,_},{B,_,_}) ->
+ F(A,B);
+ F(A,B) ->
+ A =< B
+ end,
+ lists:umerge(OrderFun, lists:sort(OrderFun, AllLoaded), lists:sort(OrderFun, AllAvailable)).
+
+all_available(Path, [File | T], Acc) ->
+ case filename:extension(File) of
+ ".beam" ->
+ case maps:is_key(File, Acc) of
+ false ->
+ all_available(Path, T, Acc#{ File => Path });
+ true ->
+ all_available(Path, T, Acc)
+ end;
+ _Else ->
+ all_available(Path, T, Acc)
+ end;
+all_available(_Path, [], Acc) ->
+ Acc.
+
-spec stop() -> no_return().
stop() -> call(stop).
@@ -736,7 +786,7 @@ start_get_mode() ->
-spec which(Module) -> Which when
Module :: module(),
- Which :: file:filename() | loaded_ret_atoms() | non_existing.
+ Which :: loaded_filename() | non_existing.
which(Module) when is_atom(Module) ->
case is_loaded(Module) of
false ->
@@ -785,6 +835,94 @@ where_is_file(Tail, File, Path, Files) ->
where_is_file(Tail, File)
end.
+-spec get_doc(Mod) -> {ok, Res} | {error, Reason} when
+ Mod :: module(),
+ Res :: #docs_v1{},
+ Reason :: non_existing | missing | file:posix().
+get_doc(Mod) when is_atom(Mod) ->
+ case which(Mod) of
+ preloaded ->
+ Fn = filename:join([code:lib_dir(erts),"ebin",atom_to_list(Mod) ++ ".beam"]),
+ get_doc_chunk(Fn, Mod);
+ Error when is_atom(Error) ->
+ {error, Error};
+ Fn ->
+ get_doc_chunk(Fn, Mod)
+ end.
+
+get_doc_chunk(Filename, Mod) when is_atom(Mod) ->
+ case beam_lib:chunks(Filename, ["Docs"]) of
+ {error,beam_lib,{missing_chunk,_,_}} ->
+ case get_doc_chunk(Filename, atom_to_list(Mod)) of
+ {error,missing} ->
+ get_doc_chunk_from_ast(Filename);
+ Error ->
+ Error
+ end;
+ {error,beam_lib,{file_error,_Filename,enoent}} ->
+ get_doc_chunk(Filename, atom_to_list(Mod));
+ {ok, {Mod, [{"Docs",Bin}]}} ->
+ binary_to_term(Bin)
+ end;
+get_doc_chunk(Filename, Mod) ->
+ case filename:dirname(Filename) of
+ Filename ->
+ {error,missing};
+ Dir ->
+ ChunkFile = filename:join([Dir,"doc","chunks",Mod ++ ".chunk"]),
+ case file:read_file(ChunkFile) of
+ {ok, Bin} ->
+ {ok, binary_to_term(Bin)};
+ {error,enoent} ->
+ get_doc_chunk(Dir, Mod);
+ {error,Reason} ->
+ {error,Reason}
+ end
+ end.
+
+get_doc_chunk_from_ast(Filename) ->
+ case beam_lib:chunks(Filename, [abstract_code]) of
+ {error,beam_lib,{missing_chunk,_,_}} ->
+ {error,missing};
+ {ok, {_Mod, [{abstract_code,
+ {raw_abstract_v1, AST}}]}} ->
+ Docs = get_function_docs_from_ast(AST),
+ {ok, #docs_v1{ anno = 0, beam_language = erlang,
+ module_doc = none,
+ metadata = #{ generated => true, otp_doc_vsn => ?CURR_DOC_VERSION },
+ docs = Docs }};
+ {ok, {_Mod, [{abstract_code,no_abstract_code}]}} ->
+ {error,missing};
+ Error ->
+ Error
+ end.
+
+get_function_docs_from_ast(AST) ->
+ lists:flatmap(fun(E) -> get_function_docs_from_ast(E, AST) end, AST).
+get_function_docs_from_ast({function,Ln,Name,Arity,_Code}, AST) ->
+ Signature = io_lib:format("~p/~p",[Name,Arity]),
+ Anno = erl_anno:new(Ln),
+ Specs = lists:filter(fun({attribute,_Ln,spec,{FA,_}}) ->
+ case FA of
+ {F,A} ->
+ F =:= Name andalso A =:= Arity;
+ {_, F, A} ->
+ F =:= Name andalso A =:= Arity
+ end;
+ (_) -> false
+ end, AST),
+ SpecMd = case Specs of
+ [S] -> #{ spec => [S] };
+ [] -> #{}
+ end,
+ FnDocs = [],
+ Md = SpecMd#{},
+ [{{function, Name, Arity}, Anno, [unicode:characters_to_binary(Signature)],
+ #{ <<"en">> => FnDocs },
+ Md#{}}];
+get_function_docs_from_ast(_, _) ->
+ [].
+
-spec set_primary_archive(ArchiveFile :: file:filename(),
ArchiveBin :: binary(),
FileInfo :: file:file_info(),
@@ -806,7 +944,7 @@ set_primary_archive(ArchiveFile0, ArchiveBin, #file_info{} = FileInfo,
{error, _Reason} = Error ->
Error
end.
-
+
%% Search the entire path system looking for name clashes
-spec clash() -> 'ok'.
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index 5469d8694c..8ef54dd0e1 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -93,7 +93,7 @@ init(Ref, Parent, [Root,Mode]) ->
root = Root,
path = Path,
moddb = Db,
- namedb = init_namedb(Path),
+ namedb = create_namedb(Path, Root),
mode = Mode},
Parent ! {Ref,{ok,self()}},
@@ -265,8 +265,8 @@ handle_call({add_paths,Where,Dirs0}, _From,
{reply,Resp,S#state{path=Path}};
handle_call({set_path,PathList}, _From,
- #state{path=Path0,namedb=Namedb}=S) ->
- {Resp,Path,NewDb} = set_path(PathList, Path0, Namedb),
+ #state{root=Root,path=Path0,namedb=Namedb}=S) ->
+ {Resp,Path,NewDb} = set_path(PathList, Path0, Namedb, Root),
{reply,Resp,S#state{path=Path,namedb=NewDb}};
handle_call({del_path,Name}, _From,
@@ -755,12 +755,12 @@ update(Dir, NameDb) ->
%%
%% Set a completely new path.
%%
-set_path(NewPath0, OldPath, NameDb) ->
+set_path(NewPath0, OldPath, NameDb, Root) ->
NewPath = normalize(NewPath0),
case check_path(NewPath) of
{ok, NewPath2} ->
ets:delete(NameDb),
- NewDb = init_namedb(NewPath2),
+ NewDb = create_namedb(NewPath2, Root),
{true, NewPath2, NewDb};
Error ->
{Error, OldPath, NameDb}
@@ -788,11 +788,27 @@ normalize(Other) ->
%% Handle a table of name-directory pairs.
%% The priv_dir/1 and lib_dir/1 functions will have
%% an O(1) lookup.
-init_namedb(Path) ->
- Db = ets:new(code_names,[private]),
+create_namedb(Path, Root) ->
+ Db = ets:new(code_names,[named_table, public]),
init_namedb(lists:reverse(Path), Db),
+
+ case lookup_name("erts", Db) of
+ {ok, _, _, _} ->
+ %% erts is part of code path
+ ok;
+ false ->
+ %% No erts in code path, check if this is a source
+ %% repo and if so use that.
+ ErtsDir = filename:join(Root, "erts"),
+ case erl_prim_loader:read_file_info(ErtsDir) of
+ error ->
+ ok;
+ _ ->
+ do_insert_name("erts", ErtsDir, Db)
+ end
+ end,
Db.
-
+
init_namedb([P|Path], Db) ->
insert_dir(P, Db),
init_namedb(Path, Db);
@@ -997,7 +1013,6 @@ lookup_name(Name, Db) ->
_ -> false
end.
-
%%
%% Fetch a directory.
%%
diff --git a/lib/kernel/src/kernel.app.src b/lib/kernel/src/kernel.app.src
index 22326618bb..f7f6a3b497 100644
--- a/lib/kernel/src/kernel.app.src
+++ b/lib/kernel/src/kernel.app.src
@@ -149,7 +149,8 @@
pg2]},
{applications, []},
{env, [{logger_level, notice},
- {logger_sasl_compatible, false}
+ {logger_sasl_compatible, false},
+ {shell_docs_ansi,auto}
]},
{mod, {kernel, []}},
{runtime_dependencies, ["erts-@OTP-15251@", "stdlib-@OTP-15251@", "sasl-3.0"]}
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index 9e532be29f..ed1976d912 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -26,7 +26,7 @@
-export([set_path/1, get_path/1, add_path/1, add_paths/1, del_path/1,
replace_path/1, load_file/1, load_abs/1, ensure_loaded/1,
delete/1, purge/1, purge_many_exits/0, purge_many_exits/1,
- soft_purge/1, is_loaded/1, all_loaded/1,
+ soft_purge/1, is_loaded/1, all_loaded/1, all_available/1,
load_binary/1, dir_req/1, object_code/1, set_path_file/1,
upgrade/0, upgrade/1,
sticky_dir/1, pa_pz_option/1, add_del_path/1,
@@ -61,7 +61,7 @@ all() ->
[set_path, get_path, add_path, add_paths, del_path,
replace_path, load_file, load_abs, ensure_loaded,
delete, purge, purge_many_exits, soft_purge, is_loaded, all_loaded,
- load_binary, dir_req, object_code, set_path_file,
+ all_available, load_binary, dir_req, object_code, set_path_file,
upgrade,
sticky_dir, pa_pz_option, add_del_path, dir_disappeared,
ext_mod_dep, clash, where_is_file,
@@ -507,6 +507,47 @@ all_unique([]) -> ok;
all_unique([_]) -> ok;
all_unique([{X,_}|[{Y,_}|_]=T]) when X < Y -> all_unique(T).
+all_available(Config) when is_list(Config) ->
+ case test_server:is_cover() of
+ true -> {skip,"Cover is running"};
+ false -> all_available_1(Config)
+ end.
+
+all_available_1(Config) ->
+
+ %% Add an ez dir to make sure the modules in there are found
+ DDir = proplists:get_value(data_dir,Config)++"clash/",
+ true = code:add_path(DDir++"foobar-0.1.ez/foobar-0.1/ebin"),
+
+ Available = code:all_available(),
+
+ %% Test that baz and blarg that are part of the .ez archive are found
+ {value, _} =
+ lists:search(fun({Name,_,Loaded}) -> not Loaded andalso Name =:= "baz" end, Available),
+ {value, _} =
+ lists:search(fun({Name,_,Loaded}) -> not Loaded andalso Name =:= "blarg" end, Available),
+
+ %% Test that all loaded are part of all available
+ Loaded = [{atom_to_list(M),P,true} || {M,P} <- code:all_loaded()],
+ [] = Loaded -- Available,
+
+ {value, {ModStr,_Path,false} = NotLoaded} =
+ lists:search(fun({Name,_,Loaded}) -> not is_atom(Name) end, Available),
+ ct:log("Testing with ~p",[NotLoaded]),
+
+ Mod = list_to_atom(ModStr),
+
+ %% Test that the module is actually not loaded
+ false = code:is_loaded(Mod),
+
+ %% Load it
+ Mod:module_info(),
+
+ {value, {ModStr,_Path,true}} =
+ lists:search(fun({Name,_,_}) -> Name =:= ModStr end, code:all_available()),
+
+ ok.
+
load_binary(Config) when is_list(Config) ->
TestDir = test_dir(),
File = TestDir ++ "/code_b_test" ++ code:objfile_extension(),
diff --git a/lib/megaco/doc/src/Makefile b/lib/megaco/doc/src/Makefile
index 5e085b60b0..b8488b4a13 100644
--- a/lib/megaco/doc/src/Makefile
+++ b/lib/megaco/doc/src/Makefile
@@ -27,11 +27,6 @@ include ../../vsn.mk
VSN=$(MEGACO_VSN)
APPLICATION=megaco
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
# ----------------------------------------------------
# Target Specs
@@ -39,130 +34,23 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
include files.mk
-
# ----------------------------------------------------
XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
$(XML_PART_FILES) $(XML_CHAPTER_FILES)
-INTERNAL_HTML_FILES = $(TECHNICAL_DESCR_FILES:%.xml=$(HTMLDIR)/%.html)
-
-HTML_APP_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html)
-HTML_EXTRA_FILES = $(XML_EXTRA_FILES:%.xml=$(HTMLDIR)/%.html)
-HTML_PART_FILES = $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-HTML_FILES = $(HTML_APP_FILES) $(HTML_EXTRA_FILES) $(HTML_PART_FILES)
-
-INFO_FILE = ../../info
-
-HTML_REF3_FILES = $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html)
-HTML_CHAPTER_FILES = $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-EXTRA_FILES = \
- $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(HTML_REF3_FILES) \
- $(HTML_CHAPTER_FILES)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
STANDARD_DIR = ../standard
STANDARDS = $(STANDARD_DIR)/rfc3525.txt \
$(STANDARD_DIR)/rfc4234.txt \
$(STANDARD_DIR)/rfc4566.txt \
$(STANDARD_DIR)/implementors_guide_v10-13.pdf
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-$(HTMLDIR)/%.jpg: %.jpg
- $(INSTALL_DATA) $< $@
-
-$(HTMLDIR)/%.png: %.png
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-ldocs: local_docs
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: imgs $(HTML_REF_MAN_FILE)
-
-clean clean_docs: clean_html clean_man
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-clean_man:
- rm -f $(MAN3DIR)/*
-
-clean_html:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
-
-imgs: $(IMG_FILES:%=$(HTMLDIR)/%)
-
-man: $(MAN3_FILES)
-
-debug opt:
-
-info:
- @echo "->Makefile<-"
- @echo ""
- @echo "HTML_REF_MAN_FILE = $(HTML_REF_MAN_FILE)"
- @echo ""
- @echo "XML_APPLICATION_FILES = $(XML_APPLICATION_FILES)"
- @echo "XML_PART_FILES = $(XML_PART_FILES)"
- @echo "XML_REF3_FILES = $(XML_REF3_FILES)"
- @echo "XML_CHAPTER_FILES = $(XML_CHAPTER_FILES)"
- @echo ""
- @echo "IMG_FILES = $(IMG_FILES)"
- @echo ""
- @echo "MAN3_FILES = $(MAN3_FILES)"
- @echo ""
- @echo "HTML_FILES = $(HTML_FILES)"
- @echo "TOP_HTML_FILES = $(TOP_HTML_FILES)"
- @echo ""
- @echo "DEFAULT_HTML_FILES = $(DEFAULT_HTML_FILES)"
- @echo "DEFAULT_GIF_FILES = $(DEFAULT_GIF_FILES)"
- @echo ""
- @echo ""
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/standard"
- $(INSTALL_DATA) $(STANDARDS) "$(RELSYSDIR)/doc/standard"
+NO_CHUNKS = megaco_edist_compress.xml megaco_user.xml megaco_encoder.xml \
+ megaco_transport.xml megaco_tcp.xml megaco_udp.xml \
+ megaco_codec_meas.xml megaco_codec_mstone1.xml \
+ megaco_codec_mstone2.xml megaco_codec_transform.xml
-release_spec:
+include $(ERL_TOP)/make/doc.mk
$(HTMLDIR)/megaco_architecture.html: megaco_architecture.xml
$(HTMLDIR)/megaco_codec_meas.html: megaco_codec_meas.xml
diff --git a/lib/megaco/doc/src/definitions/term.defs.xml b/lib/megaco/doc/src/definitions/term.defs.xml
deleted file mode 100644
index 096720af84..0000000000
--- a/lib/megaco/doc/src/definitions/term.defs.xml
+++ /dev/null
@@ -1,1518 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE terms SYSTEM "terms.dtd">
-
-<terms>
- <term>
- <id>agent</id>
- <shortdef>agent</shortdef>
- <def>
-An entity that terminates a management protocol in the Network Element. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>API</id>
- <shortdef>API</shortdef>
- <def>
-Application Programming Interface. The interface towards an application. Usually this is a set of functions available, but can also be a set of messages sent to or from an application. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>application</id>
- <shortdef>application</shortdef>
- <def>
-A collection of resources which is required to offer a specific service. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>appmon</id>
- <shortdef>Application Monitor</shortdef>
- <def>
-A graphical node and application process tree viewer. See also appmon. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>Appmon</id>
- <shortdef>Appmon</shortdef>
- <def>
-Application name for the Application Monitor within Erlang/OTP. A graphical node and process viewer. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>app callback</id>
- <shortdef>application callback module</shortdef>
- <def>
-A module which is called when the application is started, and when it has stopped. Every application has one application callback module. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>AC</id>
- <shortdef>application controller</shortdef>
- <def>
-A process which coordinates all operations on applications. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>app master</id>
- <shortdef>application master</shortdef>
- <def>
-The application master is a process that monitors the application. It is provided by the Erlang run-time system. Every application has an application master process. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>.app file</id>
- <shortdef>application resource file</shortdef>
- <def>
-Specifies the resources required by the application and how the application should be started. Every application has one application resource file, called AppName.app. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>arity</id>
- <shortdef>arity</shortdef>
- <def>
-Denotes the number of arguments to a function. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>ASN.1</id>
- <shortdef>ASN.1</shortdef>
- <def>
-Abstract Syntax Notation One - an ITU-T and ISO standard notation for describing data formats used in communication protocols. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>ASN.1 Compiler</id>
- <shortdef>ASN.1 Compiler</shortdef>
- <def>
-The Erlang/OTP ASN.1 Compiler translates an ASN.1 module into a corresponding Erlang module with encode and decode functions. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>atom</id>
- <shortdef>atom</shortdef>
- <def>
-An atom is a constant. Atoms always starts with a lower case letter (a-z) and are terminated by a non-alphanumeric character - otherwise they must be quoted (enclosed in ' '). An atom is a data type in Erlang, used to enhance the legibility of programs. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>atomicity</id>
- <shortdef>atomicity</shortdef>
- <def>
-Atomicity refers to the "all or nothing" property. If a transaction succeeds (i.e. commits), then all its effects on the data is captured in the database. If the transaction does not succeed (i.e. aborts), then none of its effect on the data is captured in the database. In other words, the transaction processing algorithm guarantees that the database will not reflect a partitial effect of a transaction. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>attach</id>
- <shortdef>attach</shortdef>
- <def>
-The debugger may attach to a process. When attached, the debugger may show process details, such as message queues and variable bindings. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>behaviour</id>
- <shortdef>behaviour</shortdef>
- <def>
-A "pattern of design" which can be used to build applications and processes in an applications. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>BIF</id>
- <shortdef>BIF</shortdef>
- <def>
-Built-In Functions which perform operations that are impossible or inefficient to program in Erlang itself. Are defined in the module Erlang in the application kernel </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>binary</id>
- <shortdef>binary</shortdef>
- <def>
-A data type in Erlang which is used to store an area of untyped memory. Binaries are used for efficiently handling large quantities of untyped data. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>boolean</id>
- <shortdef>boolean</shortdef>
- <def>
-A common data type in programming and specification languages. The value can be either true or false. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>boot file</id>
- <shortdef>boot file</shortdef>
- <def>
-A binary file with extension .boot which is read during start of an Erlang node. See SASL User's Guide for more info. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>break point</id>
- <shortdef>break point</shortdef>
- <def>
-By setting a break point using the debugger, the user specifies a position in the source code of a module where execution is to be suspended and control transferred to the debugger. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>CAshort</id>
- <shortdef>CA</shortdef>
- <def>
-See Certification Authority. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>CA certificate</id>
- <shortdef>CA certificate</shortdef>
- <def>
-A certificate containing a CA's public key. Network entities use this public key to verify certificates signed with the CA's private key. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>callback function</id>
- <shortdef>callback function</shortdef>
- <def>
-A callback function is a function exported from a callback module, that a generic behaviour calls to perform a specific task. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>callback module</id>
- <shortdef>callback module</shortdef>
- <def>
-A callback module is a module that implements the specific parts of a generic behaviour. The generic behaviour specifies which callback functions must be exported from the module. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>certificate</id>
- <shortdef>certificate</shortdef>
- <def>
-A file used for authenticating network entities under the SSL protocol. A certificate contains information about its owner (called the subject) and issuer, plus the owner's public key and a signature made by a CA. Network entities verify these signatures using CA certificates. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>CAlong</id>
- <shortdef>Certification Authority (CA)</shortdef>
- <def>
-A trusted third party whose purpose is to sign certificates for network entities it has authenticated using secure means. Other network entities can check the signature to verify that a CA has authenticated the bearer of a certificate. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>CSRlong</id>
- <shortdef>Certificate Signing Request (CSR)</shortdef>
- <def>
-An unsigned certificate for submission to a Certification Authority, which signs it with its private key. Once the CSR is signed, it becomes a certificate. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>child</id>
- <shortdef>child</shortdef>
- <def>
-A supervised process. See also permanent, transient, temporary child. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>cipher</id>
- <shortdef>cipher</shortdef>
- <def>
-A system of encryption. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>ClearCase</id>
- <shortdef>ClearCase</shortdef>
- <def>
-A configuration management system from Rational Software Corporation. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>client-server model</id>
- <shortdef>client-server model</shortdef>
- <def>
-A model where there is a server, which manages some resource, and a number of clients which send requests to the server to access the resource. The client-server model is one of the basic programming techniques for coordinating the activities of several parallel processes. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>cover</id>
- <shortdef>Coverage Analyser</shortdef>
- <def>
-Module name for the coverage analyser tool, located in the Tools application. </def>
- <resp>gunilla</resp>
- </term>
- <term>
- <id>CORBAlong</id>
- <shortdef>Common Object Request Broker Architecture (CORBA)</shortdef>
- <def>
-A specification of an architecture for a distributed object system </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>CORBA</id>
- <shortdef>Common Object Request Broker Architecture (CORBA)</shortdef>
- <def>
-A specification of an architecture for a distributed object system </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>compiler</id>
- <shortdef>compiler</shortdef>
- <def>
-A compiler is a translator. A common type of compilers are those who takes source code for a programming language and translates it into code that is executable on a specific platform. E.g. the Erlang compiler translates Erlang source code to an intermediary code that is executable by the Erlang Run Time System. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>consistency</id>
- <shortdef>consistency</shortdef>
- <def>
-Consistency refers to the requirement that, given a consistent initial database state, the state of the database after the successful execution of a transaction is also consistent; that is, a transaction transforms the database from a consistent state to another consistent state. Database consistency may be defined as a set of rules or constraints. If the execution of a transaction causes the consistency constraints to be violated, the transaction is not accepted (and thus aborted) by the system. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>cookie</id>
- <shortdef>cookie</shortdef>
- <def>
-A magic cookie is a secret atom assigned to each Erlang node. The Erlang nodes in a distributed system must know each others cookies in order to authorize each other for communication </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>CORBAshort</id>
- <shortdef>CORBA</shortdef>
- <def>
-See Common Object RequestBroker Architecture. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>Coverage Analyser</id>
- <shortdef>Coverage Analyser</shortdef>
- <def>
-A tool which provides a set of functions for coverage analysis of Erlang programs, i.e observing how many times each line or function are executed. See also cover. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>coverage analysis</id>
- <shortdef>coverage analysis</shortdef>
- <def>
-The task of determining which lines, or how many lines of code, has actually been executed. Useful for determining the completeness of test suites. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>cross reference tool</id>
- <shortdef>cross reference tool</shortdef>
- <def>
-A tool that can be used for finding dependencies between functions, modules, applications and releases. The Erlang/OTP cross reference tool is called xref and is part of the Tools application. </def>
- <resp>gunilla</resp>
- </term>
- <term>
- <id>CSRshort</id>
- <shortdef>CSR</shortdef>
- <def>
-See Certificate Signing Request. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>data type</id>
- <shortdef>data type</shortdef>
- <def>
-The data types in Erlang are numbers, atoms, tuples, lists, pids, funs, records, ports, references and binaries. The values of Erlang data types can be stored in variables. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>DBMSlong</id>
- <shortdef>Database Management System (DBMS)</shortdef>
- <def>
-A database is a collection of data and a DBMS is a system which manages the database. Applications accesses the database through the database management system. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>DBMSshort</id>
- <shortdef>DBMS</shortdef>
- <def>
-See Database Management System. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>Debugger</id>
- <shortdef>Debugger</shortdef>
- <def>
-An Erlang/OTP tool which provides mechanisms which makes it possible to see what happens during the execution of code in specified modules, or when processes crash. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>dets</id>
- <shortdef>dets</shortdef>
- <def>
-A module within the stdlib application, which provides a term storage, and which is used as the underlying file storage mechanism by the Mnesia DBMS. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>dirty operations</id>
- <shortdef>dirty operations</shortdef>
- <def>
-Functions which manipulate data in a DBMS, without using transactions. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>distributed application</id>
- <shortdef>distributed application</shortdef>
- <def>
-An application which runs on one of several nodes. May be restarted on another node. (See local application.) </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>DNSshort</id>
- <shortdef>DNS</shortdef>
- <def>
-See Domain Name System. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>Docbuilder</id>
- <shortdef>Docbuilder</shortdef>
- <def>
-The documentation system used in Erlang/OTP. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>DNSlong</id>
- <shortdef>Domain Name System (DNS)</shortdef>
- <def>
-DNS is a service that map names to internet addresses </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>DTD</id>
- <shortdef>DTD</shortdef>
- <def>
-Document Type Definition as defined in SGML. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>durability</id>
- <shortdef>durability</shortdef>
- <def>
-If a transaction succeeds, then its effect on the data is persistently captured, and will survive subsequent system failures resulting in loss of data in volatile memory. Durability is usually enforced by first writing modified data to some non-volatile memory (usually disc), before a transaction is allowed to commit. If there is a system failure, the state of the non-volatile memory must be recovered to reflect the effect of all and only committed transactions. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>Emacs</id>
- <shortdef>Emacs</shortdef>
- <def>
-A widely used text editor which allows customization of its behaviour. An Erlang mode for Emacs is included in the Erlang deliverables. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Emacs for Erlang</id>
- <shortdef>Emacs for Erlang</shortdef>
- <def>
-A tool which provides a major mode for editing Erlang source files in Emacs. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>encaps</id>
- <shortdef>encapsulation</shortdef>
- <def>
-Data can be encapsulated into another data element. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>eprof</id>
- <shortdef>eprof</shortdef>
- <def>
-A module in the tools application. See Profiler. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>erl</id>
- <shortdef>erl</shortdef>
- <def>
-The command which starts an Erlang run-time system. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>erl_interface</id>
- <shortdef>erl_interface library</shortdef>
- <def>
-A thread safe library with C-functions which makes it possible to write a C-program which appears as one of the nodes in a system of distributed Erlang nodes. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Erlang</id>
- <shortdef>Erlang</shortdef>
- <def>
-Erlang is a functional programming language intended for designing large industrial soft real time systems. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Erlang emulator</id>
- <shortdef>Erlang emulator</shortdef>
- <def>
-Another word for Erlang Virtual Machine. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>ERTSlong</id>
- <shortdef>Erlang Run Time System</shortdef>
- <def>
-A fundamental part of Erlang/OTP which contains the Erlang Virtual Machine, the kernel and stdlib applications. The Erlang Run Time System is a mandatory part which all other Erlang applications are dependent upon. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Erlang VM</id>
- <shortdef>Erlang Virtual Machine</shortdef>
- <def>
-The virtual machine, which makes Erlang/OTP work together with a specific OS/HW platform. The Erlang Virtual Machine is available on several different platforms. The Erlang Virtual Machine is the glue which makes it possible to run an Erlang application on any platform without change. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>ERTSshort</id>
- <shortdef>ERTS</shortdef>
- <def>
-See Erlang Run Time System. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>ETS</id>
- <shortdef>ETS</shortdef>
- <def>
-Erlang Term Storage tables. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>EVAshort</id>
- <shortdef>EVA</shortdef>
- <def>
-See Event and Alarm handling application </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>EVAlong</id>
- <shortdef>Event and Alarm handling application (EVA)</shortdef>
- <def>
-An application that consists of Fault Management functionality, such as sending and logging of events and alarms. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>event handler</id>
- <shortdef>event handler</shortdef>
- <def>
-A module exporting functions which can process events sent to an event manager process. The event handler is a behaviour of type gen_event. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>event manager</id>
- <shortdef>event manager</shortdef>
- <def>
-A process to which events of a certain category is sent. gen_event handler can be installed in the event manager. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>exit signal</id>
- <shortdef>exit signal</shortdef>
- <def>
-A signal which is sent from a terminating process to the processes and ports it is linked to. An EXIT signal has the following format: {'EXIT', Exiting_Process_Id, Reason}. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>foo</id>
- <shortdef>foo</shortdef>
- <def>
-Algebraic place holder. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>FSM</id>
- <shortdef>FSM</shortdef>
- <def>
-Finite State Machine. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>fun</id>
- <shortdef>fun</shortdef>
- <def>
-A data type, introduced in Erlang 4.4, which represent functional objects. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>function</id>
- <shortdef>function</shortdef>
- <def>
-Erlang programs are written entirely in terms of modules with functions. A function can have arguments and does always return a result. A function can be exported which makes it available for calls from other modules. Non exported functions can only be called internally within the module. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Gateway</id>
- <shortdef>gateway</shortdef>
- <def>
-A server which acts as an intermediary for some other server. Unlike a proxy, a gateway receives requests as if it were the origin server for the requested resource; the requesting client may not be aware that it is communicating with a gateway. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>gen_event</id>
- <shortdef>gen_event</shortdef>
- <def>
-A behaviour used for programming event handling mechanisms, such as alarm handlers, error loggers, and plug-and-play handlers. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>gen_fsm</id>
- <shortdef>gen_fsm</shortdef>
- <def>
-A behaviour used for programming finite state machines. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>gen_server</id>
- <shortdef>gen_server</shortdef>
- <def>
-A behaviour used for programming client-server processes. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>gterm</id>
- <shortdef>Global Glossary Database</shortdef>
- <def>
-A glossary database used to list common acronymns and defintions etc. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>xref</id>
- <shortdef>xref</shortdef>
- <def>
-A cross reference tool that can be used for finding dependencies between functions, modules, applications and releases. Part of the Tools application. </def>
- <resp>gunilla</resp>
- </term>
- <term>
- <id>GSlong</id>
- <shortdef>Graphics System</shortdef>
- <def>
-A library module which provides a graphics interface for Erlang. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>grid</id>
- <shortdef>grid</shortdef>
- <def>
-A multi-column object which is used to display tables. (Graphics System.) </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>GSshort</id>
- <shortdef>GS</shortdef>
- <def>
-See Graphics System. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>GS Contributions</id>
- <shortdef>GS Contributions</shortdef>
- <def>
-Unsupported user supplied tools which are included with the Erlang/OTP software release. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>GUI</id>
- <shortdef>GUI</shortdef>
- <def>
-Graphical User Interface </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>Home Directory</id>
- <shortdef>Home Directory</shortdef>
- <def>
-The position of a user account in the file system. The Home Directory is automatically passed to the Erlang run-time system at startup. On Unix the contents of the environment variable "HOME" is passed. Om Win32 the concatenation of the environment variables "HOMEDRIVE" and "HOMEPATH" is passed, or if these variables are not set, the value returned by the Win32 API function "GetWindowsDirectory" is passed. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>host name</id>
- <shortdef>host name</shortdef>
- <def>
-The name of a machine on a network, e.g. erlang.ericsson.se. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>HTML</id>
- <shortdef>HTML</shortdef>
- <def>
-Hypertext Markup Language. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>HTTP</id>
- <shortdef>HTTP</shortdef>
- <def>
-Hypertext Transfer Protocol. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>HTTPS</id>
- <shortdef>HTTPS</shortdef>
- <def>
-The Hypertext Transport Protocol, Secure, the standard SSL communication mechanism of the World Wide Web. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>IDLshort</id>
- <shortdef>IDL</shortdef>
- <def>
-See Interface Description Language. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>IDLlong</id>
- <shortdef>Interface Description Language (IDL)</shortdef>
- <def>
-The interface specification language created by OMG. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>indexing</id>
- <shortdef>indexing</shortdef>
- <def>
-Fast lookup using an (usually enumerated) key. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>I1</id>
- <shortdef>INETS</shortdef>
- <def>
-The Internet Services application </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>initial call</id>
- <shortdef>initial call</shortdef>
- <def>
-The first call to an interpreted function (when using the Interpreter). </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>instrumentation function</id>
- <shortdef>instrumentation function</shortdef>
- <def>
-A function used to implement a Managed Object, i.e. give access to the real resources behind an MO. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>IDLlong</id>
- <shortdef>Interface Description Language (IDL)</shortdef>
- <def>
-The interface specification language created by OMG. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>interpreter</id>
- <shortdef>interpreter</shortdef>
- <def>
-An application which provides mechanisms which make it possible to see what happens during the execution of code in specified (interpreted) modules, or when processes crash. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>isolation</id>
- <shortdef>isolation</shortdef>
- <def>
-A transaction executes as if no other concurrent transactions are executing, and thus its execution results are equivalent to those obtained by executing database transactions serially. A system which maintains transaction isolation is also said to be enforcing serializability. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>kernel</id>
- <shortdef>kernel</shortdef>
- <def>
-An application which contains file servers, code servers and other code necessary for the Erlang run-time system. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>key</id>
- <shortdef>key</shortdef>
- <def>
-A file containing the value that must be fed into an algorithm in order to encrypt or decrypt a message. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>key pair</id>
- <shortdef>key pair</shortdef>
- <def>
-A set of two keys used in public key cryptography. One is the public key used to encrypt data, and the other is the private key necessary to decrypt the same data. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>list</id>
- <shortdef>list</shortdef>
- <def>
-Terms separated by commas and enclosed in square brackets [ ] are called lists. A list is a data type in Erlang, used for storing a variable number of terms. It is dynamically sized. The first element of the list is referred to as the head of the list, and the remainer of the list as the tail. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>list box</id>
- <shortdef>list box </shortdef>
- <def>
-A list of labels with optional scroll bars attached. (Graphics System.) </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>lc</id>
- <shortdef>list comprehension</shortdef>
- <def>
-A language construct in Erlang which are analogous to set comprehensions in Zermelo-Frankel set theory. Analogous to the 'setof' and 'findall' predicates in Prolog. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>local application</id>
- <shortdef>local application</shortdef>
- <def>
-An application which runs on one node and which are always started at the local node only. (See distributed application.) </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>manager</id>
- <shortdef>manager</shortdef>
- <def>
-An entity that terminates a management protocol in the Network Management Station. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>Master Agent</id>
- <shortdef>Master Agent</shortdef>
- <def>
-The SNMP agent system consists of one Master Agent which terminates the SNMP protocol </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>MIB</id>
- <shortdef>Management Information Base (MIB)</shortdef>
- <def>
-An abstract definition of the management information available through a management interface in a system. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>matching</id>
- <shortdef>matching</shortdef>
- <def>
-See pattern matching. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>message queue</id>
- <shortdef>message queue</shortdef>
- <def>
-The queue of not yet received messages that are in the mailbox of a process. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>Mnesia</id>
- <shortdef>Mnesia</shortdef>
- <def>
-Mnesia is a distributed Database Management System, appropriate for telecommunications applications and other applications with need of continuous operation and soft real-time properties. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>MIBshort</id>
- <shortdef>MIB</shortdef>
- <def>
-See Management Information Base. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>MIME</id>
- <shortdef>MIME</shortdef>
- <def>
-Multi-purpose Internet Mail Extensions. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>MOlong</id>
- <shortdef>Managed Object (MO)</shortdef>
- <def>
-The abstract management information defined in a MIB. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>MO</id>
- <shortdef>MO</shortdef>
- <def>
-Managed Object; The abstract management information defined in a MIB. </def>
- <resp>nibe</resp>
- </term>
- <term>
- <id>MOshort</id>
- <shortdef>MO</shortdef>
- <def>
-See Managed Object. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>module</id>
- <shortdef>module</shortdef>
- <def>
-Module is the unit for compilation and for loading in Erlang. A Module contains a module declaration, export declarations and code representing the functions in the module. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>NCSA</id>
- <shortdef>NCSA</shortdef>
- <def>
-The National Center for Supercomputing Applications. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>NEshort</id>
- <shortdef>NE</shortdef>
- <def>
-See Network Element. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>NElong</id>
- <shortdef>Network Element</shortdef>
- <def>
-In OTP, the Network Element is the entire distributed OTP system, meaning that the distributed OTP system is managed as one entity. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>NE</id>
- <shortdef>NE</shortdef>
- <def>
-Network Element; In OTP, the Network Element is the entire distributed OTP system, meaning that the distributed OTP system is managed as one entity. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>NMSlong</id>
- <shortdef>Network Management Station (NMS)</shortdef>
- <def>
-The place where the operator manages the network. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>NMS</id>
- <shortdef>NMS</shortdef>
- <def>
-Network Management Station; The place where the operator manages the network. </def>
- <resp>nibe</resp>
- </term>
- <term>
- <id>NMSshort</id>
- <shortdef>NMS</shortdef>
- <def>
-See Network Management Station. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>node</id>
- <shortdef>node</shortdef>
- <def>
-An executing Erlang run-time system which can communicate with other Erlang run-time systems. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>node name</id>
- <shortdef>node name</shortdef>
- <def>
-A node name is an atom constructed as the concatenation of a name supplied by the user, an "@" character, and the name of the host where the node is executing. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>notation</id>
- <shortdef>notation</shortdef>
- <def>
-How things are written. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>notification</id>
- <shortdef>notification</shortdef>
- <def>
-Information of an event. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>NROFF</id>
- <shortdef>NROFF</shortdef>
- <def>
-A text formatting language for line printer quality output devices that runs on the UNIX operating system. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>number</id>
- <shortdef>number</shortdef>
- <def>
-A data type in Erlang. Are subdivided into integers, for storing natural numbers, or floats, for storing real numbers. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>OMGlong</id>
- <shortdef>Object Managment Group (OMG)</shortdef>
- <def>
-A standardisation group for all specifications in the area of CORBA. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>OMGshort</id>
- <shortdef>OMG</shortdef>
- <def>
-Object Managment Group. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>OTP</id>
- <shortdef>OTP</shortdef>
- <def>
-Open Telecom Platform </def>
- <resp>mike</resp>
- </term>
- <term>
- <id>os_mon</id>
- <shortdef>os_mon</shortdef>
- <def>
-An application which monitors the behaviour of the underlying operating system </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>parser generator</id>
- <shortdef>parser generator</shortdef>
- <def>
-A tool for making compilers which takes a grammar description as input and generates a complete program (a parser) which recognizes input which complies with the grammar. YECC is a parser generator included in the Erlang/OTP. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>pass phrase</id>
- <shortdef>pass phrase</shortdef>
- <def>
-The word or phrase which authenticates the user who is authorized to use private key file. The pass phrase prevents unauthorized users from starting, restarting, or reconfiguring the server. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>pattern matching</id>
- <shortdef>pattern matching</shortdef>
- <def>
-A basic mechanism in Erlang for assigning values to variables and for controlling the flow of a program. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>permanent child</id>
- <shortdef>permanent child</shortdef>
- <def>
-A supervised process which always is restarted when it dies. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>Pid</id>
- <shortdef>Pid</shortdef>
- <def>
-Process Identifier. A data type in Erlang for storing process references. The process identity of the process displayed in the line. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Pman</id>
- <shortdef>Pman</shortdef>
- <def>
-Module and application name for the Process Trace Tool. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>point</id>
- <shortdef>point</shortdef>
- <def>
-A unit used to indicate the size of a typeface. Equal to 1/72 inches. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>pointer</id>
- <shortdef>pointer</shortdef>
- <def>
-A pointer tells where data is stored. Memory pointers are not used in Erlang. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>port</id>
- <shortdef>port</shortdef>
- <def>
-A data type in Erlang. Ports provide the basic mechanism for communication with the external world. </def>
- <resp>peterl</resp>
- </term>
- <term>
- <id>port controller</id>
- <shortdef>port controller</shortdef>
- <def>
-An Erlang process which controls a port program. A port has exactly one port controller. </def>
- <resp>peterl</resp>
- </term>
- <term>
- <id>port program</id>
- <shortdef>port program</shortdef>
- <def>
-A program that runs as an external program in the operating system and which the Erlang run-time system can start and communicate with by means of the Erlang port mechanism. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>PostScript</id>
- <shortdef>PostScript</shortdef>
- <def>
-A language describing a fully laid-out page in terms of fonts, lines, grey scales, and so on, in a way that is interpretable by a printer. The language was developed by Adobe Systems. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>pretty-printed</id>
- <shortdef>pretty-printed</shortdef>
- <def>
-Nicely formatted code or data, e.g. C or Erlang, with indents and tabs etc. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>primitive</id>
- <shortdef>primitive</shortdef>
- <def>
-The basic elements in a programming language. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>private key</id>
- <shortdef>private key</shortdef>
- <def>
-The secret key in a pair, used to decrypt incoming messages and sign outgoing ones. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>process</id>
- <shortdef>process</shortdef>
- <def>
-A process is a self-contained separate unit of execution which exists concurrently with other processes in the system. The BIF "spawn/3" creates and starts the execution of a new process. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>process dictionary</id>
- <shortdef>process dictionary</shortdef>
- <def>
-Each process has an associated dictionary which provides the process with simple destructive storage capabilities. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Process Manager</id>
- <shortdef>Process Manager</shortdef>
- <def>
-Obsolete name for the Process Trace Tool. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>Process Trace Tool</id>
- <shortdef>Process Trace Tool</shortdef>
- <def>
-A tool which gives an overview of the processes in the Erlang run-time system. See also Pman. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>Profiler</id>
- <shortdef>Profiler</shortdef>
- <def>
-Another name for eprof, a tool used to profile a system in order to find out how much time is spent in various segments of a program. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>program</id>
- <shortdef>program</shortdef>
- <def>
-Routines which can be executed by a computer. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>Proxy</id>
- <shortdef>proxy</shortdef>
- <def>
-An intermediary program which acts as both a server and a client for the purpose of making requests on behalf of other clients. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>public key</id>
- <shortdef>public key</shortdef>
- <def>
-The publicly available key in a key pair, used to encrypt messages bound for its owner and to decrypt signatures made by its owner. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>query</id>
- <shortdef>query</shortdef>
- <def>
-Queries are used for accessing the data in a Database Management System. The query specify a maybe complicated relation that should hold for all of the selected data. This could involve several tables as well as conditions like for instance less then and greater then. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>query language</id>
- <shortdef>query language</shortdef>
- <def>
-A language which is specially designed to express database queries. Examples of query languages are QLC and SQL. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>receive</id>
- <shortdef>receive</shortdef>
- <def>
-A primitive for message processing in Erlang, receives a message from a process. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>record</id>
- <shortdef>record</shortdef>
- <def>
-A data structure intended for storing a fixed number of related Erlang terms, it is similar to a "struct" in C or a "record" in Pascal. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>recursion</id>
- <shortdef>recursion</shortdef>
- <def>
-A function is recursive if it calls itself until the result desired is attained. Recursion is the heart of functional programming. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>reference</id>
- <shortdef>reference</shortdef>
- <def>
-A data type in Erlang for storing system unique references. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>release handler</id>
- <shortdef>release handler</shortdef>
- <def>
-A SASL process which handles software upgrade. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>relup</id>
- <shortdef>release upgrade script</shortdef>
- <def>
-A script with instructions to the release handler of how the release should be installed in the system. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>RPC</id>
- <shortdef>Remote Proceedure Call</shortdef>
- <def>
-A technique for evaluating a function transparently on a remote node. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>resource</id>
- <shortdef>resource</shortdef>
- <def>
-The actual resource to be managed. A resource is represented by a Managed Object. Each resource is mapped to one or several resources. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>resources</id>
- <shortdef>resources</shortdef>
- <def>
-The actual resources to be managed. A resource is represented by a Managed Object. Each resource is mapped to one or several resources. </def>
- <resp>nibe</resp>
- </term>
- <term>
- <id>RFC</id>
- <shortdef>RFC</shortdef>
- <def>
-A "Request for Comments" used as a proposed standard by IETF. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>SASLshort</id>
- <shortdef>SASL</shortdef>
- <def>
-See System Architecture Support Libraries. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>schema</id>
- <shortdef>schema</shortdef>
- <def>
-The schema contains the definitions and whereabouts for all tables. In Mnesia it is realized as a special table named "schema". </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>schema functions</id>
- <shortdef>schema functions</shortdef>
- <def>
-The functions which are available for managing schemas. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>SDL</id>
- <shortdef>SDL</shortdef>
- <def>
-Specification and Description Language. A ITU-T standard specification language which is used to specify the behaviour of switching systems. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>send</id>
- <shortdef>send</shortdef>
- <def>
-A primitive for message processing in Erlang, sends a message to a process. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>shell</id>
- <shortdef>shell</shortdef>
- <def>
-The shell is an interactive front-end to an Erlang node where Erlang expressions can be evaluated. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>shell prompt</id>
- <shortdef>shell prompt</shortdef>
- <def>
-The text or symbol shown on the screen when the shell is ready to receive commands. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>SNMPEAlong</id>
- <shortdef>Simple Network Management Protocol Extensible Agent (SNMPEA).</shortdef>
- <def>
-An Erlang/OTP application that includes a bilingual extensible SNMP agent. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>single assignment</id>
- <shortdef>single assignment</shortdef>
- <def>
-Means that once a variable has been assigned a value, the value can never be changed. Erlang is a single assignment language. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>single step</id>
- <shortdef>single step</shortdef>
- <def>
-Single stepping is a function provided by the debugger. By single stepping the developer may use the debugger to follow the execution of a process and see what actually happens at each function call. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>slave</id>
- <shortdef>slave</shortdef>
- <def>
-Not in control, can never take over by himself. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>SSLlong</id>
- <shortdef>Secure Sockets Layer (SSL)</shortdef>
- <def>
-A protocol created by Netscape Communications Corporation for authentication and encryption over TCP/IP networks, including Web. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>signature</id>
- <shortdef>signature</shortdef>
- <def>
-An encrypted text block that validates a certificate or other file. A Certification Authority (CA) creates a signature by generating a hash of the public key embedded in a certificate, then encrypting the hash with its own private key. Only the CA's public key can decrypt the signature, verifying that the CA has authenticated the network entity that owns the certificate. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>SNMPshort</id>
- <shortdef>SNMP</shortdef>
- <def>
-Simple Network Management Protocol. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>SNMPshort</id>
- <shortdef>SNMPEA</shortdef>
- <def>
-See Simple Network Management Protocol Extensible Agent. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>spawn</id>
- <shortdef>spawn</shortdef>
- <def>
-A primitive for multiprocessing in Erlang, that starts a parallel computation (called a process). The creation of a new process </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>SSLshort</id>
- <shortdef>SSL</shortdef>
- <def>
-See Secure Sockets Layer. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>SSLeay</id>
- <shortdef>SSLeay</shortdef>
- <def>
-An SSL library developed by Eric Yong (eay@mincom.oz.au). </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>SSLTOP</id>
- <shortdef>SSLTOP</shortdef>
- <def>
-The path to your SSL directory, a subdirectory of ServerRoot. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>start script</id>
- <shortdef>start script</shortdef>
- <def>
-A start script is a file with .script extension which is the source when a boot file is created. See SASL User's Guide for more info. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>stdlib</id>
- <shortdef>stdlib</shortdef>
- <def>
-An application within Erlang/OTP which contains modules for manipulating lists, strings, files, etc. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>sticky directory</id>
- <shortdef>sticky directory</shortdef>
- <def>
-A directory containing Erlang object code that is part of the runtime system. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>sticky lock</id>
- <shortdef>sticky lock</shortdef>
- <def>
-A lock which lingers at a node after the transaction which first acquired the lock has terminated. Once a process has obtained a sticky lock on a node, subsequent locks acquired by processes on the same node, can be set without need of involving remote nodes. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>string</id>
- <shortdef>string</shortdef>
- <def>
-The ASCII or ISO-8859-1 representation of the list of characters occurring within quotation marks in Erlang code. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>Subagent</id>
- <shortdef>Subagent</shortdef>
- <def>
-The SNMP agent system consists of one Master Agent (See Master Agent) and zero or more Subagents which can be used to distribute the SNMP agent system on several nodes. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>supervision tree</id>
- <shortdef>supervision tree</shortdef>
- <def>
-A hierarcial tree of processes used to program fault tolerant systems. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>supervisor</id>
- <shortdef>supervisor</shortdef>
- <def>
-A behaviour to stucture fault tolerant computations, and program supervision trees with. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>sup_bridge</id>
- <shortdef>supervisor bridge</shortdef>
- <def>
-A behaviour used to connect a process, or subsystem, to a supervisor tree. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>SASLlong</id>
- <shortdef>System Architecture Support Libraries (SASL)</shortdef>
- <def>
-An Erlang/OTP application which contains services for error logging, release handling and report browsing. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>.config</id>
- <shortdef>system configuration file</shortdef>
- <def>
-A file which specifies configuration parameters for the applications in the system. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>table lock</id>
- <shortdef>table lock</shortdef>
- <def>
-Table locks are locks which are set on whole tables. They may either be read locks or write locks. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>Table Visualizer</id>
- <shortdef>Table Visualizer</shortdef>
- <def>
-A tool which enables the user to examine ETS and Mnesia tables. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>temporary child</id>
- <shortdef>temporary child</shortdef>
- <def>
-A supervised process which is never restarted when it dies. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>term</id>
- <shortdef>term</shortdef>
- <def>
-The super type of all Erlang types. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Toolbar</id>
- <shortdef>Toolbar</shortdef>
- <def>
-A tool that provides an simplistic interface to the other various Erlang/OTP tools </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>tools</id>
- <shortdef>tools</shortdef>
- <def>
-An application within Erlang/OTP which contains the tools which are not applications themselves. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>transaction</id>
- <shortdef>transaction</shortdef>
- <def>
-Transactions groups a set of database accesses into an atomic unit. All transactions has the ACID (atomicity, concistency, isolation and durability) properties. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>transient child</id>
- <shortdef>transient child</shortdef>
- <def>
-A supervised process which is restarted if it dies non-normally. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>trigger</id>
- <shortdef>trigger</shortdef>
- <def>
-The Interpreter. A break point that is reached by a process triggers if it is active, and the execution of the process is stopped. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>tty</id>
- <shortdef>tty</shortdef>
- <def>
-tty is a simple command line interface program where keystrokes are collected and interpreted. Originally meant teletypewriter equipment. Now it usually means the user console/terminal/shell window. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>tuple</id>
- <shortdef>tuple</shortdef>
- <def>
-A tuple is a data type in Erlang. Tuples are used as place holders for complex data structures. Tuples may contain anything of any size, and are written as sequences of terms separated by commas, and enclosed in curly brackets { }. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>variable</id>
- <shortdef>variable</shortdef>
- <def>
-An alias for a memory position, in which a value can be put. Erlang variables always start with an upper case letter. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>workers</id>
- <shortdef>workers</shortdef>
- <def>
-The lower nodes in a supervision tree. These are the processes that actually performs some real work, e.g. servers. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>YECC</id>
- <shortdef>YECC</shortdef>
- <def>
-A LALR-1 parser generator included in Erlang/OTP. It is written in Erlang and generates a parser as an Erlang module. </def>
- <resp>kenneth</resp>
- </term>
-</terms>
-
diff --git a/lib/megaco/doc/src/files.mk b/lib/megaco/doc/src/files.mk
index e40889c3fb..6b7eaab531 100644
--- a/lib/megaco/doc/src/files.mk
+++ b/lib/megaco/doc/src/files.mk
@@ -55,7 +55,7 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
-IMG_FILES = \
+IMAGE_FILES = \
single_node_config.gif \
distr_node_config.gif \
megaco_sys_arch.gif \
diff --git a/lib/megaco/doc/src/megaco.xml b/lib/megaco/doc/src/megaco.xml
index c7bcdfcd6f..f5daa4dfce 100644
--- a/lib/megaco/doc/src/megaco.xml
+++ b/lib/megaco/doc/src/megaco.xml
@@ -1969,23 +1969,6 @@ megaco_incr_timer() = #megaco_incr_timer{}
</func>
<func>
- <name since="">get_sdp_record_from_PropertGroup(Type, PG) -> [sdp()]</name>
- <fsummary>Get all sdp records of a certain type from a property group</fsummary>
- <type>
- <v>Type = v | c | m | o | a | b | t | r | z | k | s | i | u | e | p</v>
- <v>PG = sdp_property_group()</v>
- <v>Reason = term()</v>
- </type>
- <desc>
- <p>Retreive all the sdp records of type <c>Type</c> from the
- property group <c>PG</c>.</p>
-
- <marker id="versions1"></marker>
- <marker id="versions2"></marker>
- </desc>
- </func>
-
- <func>
<name since="">versions1() -> {ok, VersionInfo} | {error, Reason}</name>
<name since="">versions2() -> {ok, Info} | {error, Reason}</name>
<fsummary>Retreive various system and application info</fsummary>
diff --git a/lib/mnesia/doc/misc/Makefile b/lib/mnesia/doc/misc/Makefile
index 29e2682967..0622a0b809 100644
--- a/lib/mnesia/doc/misc/Makefile
+++ b/lib/mnesia/doc/misc/Makefile
@@ -39,7 +39,7 @@ TEX_FILES= $(SGML_FILES:.sgml=.tex)
DVI_FILES= $(SGML_FILES:.sgml=.dvi)
PSFIG_FILES= $(FIG_FILES:.fig=.ps)
PS_FILES= $(SGML_FILES:.sgml=.ps)
-GIF_FILES= min_head.gif
+GIF_FILES=
ERL_FILES=
HRL_FILES=
DATA_FILES=
diff --git a/lib/mnesia/doc/src/Makefile b/lib/mnesia/doc/src/Makefile
index d9647fc081..f14fd33c7a 100644
--- a/lib/mnesia/doc/src/Makefile
+++ b/lib/mnesia/doc/src/Makefile
@@ -30,11 +30,6 @@ VSN=$(MNESIA_VSN)
APPLICATION=mnesia
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -70,81 +65,9 @@ XML_FILES = \
XML_GEN_FILES = $(XML_CHAPTER_GEN_FILES:%=$(XMLDIR)/%)
-GIF_FILES = \
+IMAGE_FILES = \
company.gif
-XML_HTML_FILES = \
- notes_history.xml
-
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_HTML_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-EXTRA_FILES = \
- $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-$(INDEX_TARGET): $(INDEX_SRC) ../../vsn.mk
- sed -e 's;%VSN%;$(VSN);' $< > $@
-
-debug opt:
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3_FILES) "$(RELEASE_PATH)/man/man3"
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc b/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc
index b8d86adbf1..b646393ce3 100644
--- a/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc
+++ b/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc
@@ -750,7 +750,7 @@ mnesia:all_keys/1</seealso>.
that can overload <c>Mnesia</c> on other nodes.</item>
</list>
<p>By passing the same "fun" as argument to the function
- <seealso marker="mnesia#async_dirty/2">mnesia:async_dirty(Fun [, Args])</seealso>,
+ <seealso marker="mnesia#async_dirty/1">mnesia:async_dirty(Fun [, Args])</seealso>,
it is performed in dirty context. The function calls are mapped to
the corresponding dirty functions. This still involves logging,
replication, and subscriptions but no locking,
@@ -761,9 +761,9 @@ mnesia:all_keys/1</seealso>.
node but not the others. If the table resides locally, no waiting
occurs.</p>
<p>By passing the same "fun" as an argument to the function
- <seealso marker="mnesia#sync_dirty/2">mnesia:sync_dirty(Fun [, Args])</seealso>,
+ <seealso marker="mnesia#sync_dirty/1">mnesia:sync_dirty(Fun [, Args])</seealso>,
it is performed in almost the same context as the function
- <seealso marker="mnesia#async_dirty/2">mnesia:async_dirty/1,2</seealso>.
+ <seealso marker="mnesia#async_dirty/1">mnesia:async_dirty/1,2</seealso>.
The difference is that the operations are performed
synchronously. The caller waits for the updates to be
performed on all active replicas. Using <c>mnesia:sync_dirty/1,2</c>
@@ -788,7 +788,7 @@ mnesia:all_keys/1</seealso>.
recommended if all options have been weighed and the possible
outcomes are understood. By passing the earlier mentioned "fun"
to the function
- <seealso marker="mnesia#ets/2">mnesia:ets(Fun [, Args])</seealso>,
+ <seealso marker="mnesia#ets/1">mnesia:ets(Fun [, Args])</seealso>,
it is performed but in a raw
context. The operations are performed directly on the
local <c>ets</c> tables, assuming that the local storage type is
diff --git a/lib/mnesia/doc/src/mnesia.xml b/lib/mnesia/doc/src/mnesia.xml
index 74621982d7..d05693cf8d 100644
--- a/lib/mnesia/doc/src/mnesia.xml
+++ b/lib/mnesia/doc/src/mnesia.xml
@@ -453,7 +453,7 @@ mnesia:add_table_index(person, age)</code>
</desc>
</func>
<func>
- <name since="">async_dirty(Fun, [, Args]) -> ResultOfFun | exit(Reason)</name>
+ <name since="">async_dirty(Fun [, Args]) -> ResultOfFun | exit(Reason)</name>
<fsummary>Calls the <c>Fun</c> in a context that is not protected by a transaction.</fsummary>
<desc>
<marker id="async_dirty"></marker>
@@ -1259,7 +1259,7 @@ mnesia:create_table(person,
</desc>
</func>
<func>
- <name since="">ets(Fun, [, Args]) -> ResultOfFun | exit(Reason)</name>
+ <name since="">ets(Fun [, Args]) -> ResultOfFun | exit(Reason)</name>
<fsummary>Calls the <c>Fun</c> in a raw context that is not protected by a transaction.</fsummary>
<desc>
<marker id="ets"></marker>
@@ -2134,7 +2134,7 @@ mnesia:create_table(employee,
</desc>
</func>
<func>
- <name since="">sync_dirty(Fun, [, Args]) -> ResultOfFun | exit(Reason)</name>
+ <name since="">sync_dirty(Fun [, Args]) -> ResultOfFun | exit(Reason)</name>
<fsummary>Calls the <c>Fun</c> in a context that is not protected by a transaction.</fsummary>
<desc>
<marker id="sync_dirty"></marker>
diff --git a/lib/observer/doc/src/Makefile b/lib/observer/doc/src/Makefile
index e843772f0b..459aeeea0b 100644
--- a/lib/observer/doc/src/Makefile
+++ b/lib/observer/doc/src/Makefile
@@ -27,16 +27,11 @@ VSN=$(OBSERVER_VSN)
APPLICATION=observer
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
XML_REF1_FILES = \
- cdv.xml
+ cdv_cmd.xml
XML_REF3_FILES = \
crashdump.xml \
observer.xml \
@@ -57,91 +52,16 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
-
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES) $(XML_REF1_FILES) $(XML_REF3_FILES) \
$(XML_APPLICATION_FILES) $(XML_REF6_FILES)
-ONLY_HTML_FILE =
-
-GIF_FILES = \
+IMAGE_FILES = \
et_processes.gif \
et_modsprocs.gif
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1)
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
+NO_CHUNKS = crashdump.xml
# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE) $(ONLY_HTML_FILE:%=$(HTMLDIR)/%)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN1DIR)/*
- rm -f $(MAN3DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-
-$(HTMLDIR)/$(ONLY_HTML_FILE):
- $(INSTALL_DATA) $(ONLY_HTML_FILE) $@
-
-man: $(MAN1_FILES) $(MAN3_FILES) $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DATA) $(MAN1DIR)/* "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
-
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/observer/doc/src/cdv.xml b/lib/observer/doc/src/cdv_cmd.xml
index df1032780a..32f8f392cd 100644
--- a/lib/observer/doc/src/cdv.xml
+++ b/lib/observer/doc/src/cdv_cmd.xml
@@ -11,7 +11,7 @@
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
diff --git a/lib/observer/doc/src/ref_man.xml b/lib/observer/doc/src/ref_man.xml
index 73e7e0053a..8ba920ecfb 100644
--- a/lib/observer/doc/src/ref_man.xml
+++ b/lib/observer/doc/src/ref_man.xml
@@ -36,6 +36,6 @@
<xi:include href="ttb.xml"/>
<xi:include href="etop.xml"/>
<xi:include href="crashdump.xml"/>
- <xi:include href="cdv.xml"/>
+ <xi:include href="cdv_cmd.xml"/>
</application>
diff --git a/lib/observer/doc/src/ttb.xml b/lib/observer/doc/src/ttb.xml
index fee95e0b21..ae5cc10b6e 100644
--- a/lib/observer/doc/src/ttb.xml
+++ b/lib/observer/doc/src/ttb.xml
@@ -277,8 +277,21 @@ ttb:p(all, call).</input></pre>
</func>
<func>
- <name since="">tp, tpl, ctp, ctpl, ctpg</name>
- <name since="OTP 19.0">tpe, ctpe</name>
+ <name since="">tp(Module [, Function [, Arity]], MatchSpec)</name>
+ <name since="">tp({Module, Function , Arity}, MatchSpec)</name>
+ <name since="">tpl(Module [, Function [, Arity]], MatchSpec)</name>
+ <name since="">tpl({Module, Function , Arity}, MatchSpec)</name>
+ <name since="">ctp()</name>
+ <name since="">ctp(Module [, Function [, Arity]])</name>
+ <name since="">ctp({Module, Function, Arity})</name>
+ <name since="">ctpl()</name>
+ <name since="">ctpl(Module [, Function [, Arity]])</name>
+ <name since="">ctpl({Module, Function, Arity})</name>
+ <name since="">ctpg()</name>
+ <name since="">ctpg(Module [, Function [, Arity]])</name>
+ <name since="">ctpg({Module, Function, Arity})</name>
+ <name since="OTP 19.0">tpe(Event,MatchSpec)</name>
+ <name since="OTP 19.0">ctpe(Event)</name>
<fsummary>Set and clear trace patterns.</fsummary>
<desc>
<p>These functions are to be used with trace
diff --git a/lib/observer/doc/src/ttb_ug.xml b/lib/observer/doc/src/ttb_ug.xml
index 34591ae8de..bc44b60bf4 100644
--- a/lib/observer/doc/src/ttb_ug.xml
+++ b/lib/observer/doc/src/ttb_ug.xml
@@ -88,8 +88,8 @@
<item><p>If you want to trace function calls (that is, if you have
trace flag <c>call</c> set on any process), you must
also set trace patterns on the required function(s) with
- <seealso marker="ttb#/0"><c>ttb:tp/2,3,4</c></seealso> or
- <seealso marker="ttb#/0"><c>ttb:tpl/2,3,4</c></seealso>.
+ <seealso marker="ttb#tp/2"><c>ttb:tp/2,3,4</c></seealso> or
+ <seealso marker="ttb#tpl/2"><c>ttb:tpl/2,3,4</c></seealso>.
A function is only traced
if it has a trace pattern. The trace pattern specifies how to trace the
function by using match specifications. Match specifications are
diff --git a/lib/odbc/doc/src/Makefile b/lib/odbc/doc/src/Makefile
index a6311ceede..b66341f9eb 100644
--- a/lib/odbc/doc/src/Makefile
+++ b/lib/odbc/doc/src/Makefile
@@ -30,11 +30,6 @@ VSN=$(ODBC_VSN)
APPLICATION=odbc
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -57,75 +52,8 @@ BOOK_FILES = book.xml
XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
$(XML_PART_FILES) $(XML_CHAPTER_FILES)
-GIF_FILES = \
+IMAGE_FILES = \
odbc_app_arc.gif
# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_HTML_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html) \
-
-INFO_FILE = ../../info
-EXTRA_FILES = $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-
-$(HTMLDIR)/%.gif: %.gif # Copy them to ../html
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%) # We depend just to copy them to ../html
-
-debug opt:
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/os_mon/doc/src/Makefile b/lib/os_mon/doc/src/Makefile
index 8e9a4c333c..d16f2b4831 100644
--- a/lib/os_mon/doc/src/Makefile
+++ b/lib/os_mon/doc/src/Makefile
@@ -28,11 +28,6 @@ VSN=$(OS_MON_VSN)
APPLICATION=os_mon
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -49,7 +44,7 @@ XML_CHAPTER_FILES = notes.xml
BOOK_FILES = book.xml
-GIF_FILES =
+IMAGE_FILES =
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
@@ -57,66 +52,4 @@ XML_FILES = \
# ----------------------------------------------------
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES) $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6DIR)/* "$(RELEASE_PATH)/man/man6"
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/parsetools/doc/src/Makefile b/lib/parsetools/doc/src/Makefile
index 2e8b232902..a4d7d4381b 100644
--- a/lib/parsetools/doc/src/Makefile
+++ b/lib/parsetools/doc/src/Makefile
@@ -29,11 +29,6 @@ VSN=$(PARSETOOLS_VSN)
APPLICATION=parsetools
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -48,72 +43,10 @@ XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-GIF_FILES =
+IMAGE_FILES =
XML_HTML_FILES = \
notes_history.xml
# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_HTML_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/parsetools/doc/src/leex.xml b/lib/parsetools/doc/src/leex.xml
index 3944c650d8..59a6c87586 100644
--- a/lib/parsetools/doc/src/leex.xml
+++ b/lib/parsetools/doc/src/leex.xml
@@ -146,8 +146,8 @@ Token = tuple()</code>
<funcs>
<func>
- <name since="">string(String) -> StringRet</name>
- <name since="">string(String, StartLine) -> StringRet</name>
+ <name since="">Module:string(String) -> StringRet</name>
+ <name since="">Module:string(String, StartLine) -> StringRet</name>
<fsummary>Generated by Leex</fsummary>
<type>
<v>String = string()</v>
@@ -164,9 +164,9 @@ Token = tuple()</code>
</func>
<func>
- <name since="">token(Cont, Chars) -> {more,Cont1} | {done,TokenRet,RestChars}
+ <name since="">Module:token(Cont, Chars) -> {more,Cont1} | {done,TokenRet,RestChars}
</name>
- <name since="">token(Cont, Chars, StartLine) -> {more,Cont1}
+ <name since="">Module:token(Cont, Chars, StartLine) -> {more,Cont1}
| {done,TokenRet,RestChars}
</name>
<fsummary>Generated by Leex</fsummary>
@@ -199,9 +199,9 @@ io:request(InFile, {get_until,unicode,Prompt,Module,token,[Line]})
</func>
<func>
- <name since="">tokens(Cont, Chars) -> {more,Cont1} | {done,TokensRet,RestChars}
+ <name since="">Module:tokens(Cont, Chars) -> {more,Cont1} | {done,TokensRet,RestChars}
</name>
- <name since="">tokens(Cont, Chars, StartLine) ->
+ <name since="">Module:tokens(Cont, Chars, StartLine) ->
{more,Cont1} | {done,TokensRet,RestChars}
</name>
<fsummary>Generated by Leex</fsummary>
diff --git a/lib/parsetools/doc/src/ref_man.xml b/lib/parsetools/doc/src/ref_man.xml
index a06221250f..a2c82eb711 100644
--- a/lib/parsetools/doc/src/ref_man.xml
+++ b/lib/parsetools/doc/src/ref_man.xml
@@ -31,9 +31,9 @@
</header>
<description>
<p>The <em>Parsetools</em> application contains utilities for
- parsing and scanning. Yecc is an <term id="LALR-1"></term>parser
- generator for Erlang, similar to yacc. Yecc takes a <term
- id="BNF"></term>grammar definition as input, and produces Erlang
+ parsing and scanning. Yecc is an LALR-1 parser
+ generator for Erlang, similar to yacc. Yecc takes a BNF grammar
+ definition as input, and produces Erlang
code for a parser as output. Leex is a regular expression based
lexical analyzer generator for Erlang, similar to lex or flex.</p>
</description>
diff --git a/lib/public_key/doc/src/Makefile b/lib/public_key/doc/src/Makefile
index c8647750af..6a694806bc 100644
--- a/lib/public_key/doc/src/Makefile
+++ b/lib/public_key/doc/src/Makefile
@@ -30,10 +30,6 @@ VSN=$(PUBLIC_KEY_VSN)
APPLICATION=public_key
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -52,107 +48,8 @@ BOOK_FILES = book.xml
XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
$(XML_REF6_FILES) $(XML_PART_FILES) $(XML_CHAPTER_FILES)
-GIF_FILES =
-
-# ----------------------------------------------------
-
-TOP_HTML_FILES =
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-EXTRA_FILES = \
- $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
-
TOP_SPECS_FILE = specs.xml
# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-SPECS_FLAGS = -I../../include -I../../src -I../../..
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECS_FILES)
- rm -f errs core *~
-
-man: $(MAN3_FILES) $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6DIR)/* "$(RELEASE_PATH)/man/man6"
-release_spec:
-info:
- @echo "GIF_FILES:\n$(GIF_FILES)"
- @echo ""
- @echo "EXTRA_FILES:\n$(EXTRA_FILES)"
- @echo ""
- @echo "HTML_FILES:\n$(HTML_FILES)"
- @echo ""
- @echo "TOP_HTML_FILES:\n$(TOP_HTML_FILES)"
- @echo ""
- @echo "DEFAULT_GIF_FILES:\n$(DEFAULT_GIF_FILES)"
- @echo ""
- @echo "DEFAULT_HTML_FILES:\n$(DEFAULT_HTML_FILES)"
- @echo ""
- @echo "XML_REF3_FILES:\n$(XML_REF3_FILES)"
- @echo ""
- @echo "XML_REF6_FILES:\n$(XML_REF6_FILES)"
- @echo ""
- @echo "XML_CHAPTER_FILES:\n$(XML_CHAPTER_FILES)"
- @echo ""
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/reltool/doc/src/Makefile b/lib/reltool/doc/src/Makefile
index dce8059616..76cf8b82dd 100644
--- a/lib/reltool/doc/src/Makefile
+++ b/lib/reltool/doc/src/Makefile
@@ -28,84 +28,9 @@ VSN=$(RELTOOL_VSN)
APPLICATION=reltool
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
include files.mk
-# ----------------------------------------------------
-
-XML_FILES = \
- $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
- $(XML_PART_FILES) $(XML_CHAPTER_FILES)
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html:images $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES)
-
-images: $(IMAGE_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-clean clean_docs:
- for file in $(XML_FILES); do \
- if [ -f $$file\src ]; then \
- rm -f $$file; \
- fi \
- done
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
-
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/reltool/doc/src/files.mk b/lib/reltool/doc/src/files.mk
index efd7d8f09c..46288d0f50 100644
--- a/lib/reltool/doc/src/files.mk
+++ b/lib/reltool/doc/src/files.mk
@@ -37,3 +37,6 @@ BOOK_FILES = book.xml
IMAGE_FILES =
+XML_FILES = \
+ $(BOOK_FILES) $(XML_CHAPTER_FILES) \
+ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
diff --git a/lib/runtime_tools/doc/src/Makefile b/lib/runtime_tools/doc/src/Makefile
index 2399ed51e0..53c3cc9d26 100644
--- a/lib/runtime_tools/doc/src/Makefile
+++ b/lib/runtime_tools/doc/src/Makefile
@@ -33,11 +33,6 @@ VSN=$(RUNTIME_TOOLS_VSN)
APPLICATION=runtime_tools
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -64,83 +59,17 @@ XML_FILES = \
XML_GEN_FILES = $(GENERATED_XML_FILES:%=$(XMLDIR)/%)
-GIF_FILES =
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
+IMAGE_FILES =
TOP_SPECS_FILE = specs.xml
# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-SPECS_ESRC = ../../src
-
-SPECS_FLAGS = -I../../include -I../../../kernel/src
-
-# ----------------------------------------------------
# Targets
# ----------------------------------------------------
$(XMLDIR)/%.xml: $(ERL_TOP)/HOWTO/%.md $(ERL_TOP)/make/emd2exml
$(ERL_TOP)/make/emd2exml $< $@
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES) $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
-
-release_spec:
+
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/runtime_tools/doc/src/dbg.xml b/lib/runtime_tools/doc/src/dbg.xml
index e15fc3efe6..6589e514ed 100644
--- a/lib/runtime_tools/doc/src/dbg.xml
+++ b/lib/runtime_tools/doc/src/dbg.xml
@@ -295,7 +295,7 @@ Error: fun containing local erlang function calls ('is_atomm' called in guard)\
specifications of how many processes and ports that matched (in the
case of a pure pid() exactly 1). The specification of
matched processes is <c>{matched, Node, N}</c>. If the
- remote processor call,<c>rpc</c>, to a remote node fails,
+ remote processor call, <c>rpc</c>, to a remote node fails,
the <c>rpc</c> error message is delivered as a fourth
argument and the number of matched processes are 0. Note
that the result {ok, List} may contain a list where
diff --git a/lib/sasl/doc/src/Makefile b/lib/sasl/doc/src/Makefile
index 8e1e8b502c..684fd2b5e4 100644
--- a/lib/sasl/doc/src/Makefile
+++ b/lib/sasl/doc/src/Makefile
@@ -27,11 +27,6 @@ VSN=$(SASL_VSN)
APPLICATION=sasl
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -51,80 +46,13 @@ XML_CHAPTER_FILES = sasl_intro.xml \
BOOK_FILES = book.xml
-GIF_FILES =
+IMAGE_FILES =
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES) \
$(XML_REF6_FILES) $(XML_APPLICATION_FILES)
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN4_FILES = $(XML_REF4_FILES:%.xml=$(MAN4DIR)/%.4)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES) $(MAN4_FILES) $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%) # We depend just to copy them to ../html
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(MAN4DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man4"
- $(INSTALL_DATA) $(MAN4_FILES) "$(RELEASE_PATH)/man/man4"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/snmp/doc/src/Makefile b/lib/snmp/doc/src/Makefile
index e7ab491eef..cfc41156cf 100644
--- a/lib/snmp/doc/src/Makefile
+++ b/lib/snmp/doc/src/Makefile
@@ -29,11 +29,6 @@ VSN = $(SNMP_VSN)
APPLICATION=snmp
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
@@ -58,89 +53,21 @@ XML_ERRS = $(XML_FILES:%.xml=%.latex.xmls_errs) \
XML_OUTPUT = $(XML_FILES:%.xml=%.latex.xmls_output) \
$(XML_FILES:%.xml=%.html.xmls_output)
-INFO_FILE = ../../info
-
-#HTML_REF1_FILES = $(XML_REF1_FILES:%.xml=$(HTMLDIR)/%.html)
-HTML_REF3_FILES = $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html)
-HTML_REF6_FILES = $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html)
-HTML_CHAP_FILES = $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-EXTRA_FILES = \
- $(DEFAULT_HTML_FILES) \
- $(HTML_REF1_FILES) \
- $(HTML_REF3_FILES) \
- $(HTML_REF6_FILES) \
- $(HTML_CHAP_FILES)
-
-
-MAN7DIR = $(DOCDIR)/man7
-
-MAN1_FILES = $(MAN1DIR)/snmpc.1
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-MAN7_FILES = $(MIB_FILES:$(MIBSDIR)/%.mib=$(MAN7DIR)/%.7)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-GIF_TARGETS = $(GIF_FILES:%=$(HTMLDIR)/%)
-
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
+NO_CHUNKS = snmpa_discovery_handler.xml \
+ snmpa_error_report.xml \
+ snmpa_mib_data.xml \
+ snmpa_mib_storage.xml \
+ snmpa_network_interface.xml \
+ snmpa_network_interface_filter.xml \
+ snmpa_notification_delivery_info_receiver.xml \
+ snmpa_notification_filter.xml \
+ snmpm_network_interface.xml \
+ snmpm_network_interface_filter.xml \
+ snmpm_user.xml
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif # Copy them to ../html
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-ldocs: local_docs
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs: clean_html clean_man clean_pdf
- rm -f errs core *~
-
-man: man1 man3 man6 man7
-
-man1: $(MAN1_FILES)
-
-man3: $(MAN3_FILES)
-
-man6: $(MAN6_FILES)
-
-man7: $(MAN7_FILES)
-
-gifs: $(GIF_TARGETS)
-
-debug opt:
-
-clean_pdf:
- @echo "cleaning pdf:"
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
-
-clean_man:
- @echo "cleaning man:"
- rm -f $(MAN1DIR)/*
- rm -f $(MAN3DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(MAN7DIR)/*
-
-clean_html:
- @echo "cleaning html:"
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
$(MAN7DIR)/%.7: $(MIBSDIR)/%.mib
@echo "processing $*"
@@ -150,40 +77,15 @@ $(MAN7DIR)/%.7: $(MIBSDIR)/%.mib
@echo ".fi" >> $@
@echo "" >> $@
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-
$(MAN1DIR)/snmpc.1: snmpc_cmd.xml
date=`date +"%B %e %Y"`; \
xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $<
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DATA) $(MAN1DIR)/* "$(RELEASE_PATH)/man/man1"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6DIR)/* "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man7"
- $(INSTALL_DATA) $(MAN7DIR)/* "$(RELEASE_PATH)/man/man7"
-
-release_spec:
+# ----------------------------------------------------
+
+include $(ERL_TOP)/make/doc.mk
info: info_xml info_man info_html
- @echo "MAN1DIR: $(MAN1DIR)"
- @echo "MAN3DIR: $(MAN3DIR)"
- @echo "MAN6DIR: $(MAN6DIR)"
- @echo "MAN7DIR: $(MAN7DIR)"
info_man:
@echo "man files:"
diff --git a/lib/snmp/doc/src/files.mk b/lib/snmp/doc/src/files.mk
index f364cb6fa5..ea4143d121 100644
--- a/lib/snmp/doc/src/files.mk
+++ b/lib/snmp/doc/src/files.mk
@@ -113,7 +113,7 @@ XML_FILES = $(BOOK_FILES) \
$(XML_REF6_FILES) \
$(XML_APPLICATION_FILES)
-GIF_FILES = \
+IMAGE_FILES = \
getnext1.gif \
getnext2.gif \
getnext3.gif \
@@ -125,19 +125,7 @@ GIF_FILES = \
snmp-um-1-image-3.gif \
MIB_mechanism.gif
-PS_FILES = getnext1.ps \
- getnext2.ps \
- getnext3.ps \
- getnext4.ps \
- snmp_agent_netif.ps \
- snmp-um-1-image-1.ps \
- snmp-um-1-image-2.ps \
- snmp-um-1-image-3.ps \
- snmp-um-1-image-8.ps \
- MIB_mechanism.ps
-
-
-MIB_FILES = \
+MIB_REF7_FILES = \
$(MIBSDIR)/RFC1213-MIB.mib \
$(MIBSDIR)/STANDARD-MIB.mib \
$(MIBSDIR)/SNMPv2-TM.mib \
diff --git a/lib/snmp/doc/src/snmp_pdus.xml b/lib/snmp/doc/src/snmp_pdus.xml
index 4b00dcb7f0..0377a1c050 100644
--- a/lib/snmp/doc/src/snmp_pdus.xml
+++ b/lib/snmp/doc/src/snmp_pdus.xml
@@ -125,7 +125,6 @@
<p>Decodes a list of bytes into an SNMP UsmSecurityParameters</p>
</desc>
</func>
-
<func>
<name since="">enc_message(Message) -> [byte()]</name>
<fsummary>Encode an SNMP Message</fsummary>
diff --git a/lib/ssh/doc/src/Makefile b/lib/ssh/doc/src/Makefile
index 4e32dd9976..4e6af79a1a 100644
--- a/lib/ssh/doc/src/Makefile
+++ b/lib/ssh/doc/src/Makefile
@@ -30,11 +30,6 @@ VSN=$(SSH_VSN)
APPLICATION=ssh
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -67,87 +62,9 @@ XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) $(XML_REF6
IMAGE_FILES = SSH_protocols.png
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-EXTRA_FILES = \
- $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
-
TOP_SPECS_FILE = specs.xml
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-#SPECS_FLAGS = -I../../include -I../../../kernel/include
-SPECS_FLAGS = -I../../../public_key/include -I../../../public_key/src -I../../..
+NO_CHUNKS = ssh_client_key_api.xml ssh_server_key_api.xml ssh_server_channel.xml
# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.png: %.png
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-images: $(IMAGE_FILES:%=$(HTMLDIR)/%)
-
-pdf: $(TOP_PDF_FILE)
-
-html: images $(HTML_REF_MAN_FILE)
-
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECS_FILES)
- rm -f errs core *~
-
-man: $(MAN3_FILES) $(MAN6_FILES)
-
-
-debug opt:
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
-
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml
index f664e97ac9..913b162fe9 100644
--- a/lib/ssh/doc/src/ssh.xml
+++ b/lib/ssh/doc/src/ssh.xml
@@ -1143,9 +1143,9 @@
</datatype>
<datatype>
- <name>opaque_client_options</name>
- <name>opaque_daemon_options</name>
- <name>opaque_common_options</name>
+ <name>opaque_client_options()</name>
+ <name>opaque_daemon_options()</name>
+ <name>opaque_common_options()</name>
<desc>
<marker id="type-opaque_client_options"/>
<marker id="type-opaque_daemon_options"/>
diff --git a/lib/ssl/doc/src/Makefile b/lib/ssl/doc/src/Makefile
index 064131944c..cb9ff02aa0 100644
--- a/lib/ssl/doc/src/Makefile
+++ b/lib/ssl/doc/src/Makefile
@@ -30,11 +30,6 @@ VSN=$(SSL_VSN)
APPLICATION=ssl
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = refman.xml
@@ -55,86 +50,9 @@ BOOK_FILES = book.xml
XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \
$(XML_PART_FILES) $(XML_CHAPTER_FILES)
-GIF_FILES =
-
-PS_FILES =
-
-XML_FLAGS += -defs cite cite.defs -booksty otpA4
-
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-EXTRA_FILES = \
- $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
-
TOP_SPECS_FILE = specs.xml
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-SPECS_FLAGS = -I../../../public_key/include -I../../../public_key/src -I../../..
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: html pdf man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECS_FILES)
- rm -f errs core *~
-
-man: $(MAN3_FILES) $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
+NO_CHUNKS = ssl_crl_cache_api.xml ssl_session_cache_api.xml
# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
index a60c19a4e6..0126177c76 100644
--- a/lib/ssl/doc/src/ssl.xml
+++ b/lib/ssl/doc/src/ssl.xml
@@ -1746,7 +1746,7 @@ fun(srp, Username :: string(), UserState :: term()) ->
<func>
<name since="OTP R14B" name="start" arity="0" />
- <name since="OTP R14B">start(Type) -> ok | {error, Reason}</name>
+ <name since="OTP R14B" name="start" arity="1" />
<fsummary>Starts the SSL application.</fsummary>
<desc>
<p>Starts the SSL application. Default type
diff --git a/lib/stdlib/doc/src/Makefile b/lib/stdlib/doc/src/Makefile
index 4541b4a463..1092ce3ffa 100644
--- a/lib/stdlib/doc/src/Makefile
+++ b/lib/stdlib/doc/src/Makefile
@@ -28,11 +28,6 @@ VSN=$(STDLIB_VSN)
APPLICATION=stdlib
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -89,6 +84,7 @@ XML_REF3_FILES = \
sets.xml \
shell.xml \
shell_default.xml \
+ shell_docs.xml \
slave.xml \
sofs.xml \
string.xml \
@@ -113,74 +109,12 @@ XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) $(XML_APPLICATION_FILES)
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
-
TOP_SPECS_FILE = specs.xml
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-SPECS_FLAGS = -I../../include -I../../../kernel/include
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-docs: man pdf html
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES) $(MAN6_FILES)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECDIR)/*
- rm -f errs core *~
-
$(SPECDIR)/specs_erl_id_trans.xml:
$(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \
-o$(dir $@) -module erl_id_trans
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
- $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
+NO_CHUNKS = erl_id_trans.xml
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/stdlib/doc/src/c.xml b/lib/stdlib/doc/src/c.xml
index 29edc373c7..04dad1a472 100644
--- a/lib/stdlib/doc/src/c.xml
+++ b/lib/stdlib/doc/src/c.xml
@@ -120,6 +120,64 @@
</func>
<func>
+ <name name="h" arity="1" since="OTP @OTP-16222@"/>
+ <fsummary>Module help information</fsummary>
+ <type name="h_return"/>
+ <desc>
+ <p>Print the documentation for <c>Module</c></p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="h" arity="2" since="OTP @OTP-16222@"/>
+ <fsummary>Function help information</fsummary>
+ <type name="h_return"/>
+ <type name="hf_return"/>
+ <desc>
+ <p>Print the documentation for all <c>Module:Function</c>s (regardless of arity).</p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="h" arity="3" since="OTP @OTP-16222@"/>
+ <fsummary>Function help information</fsummary>
+ <type name="h_return"/>
+ <type name="hf_return"/>
+ <desc>
+ <p>Print the documentation for <c>Module:Function/Arity</c>.</p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="ht" arity="1" since="OTP @OTP-16222@"/>
+ <fsummary>Type help information</fsummary>
+ <type name="h_return"/>
+ <desc>
+ <p>Print the type documentation for <c>Module</c></p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="ht" arity="2" since="OTP @OTP-16222@"/>
+ <fsummary>Type help information</fsummary>
+ <type name="h_return"/>
+ <type name="ht_return"/>
+ <desc>
+ <p>Print the type documentation for <c>Type</c> in <c>Module</c> regardless of arity.</p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="ht" arity="3" since="OTP @OTP-16222@"/>
+ <fsummary>Type help information</fsummary>
+ <type name="h_return"/>
+ <type name="ht_return"/>
+ <desc>
+ <p>Print the type documentation for <c>Type/Arity</c> in <c>Module</c>.</p>
+ </desc>
+ </func>
+
+ <func>
<name name="i" arity="0" since=""/>
<name name="ni" arity="0" since=""/>
<fsummary>System information.</fsummary>
diff --git a/lib/stdlib/doc/src/ref_man.xml b/lib/stdlib/doc/src/ref_man.xml
index 8d61833d1f..d12f537b07 100644
--- a/lib/stdlib/doc/src/ref_man.xml
+++ b/lib/stdlib/doc/src/ref_man.xml
@@ -84,6 +84,7 @@
<xi:include href="sets.xml"/>
<xi:include href="shell.xml"/>
<xi:include href="shell_default.xml"/>
+ <xi:include href="shell_docs.xml"/>
<xi:include href="slave.xml"/>
<xi:include href="sofs.xml"/>
<xi:include href="string.xml"/>
diff --git a/lib/stdlib/doc/src/shell_docs.xml b/lib/stdlib/doc/src/shell_docs.xml
new file mode 100644
index 0000000000..a3b6f128c3
--- /dev/null
+++ b/lib/stdlib/doc/src/shell_docs.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2020</year><year>2020</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>shell_docs</title>
+ <prepared>Lukas Larsson</prepared>
+ <responsible></responsible>
+ <docno>1</docno>
+ <approved></approved>
+ <checked></checked>
+ <date>2020-02-19</date>
+ <rev>A</rev>
+ <file>shell_docs.xml</file>
+ </header>
+ <module since="OTP @OTP-16222@">shell_docs</module>
+ <modulesummary>Functions used to render documentation for a shell.</modulesummary>
+ <description>
+ <p>This module can be used to render function and type documentation
+ to be printed in a shell. It can only render documentation of the format
+ <c>application/erlang+html</c>. For more information about this format see
+ <seealso marker="erl_docgen:doc_storage">Documentation Storage</seealso>
+ in Erl_Docgen's User's Guide.
+ </p>
+ </description>
+
+ <datatypes>
+ <datatype>
+ <name name="docs_v1"/>
+ </datatype>
+ <datatype>
+ <name name="chunk_element_type"/>
+ <desc>
+ <p>
+ The HTML tags allowed in <c>application/erlang+html</c>.
+ </p>
+ </desc>
+ </datatype>
+ <datatype>
+ <name name="chunk_element_attr"/>
+ <name name="chunk_element_attrs"/>
+ <name name="chunk_element"/>
+ <name name="chunk_elements"/>
+ <desc>
+ </desc>
+ </datatype>
+ </datatypes>
+
+ <funcs>
+
+ <func>
+ <name name="render" arity="2" since="OTP @OTP-16222@"/>
+ <fsummary>Render the documentation for a module.</fsummary>
+ <desc>
+ <p>Render the documentation for a module.</p>
+ </desc>
+ </func>
+ <func>
+ <name name="render" arity="3" since="OTP @OTP-16222@"/>
+ <name name="render" arity="4" since="OTP @OTP-16222@"/>
+ <fsummary>Render the documentation for a function.</fsummary>
+ <desc>
+ <p>Render the documentation for a function.</p>
+ </desc>
+ </func>
+ <func>
+ <name name="render_type" arity="2" since="OTP @OTP-16222@"/>
+ <fsummary>Render a list of all available types in a module.</fsummary>
+ <desc>
+ <p>Render a list of all available types in a module.</p>
+ </desc>
+ </func>
+ <func>
+ <name name="render_type" arity="3" since="OTP @OTP-16222@"/>
+ <name name="render_type" arity="4" since="OTP @OTP-16222@"/>
+ <fsummary>Render the documentation of a type in a module.</fsummary>
+ <desc>
+ <p>Render the documentation of a type in a module.</p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="validate" arity="1" since="OTP @OTP-16222@"/>
+ <fsummary>Validate the documentation</fsummary>
+ <desc>
+ <p>This function can be used to do a basic validation of
+ the doc content of <c>application/erlang+html</c> format.</p>
+ </desc>
+ </func>
+
+ <func>
+ <name name="normalize" arity="1" since="OTP @OTP-16222@"/>
+ <fsummary>Normalize the documentation</fsummary>
+ <desc>
+ <p>This function can be used to do whitespace normalization
+ of <c>application/erlang+html</c> documentation.</p>
+ </desc>
+ </func>
+
+ </funcs>
+</erlref>
diff --git a/lib/stdlib/doc/src/specs.xml b/lib/stdlib/doc/src/specs.xml
index fd2d625685..9b11a6941c 100644
--- a/lib/stdlib/doc/src/specs.xml
+++ b/lib/stdlib/doc/src/specs.xml
@@ -51,6 +51,7 @@
<xi:include href="../specs/specs_sets.xml"/>
<xi:include href="../specs/specs_shell.xml"/>
<xi:include href="../specs/specs_shell_default.xml"/>
+ <xi:include href="../specs/specs_shell_docs.xml"/>
<xi:include href="../specs/specs_slave.xml"/>
<xi:include href="../specs/specs_sofs.xml"/>
<xi:include href="../specs/specs_string.xml"/>
diff --git a/lib/stdlib/src/Makefile b/lib/stdlib/src/Makefile
index abdab1a951..c410b36964 100644
--- a/lib/stdlib/src/Makefile
+++ b/lib/stdlib/src/Makefile
@@ -112,6 +112,7 @@ MODULES= \
sets \
shell \
shell_default \
+ shell_docs \
slave \
sofs \
string \
diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl
index 0362b72536..6af3951604 100644
--- a/lib/stdlib/src/c.erl
+++ b/lib/stdlib/src/c.erl
@@ -19,6 +19,8 @@
%%
-module(c).
+-include_lib("kernel/include/eep48.hrl").
+
%% Utilities to use from shell.
%% Avoid warning for local function error/2 clashing with autoimported BIF.
@@ -28,6 +30,7 @@
lc_batch/0, lc_batch/1,
i/3,pid/3,m/0,m/1,mm/0,lm/0,
bt/1, q/0,
+ h/1,h/2,h/3,ht/1,ht/2,ht/3,
erlangrc/0,erlangrc/1,bi/1, flush/0, regs/0, uptime/0,
nregs/0,pwd/0,ls/0,ls/1,cd/1,memory/1,memory/0, xm/1]).
@@ -48,6 +51,9 @@ help() ->
"cd(Dir) -- change working directory\n"
"flush() -- flush any messages sent to the shell\n"
"help() -- help info\n"
+ "h(M) -- module documentation\n"
+ "h(M,F) -- module function documentation\n"
+ "h(M,F,A) -- module function arity documentation\n"
"i() -- information about the system\n"
"ni() -- information about the networked system\n"
"i(X,Y,Z) -- information about pid <X,Y,Z>\n"
@@ -147,6 +153,82 @@ c(SrcFile, NewOpts, Filter, BeamFile, Info) ->
format("Recompiling ~ts\n", [SrcFile]),
safe_recompile(SrcFile, Options, BeamFile).
+-type h_return() :: ok | {error, missing | {unknown_format, unicode:chardata()}}.
+-type ht_return() :: h_return() | {error, type_missing}.
+-type hf_return() :: h_return() | {error, function_missing}.
+
+-spec h(module()) -> h_return().
+h(Module) ->
+ case code:get_doc(Module) of
+ {ok, #docs_v1{ format = ?NATIVE_FORMAT } = Docs} ->
+ format_docs(shell_docs:render(Module, Docs));
+ {ok, #docs_v1{ format = Enc }} ->
+ {error, {unknown_format, Enc}};
+ Error ->
+ Error
+ end.
+
+-spec h(module(),function()) -> hf_return().
+h(Module,Function) ->
+ case code:get_doc(Module) of
+ {ok, #docs_v1{ format = ?NATIVE_FORMAT } = Docs} ->
+ format_docs(shell_docs:render(Module, Function, Docs));
+ {ok, #docs_v1{ format = Enc }} ->
+ {error, {unknown_format, Enc}};
+ Error ->
+ Error
+ end.
+
+-spec h(module(),function(),arity()) -> hf_return().
+h(Module,Function,Arity) ->
+ case code:get_doc(Module) of
+ {ok, #docs_v1{ format = ?NATIVE_FORMAT } = Docs} ->
+ format_docs(shell_docs:render(Module, Function, Arity, Docs));
+ {ok, #docs_v1{ format = Enc }} ->
+ {error, {unknown_format, Enc}};
+ Error ->
+ Error
+ end.
+
+-spec ht(module()) -> h_return().
+ht(Module) ->
+ case code:get_doc(Module) of
+ {ok, #docs_v1{ format = ?NATIVE_FORMAT } = Docs} ->
+ format_docs(shell_docs:render_type(Module, Docs));
+ {ok, #docs_v1{ format = Enc }} ->
+ {error, {unknown_format, Enc}};
+ Error ->
+ Error
+ end.
+
+-spec ht(module(),Type :: atom()) -> ht_return().
+ht(Module,Type) ->
+ case code:get_doc(Module) of
+ {ok, #docs_v1{ format = ?NATIVE_FORMAT } = Docs} ->
+ format_docs(shell_docs:render_type(Module, Type, Docs));
+ {ok, #docs_v1{ format = Enc }} ->
+ {error, {unknown_format, Enc}};
+ Error ->
+ Error
+ end.
+
+-spec ht(module(),Type :: atom(),arity()) ->
+ ht_return().
+ht(Module,Type,Arity) ->
+ case code:get_doc(Module) of
+ {ok, #docs_v1{ format = ?NATIVE_FORMAT } = Docs} ->
+ format_docs(shell_docs:render_type(Module, Type, Arity, Docs));
+ {ok, #docs_v1{ format = Enc }} ->
+ {error, {unknown_format, Enc}};
+ Error ->
+ Error
+ end.
+
+format_docs({error,_} = E) ->
+ E;
+format_docs(Docs) ->
+ format("~ts",[Docs]).
+
old_options(Info) ->
case lists:keyfind(options, 1, Info) of
{options, Opts} -> Opts;
diff --git a/lib/stdlib/src/edlin_expand.erl b/lib/stdlib/src/edlin_expand.erl
index bdcefda6e5..bb6ad26d8f 100644
--- a/lib/stdlib/src/edlin_expand.erl
+++ b/lib/stdlib/src/edlin_expand.erl
@@ -32,35 +32,71 @@
%% function name must be on the same line. CurrentBefore is reversed
%% and over_word/3 reverses the characters it finds. In certain cases
%% possible expansions are printed.
+%%
+%% The function also handles expansion with "h(" for module and functions.
expand(Bef0) ->
{Bef1,Word,_} = edlin:over_word(Bef0, [], 0),
case over_white(Bef1, [], 0) of
- {[$:|Bef2],_White,_Nwh} ->
+ {[$,|Bef2],_White,_Nwh} ->
+ {Bef3,_White1,_Nwh1} = over_white(Bef2, [], 0),
+ {Bef4,Mod,_Nm} = edlin:over_word(Bef3, [], 0),
+ case expand_function(Bef4) of
+ help ->
+ expand_function_name(Mod, Word, ",");
+ _ ->
+ expand_module_name(Word, ",")
+ end;
+ {[$:|Bef2],_White,_Nwh} ->
{Bef3,_White1,_Nwh1} = over_white(Bef2, [], 0),
{_,Mod,_Nm} = edlin:over_word(Bef3, [], 0),
- expand_function_name(Mod, Word);
+ expand_function_name(Mod, Word, "(");
{_,_,_} ->
- expand_module_name(Word)
+ CompleteChar
+ = case expand_function(Bef1) of
+ help -> ",";
+ _ -> ":"
+ end,
+ expand_module_name(Word, CompleteChar)
end.
-expand_module_name(Prefix) ->
- match(Prefix, code:all_loaded(), ":").
+expand_function("("++Str) ->
+ case edlin:over_word(Str, [], 0) of
+ {_,"h",_} ->
+ help;
+ {_,"ht",_} ->
+ help_type;
+ _ ->
+ module
+ end;
+expand_function(_) ->
+ module.
+
+expand_module_name("",_) ->
+ {no, [], []};
+expand_module_name(Prefix,CompleteChar) ->
+ match(Prefix, [{list_to_atom(M),P} || {M,P,_} <- code:all_available()], CompleteChar).
-expand_function_name(ModStr, FuncPrefix) ->
+expand_function_name(ModStr, FuncPrefix, CompleteChar) ->
case to_atom(ModStr) of
{ok, Mod} ->
- case erlang:module_loaded(Mod) of
- true ->
- L = Mod:module_info(),
- case lists:keyfind(exports, 1, L) of
- {_, Exports} ->
- match(FuncPrefix, Exports, "(");
- _ ->
- {no, [], []}
- end;
- false ->
- {no, [], []}
- end;
+ Exports =
+ case erlang:module_loaded(Mod) of
+ true ->
+ Mod:module_info(exports);
+ false ->
+ case beam_lib:chunks(code:which(Mod), [exports]) of
+ {ok, {Mod, [{exports,E}]}} ->
+ E;
+ _ ->
+ {no, [], []}
+ end
+ end,
+ case Exports of
+ {no, [], []} ->
+ {no, [], []};
+ Exports ->
+ match(FuncPrefix, Exports, CompleteChar)
+ end;
error ->
{no, [], []}
end.
@@ -99,8 +135,10 @@ match(Prefix, Alts, Extra0) ->
{no, [], []}
end.
-flat_write(T) ->
- lists:flatten(io_lib:fwrite("~tw",[T])).
+flat_write(T) when is_atom(T) ->
+ lists:flatten(io_lib:fwrite("~tw",[T]));
+flat_write(S) ->
+ S.
%% Return the list of names L in multiple columns.
format_matches(L) ->
diff --git a/lib/stdlib/src/shell_default.erl b/lib/stdlib/src/shell_default.erl
index a0c1d98513..e65340e663 100644
--- a/lib/stdlib/src/shell_default.erl
+++ b/lib/stdlib/src/shell_default.erl
@@ -28,6 +28,7 @@
erlangrc/1,bi/1, regs/0, flush/0,pwd/0,ls/0,ls/1,cd/1,
y/1, y/2,
xm/1, bt/1, q/0,
+ h/1, h/2, h/3, ht/1, ht/2, ht/3,
ni/0, nregs/0]).
-export([ih/0,iv/0,im/0,ii/1,ii/2,iq/1,ini/1,ini/2,inq/1,ib/2,ib/3,
@@ -43,7 +44,13 @@ help() ->
format("e(N) -- repeat the expression in query <N>\n"),
format("f() -- forget all variable bindings\n"),
format("f(X) -- forget the binding of variable X\n"),
- format("h() -- history\n"),
+ format("h() -- history\n"),
+ format("h(Mod) -- help about module\n"),
+ format("h(Mod,Func)-- help about function in module\n"),
+ format("h(Mod,Func,Arity) -- help about function with arity in module\n"),
+ format("ht(Mod) -- help about a module's types\n"),
+ format("ht(Mod,Func) -- help about type in module\n"),
+ format("ht(Mod,Func,Arity) -- help about type with arity in module\n"),
format("history(N) -- set how many previous commands to keep\n"),
format("results(N) -- set how many previous command results to keep\n"),
format("catch_exception(B) -- how exceptions are handled\n"),
@@ -76,6 +83,12 @@ c(File, Opt, Filter) -> c:c(File, Opt, Filter).
cd(D) -> c:cd(D).
erlangrc(X) -> c:erlangrc(X).
flush() -> c:flush().
+h(M) -> c:h(M).
+h(M,F) -> c:h(M,F).
+h(M,F,A) -> c:h(M,F,A).
+ht(M) -> c:ht(M).
+ht(M,F) -> c:ht(M,F).
+ht(M,F,A) -> c:ht(M,F,A).
i() -> c:i().
i(X,Y,Z) -> c:i(X,Y,Z).
l(Mod) -> c:l(Mod).
diff --git a/lib/stdlib/src/shell_docs.erl b/lib/stdlib/src/shell_docs.erl
new file mode 100644
index 0000000000..6e56030fca
--- /dev/null
+++ b/lib/stdlib/src/shell_docs.erl
@@ -0,0 +1,684 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2018. 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%
+%%
+-module(shell_docs).
+
+-include("eep48.hrl").
+
+-export([render/2, render/3, render/4]).
+-export([render_type/2, render_type/3, render_type/4]).
+
+%% Used by chunks.escript in erl_docgen
+-export([validate/1, normalize/1]).
+
+%% Convinience functions
+-export([get_doc/1, get_doc/3, get_type_doc/3]).
+
+-record(config, { docs,
+ io_opts = io:getopts(),
+ io_columns = element(2,io:columns())
+ }).
+
+-define(ALL_ELEMENTS,[a,p,h1,h2,h3,i,br,em,pre,code,ul,ol,li,dl,dt,dd]).
+%% inline elements are:
+-define(INLINE,[i,br,em,code,a]).
+-define(IS_INLINE(ELEM),(((ELEM) =:= a) orelse ((ELEM) =:= code)
+ orelse ((ELEM) =:= i) orelse ((ELEM) =:= br)
+ orelse ((ELEM) =:= em))).
+%% non-inline elements are:
+-define(BLOCK,[p,pre,ul,ol,li,dl,dt,dd,h1,h2,h3]).
+-define(IS_BLOCK(ELEM),not ?IS_INLINE(ELEM)).
+-define(IS_PRE(ELEM),(((ELEM) =:= pre))).
+
+-type chunk_element_type() :: a | p | i | br | em | pre | code | ul |
+ ol | li | dl | dt | dd.
+-type chunk_element_attr() :: {atom(),unicode:chardata()}.
+-type chunk_element_attrs() :: [chunk_element_attr()].
+-type chunk_element() :: {chunk_element_type(),chunk_element_attrs(),
+ chunk_elements()} | binary().
+-type chunk_elements() :: [chunk_element()].
+-type docs_v1() :: #docs_v1{}.
+
+
+-spec validate(Module) -> ok when
+ Module :: module() | docs_v1().
+%% Simple validation of erlang doc chunk. Check that all tags are supported and
+%% that the signature is correct.
+validate(Module) when is_atom(Module) ->
+ {ok, Doc} = code:get_doc(Module),
+ validate(Doc);
+validate(#docs_v1{ module_doc = MDocs, docs = AllDocs }) ->
+
+ %% Check some macro in-variants
+ AE = lists:sort(?ALL_ELEMENTS),
+ AE = lists:sort(?INLINE ++ ?BLOCK),
+ true = lists:all(fun(Elem) -> ?IS_INLINE(Elem) end, ?INLINE),
+ true = lists:all(fun(Elem) -> ?IS_BLOCK(Elem) end, ?BLOCK),
+
+ _ = maps:map(fun(_Key,MDoc) -> validate(MDoc) end, MDocs),
+ lists:map(fun({_,_Anno, Sig, Docs, _Meta}) ->
+ case lists:all(fun erlang:is_binary/1, Sig) of
+ false -> throw({invalid_signature,Sig});
+ true -> ok
+ end,
+ maps:map(fun(_Key,Doc) -> validate(Doc) end, Docs)
+ end, AllDocs);
+validate([H|T]) when is_tuple(H) ->
+ _ = validate(H),
+ validate(T);
+validate({Tag,Attr,Content}) ->
+ case lists:member(Tag,?ALL_ELEMENTS) of
+ false ->
+ throw({invalid_tag,Tag});
+ true ->
+ ok
+ end,
+ true = is_list(Attr),
+ validate(Content);
+validate([Chars | T]) when is_binary(Chars) ->
+ validate(T);
+validate([]) ->
+ ok.
+
+%% Follows algorithm described here:
+%% * https://medium.com/@patrickbrosset/when-does-white-space-matter-in-html-b90e8a7cdd33
+%% which in turn follows this:
+%% * https://www.w3.org/TR/css-text-3/#white-space-processing
+-spec normalize(Docs) -> NormalizedDocs when
+ Docs :: chunk_elements(),
+ NormalizedDocs :: chunk_elements().
+normalize(Docs) ->
+ Trimmed = normalize_trim(Docs,true),
+ normalize_space(Trimmed).
+
+normalize_trim(Bin,true) when is_binary(Bin) ->
+ %% Remove any whitespace (except \n) before or after a newline
+ NoSpace = re:replace(Bin,"[^\\S\n]*\n+[^\\S\n]*","\n",[global]),
+ %% Replace any tabs with space
+ NoTab = re:replace(NoSpace,"\t"," ",[global]),
+ %% Replace any newlines with space
+ NoNewLine = re:replace(NoTab,"\\v"," ",[global]),
+ %% Replace any sequences of \s with a single " "
+ re:replace(NoNewLine,"\\s+"," ",[global,{return,binary}]);
+normalize_trim(Bin,false) when is_binary(Bin) ->
+ Bin;
+normalize_trim([{pre,Attr,Content}|T],Trim) ->
+ [{pre,Attr,normalize_trim(Content,false)} | normalize_trim(T,Trim)];
+normalize_trim([{Tag,Attr,Content}|T],Trim) ->
+ [{Tag,Attr,normalize_trim(Content,Trim)} | normalize_trim(T,Trim)];
+normalize_trim([<<>>|T],Trim) ->
+ normalize_trim(T,Trim);
+normalize_trim([B1,B2|T],Trim) when is_binary(B1),is_binary(B2) ->
+ normalize_trim([<<B1/binary,B2/binary>> | T],Trim);
+normalize_trim([H|T],Trim) ->
+ [normalize_trim(H,Trim) | normalize_trim(T,Trim)];
+normalize_trim([],_Trim) ->
+ [].
+
+%% We want to remove any duplicate spaces, even if they
+%% cross into other inline elements.
+%% For non-inline elements we just need to make sure that any
+%% leading or trailing spaces are stripped.
+normalize_space([{Pre,Attr,Content}|T]) when ?IS_PRE(Pre) ->
+ [{Pre,Attr,trim_first_and_last(Content,$\n)} | normalize_space(T)];
+normalize_space([{Block,Attr,Content}|T]) when ?IS_BLOCK(Block) ->
+ [{Block,Attr,trim_first_and_last(trim_inline(Content),$ )} | normalize_space(T)];
+normalize_space([E|T]) ->
+ [E|normalize_space(T)];
+normalize_space([]) ->
+ [].
+
+trim_inline(Content) ->
+ {NewContent,_} = trim_inline(Content,false),
+ NewContent.
+trim_inline([Bin|T],false) when is_binary(Bin) ->
+ LastElem = binary:at(Bin,byte_size(Bin)-1),
+ {NewT, NewState} = trim_inline(T,LastElem =:= $ ),
+ {[Bin | NewT],NewState};
+trim_inline([<<" ">>|T],true) ->
+ trim_inline(T,false);
+trim_inline([<<" ",Bin/binary>>|T],true) when is_binary(Bin) ->
+ trim_inline([Bin | T],false);
+trim_inline([Bin|T],true) when is_binary(Bin) ->
+ trim_inline([Bin|T],false);
+trim_inline([{Elem,Attr,Content}|T],TrimSpace) when ?IS_INLINE(Elem) ->
+ {NewContent,ContentTrimSpace} = trim_inline(Content,TrimSpace),
+ {NewT,TTrimSpace} = trim_inline(T,ContentTrimSpace),
+ {[{Elem,Attr,NewContent} | NewT], TTrimSpace};
+trim_inline([{Elem1,_A1,_C1} = B1,<<" ">>,{Elem2,_A2,_C2} = B2|T],TrimSpace)
+ when ?IS_BLOCK(Elem1),?IS_BLOCK(Elem2) ->
+ trim_inline([B1,B2|T],TrimSpace);
+trim_inline([{Elem,_Attr,_Content} = Block|T],_TrimSpace) when ?IS_BLOCK(Elem) ->
+ [NewBlock] = normalize_space([Block]),
+ {NewT,TTrimSpace} = trim_inline(T,false),
+ {[NewBlock | NewT], TTrimSpace};
+trim_inline([],TrimSpace) ->
+ {[],TrimSpace}.
+
+
+%% This function removes the first and last What from the content.
+%% This is complicated by the fact that the first or last element
+%% may not have any binary, or have the binary deeply nested within.
+trim_first_and_last(Content, What) when What < 256 ->
+ {NewContent,_State} = trim_last(trim_first(Content,What),What),
+ NewContent.
+
+trim_first(Content,What) ->
+ {NewContent,_State} = trim_first(Content,false,What),
+ NewContent.
+trim_first([Bin|T],false,What) when is_binary(Bin) ->
+ case Bin of
+ <<What>> ->
+ {T,true};
+ <<What,NewBin/binary>> ->
+ {[NewBin|T],true};
+ Bin ->
+ {[Bin|T],true}
+ end;
+trim_first([{Elem,Attr,Content} = Tag|T],false,What) ->
+ case trim_first(Content,false,What) of
+ {NewContent,true} ->
+ {[{Elem,Attr,NewContent}|T],true};
+ {Content,false} ->
+ {NewT,NewState} = trim_first(T,false,What),
+ {[Tag | NewT],NewState}
+ end;
+trim_first([],false,_What) ->
+ {[],false}.
+
+trim_last([Bin | T],What) when is_binary(Bin) ->
+ case trim_last(T,What) of
+ {NewT,true} ->
+ {[Bin | NewT],true};
+ {T,false} ->
+ PreSz = byte_size(Bin)-1,
+ case Bin of
+ <<What>> -> {T,true};
+ <<NewBin:PreSz/binary,What>> ->
+ {[NewBin|T],true};
+ Bin ->
+ {[Bin|T],true}
+ end
+ end;
+trim_last([{Elem,Attr,Content} = Tag|T],What) ->
+ case trim_last(T,What) of
+ {NewT,true} ->
+ {[Tag | NewT],true};
+ {T,false} ->
+ {NewContent,NewState} = trim_last(Content,What),
+ {[{Elem,Attr,NewContent}|T],NewState}
+ end;
+trim_last([],_What) ->
+ {[],false}.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% API function for dealing with the function documentation
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-spec get_doc(Module :: module()) -> chunk_elements().
+get_doc(Module) ->
+ {ok, #docs_v1{ module_doc = ModuleDoc } } = code:get_doc(Module),
+ get_local_doc(Module, ModuleDoc).
+
+-spec get_doc(Module :: module(), Function, Arity) ->
+ [{{Function,Arity}, Anno, Signature, chunk_elements(), Metadata}] when
+ Function :: function(),
+ Arity :: arity(),
+ Anno :: erl_anno:anno(),
+ Signature :: [binary()],
+ Metadata :: #{}.
+get_doc(Module, Function, Arity) ->
+ {ok, #docs_v1{ docs = Docs } } = code:get_doc(Module),
+ FnFunctions =
+ lists:filter(fun({{function, F, A},_Anno,_Sig,_Doc,_Meta}) ->
+ F =:= Function andalso A =:= Arity;
+ (_) ->
+ false
+ end, Docs),
+
+ [{F,A,S,get_local_doc({F,A},D),M} || {F,A,S,D,M} <- FnFunctions].
+
+-spec render(Module :: module(), Docs :: docs_v1()) -> unicode:chardata().
+render(Module, #docs_v1{ module_doc = ModuleDoc, metadata = MD } = D) ->
+ render_docs([["\t",atom_to_binary(Module)]],
+ get_local_doc(Module, ModuleDoc), MD, D).
+
+-spec render(Module :: module(), Function :: function(), Docs :: docs_v1()) ->
+ unicode:chardata() | {error,function_missing}.
+render(_Module, Function, #docs_v1{ docs = Docs } = D) ->
+ render_function(
+ lists:filter(fun({{function, F, _},_Anno,_Sig,_Doc,_Meta}) ->
+ F =:= Function;
+ (_) ->
+ false
+ end, Docs), D).
+-spec render(Module :: module(), Function :: function(), Arity :: arity(),
+ Docs :: docs_v1()) -> unicode:chardata() | {error,function_missing}.
+render(_Module, Function, Arity, #docs_v1{ docs = Docs } = D) ->
+ render_function(
+ lists:filter(fun({{function, F, A},_Anno,_Sig,_Doc,_Meta}) ->
+ F =:= Function andalso A =:= Arity;
+ (_) ->
+ false
+ end, Docs), D).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% API function for dealing with the type documentation
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-spec get_type_doc(Module :: module(), Type :: atom(), Arity :: arity()) ->
+ [{{Type,Arity}, Anno, Signature, chunk_elements(), Metadata}] when
+ Type :: atom(),
+ Arity :: arity(),
+ Anno :: erl_anno:anno(),
+ Signature :: [binary()],
+ Metadata :: #{}.
+get_type_doc(Module, Type, Arity) ->
+ {ok, #docs_v1{ docs = Docs } } = code:get_doc(Module),
+ FnFunctions =
+ lists:filter(fun({{type, T, A},_Anno,_Sig,_Doc,_Meta}) ->
+ T =:= Type andalso A =:= Arity;
+ (_) ->
+ false
+ end, Docs),
+ [{F,A,S,get_local_doc(F, D),M} || {F,A,S,D,M} <- FnFunctions].
+
+-spec render_type(Module :: module(), Docs :: docs_v1()) -> unicode:chardata().
+render_type(Module, #docs_v1{ docs = Docs } = D) ->
+ render_type_signatures(Module,
+ lists:filter(fun({{type, _, _},_Anno,_Sig,_Doc,_Meta}) ->
+ true;
+ (_) ->
+ false
+ end, Docs), D).
+
+-spec render_type(Module :: module(), Type :: atom(), Docs :: docs_v1()) ->
+ unicode:chardata() | {error,type_missing}.
+render_type(_Module, Type, #docs_v1{ docs = Docs } = D) ->
+ render_type_docs(
+ lists:filter(fun({{type, T, _},_Anno,_Sig,_Doc,_Meta}) ->
+ T =:= Type;
+ (_) ->
+ false
+ end, Docs), D).
+
+-spec render_type(Module :: module(), Type :: atom(), Arity :: arity(),
+ Docs :: docs_v1()) -> unicode:chardata() | {error,type_missing}.
+render_type(_Module, Type, Arity, #docs_v1{ docs = Docs } = D) ->
+ render_type_docs(
+ lists:filter(fun({{type, T, A},_Anno,_Sig,_Doc,_Meta}) ->
+ T =:= Type andalso A =:= Arity;
+ (_) ->
+ false
+ end, Docs), D).
+
+
+%% Get the docs in the correct locale if it exists.
+get_local_doc(MissingMod, Docs) when is_atom(MissingMod) ->
+ get_local_doc(atom_to_binary(MissingMod), Docs);
+get_local_doc({F,A}, Docs) ->
+ get_local_doc(unicode:characters_to_binary(io_lib:format("~tp/~p",[F,A])), Docs);
+get_local_doc(_Missing, #{ <<"en">> := Docs }) ->
+ %% English if it exists
+ normalize(Docs);
+get_local_doc(_Missing, ModuleDoc) when map_size(ModuleDoc) > 0 ->
+ %% Otherwise take first alternative found
+ normalize(maps:get(hd(maps:keys(ModuleDoc)), ModuleDoc));
+get_local_doc(Missing, hidden) ->
+ [{p,[],[<<"The documentation for ">>,Missing,
+ <<" is hidden. This probably means that it is internal "
+ "and not to be used by other applications.">>]}];
+get_local_doc(Missing, None) when None =:= none; None =:= #{} ->
+ [{p,[],[<<"There is no documentation for ">>,Missing]}].
+
+%%% Functions for rendering reference documentation
+render_function([], _D) ->
+ {error,function_missing};
+render_function(FDocs, D) ->
+ [render_docs(render_signature(Func), get_local_doc({F,A},Doc), Meta, D)
+ || {{_,F,A},_Anno,_Sig,Doc,Meta} = Func <- lists:sort(FDocs)].
+
+%% Render the signature of either function or a type, or anything else really.
+render_signature({{_Type,_F,_A},_Anno,_Sig,_Docs,#{ signature := Specs }}) ->
+ [erl_pp:attribute(Spec,[{encoding,utf8}]) || Spec <- Specs];
+render_signature({{_Type,_F,_A},_Anno,Sigs,_Docs,_Meta}) ->
+ [Sig || Sig <- Sigs].
+
+render_since(#{ since := Vsn }) ->
+ ["\n\nSince: ",Vsn];
+render_since(_) ->
+ [].
+
+render_docs(Headers, DocContents, MD, D = #config{}) ->
+ init_ansi(D),
+ try
+ {Doc,_} = render_docs(DocContents,[],0,2,D),
+ [sansi(bold),
+ [io_lib:format("~n~ts",[Header]) || Header <- Headers],
+ ransi(bold),
+ render_since(MD),
+ io_lib:format("~n~n~ts",[Doc])]
+ after
+ clean_ansi()
+ end;
+render_docs(Headers, DocContents, MD, D) ->
+ render_docs(Headers, DocContents, MD, #config{ docs = D }).
+
+%%% Functions for rendering type documentation
+render_type_signatures(Module, Types, D = #config{}) ->
+ init_ansi(D),
+ try
+ [sansi(bold),"\t",atom_to_list(Module),ransi(bold),"\n\n",
+ [render_signature(Type) || Type <- Types ]]
+ after
+ clean_ansi()
+ end;
+render_type_signatures(Module, Types, D) ->
+ render_type_signatures(Module, Types, #config{ docs = D }).
+
+render_type_docs([], _D) ->
+ {error,type_missing};
+render_type_docs(Types, #config{} = D) when is_list(Types) ->
+ [render_type_docs(Type, D) || Type <- Types];
+render_type_docs({{_,F,A},_,_Sig,Docs,Meta} = Type, #config{} = D) ->
+ render_docs(render_signature(Type), get_local_doc({F,A},Docs), Meta, D);
+render_type_docs(Docs, D) ->
+ render_type_docs(Docs, #config{ docs = D }).
+
+%%% General rendering functions
+render_docs(Elems,State,Pos,Ind,D) when is_list(Elems) ->
+ lists:mapfoldl(fun(Elem,P) ->
+% io:format("Elem: ~p (~p) (~p,~p)~n",[Elem,State,P,Ind]),
+ render_docs(Elem,State,P,Ind,D)
+ end,Pos,Elems);
+render_docs(Elem,State,Pos,Ind,D) ->
+ render_element(Elem,State,Pos,Ind,D).
+
+
+%%% The function is the main element rendering function
+%%%
+%%% Elem: The current element to process
+%%% Stack: A stack of element names to see where we are in the dom
+%%% Pos: The current print position on the current line
+%%% Ind: How much the text should be indented after a newline
+%%% Config: The renderer's configuration
+%%%
+%%% Each element is responsible for putting new lines AFTER itself
+%%% The indents are done either by render_words when a newline happens
+%%% or when a new element is to be rendered and Pos < Ind.
+%%%
+%%% Any block elements (i.e. p, ul, li etc) are responsible for trimming
+%%% extra new lines. eg. <ul><li><p>content</p></li></ul> should only
+%%% have two newlines at the end.
+-spec render_element(Elem :: chunk_element(),
+ Stack :: [chunk_element_type()],
+ Pos :: non_neg_integer(),
+ Indent :: non_neg_integer(),
+ Config :: #config{}) ->
+ {unicode:chardata(), Pos :: non_neg_integer()}.
+
+render_element({IgnoreMe,_,Content}, State, Pos, Ind,D)
+ when IgnoreMe =:= a; IgnoreMe =:= anno ->
+ render_docs(Content, State, Pos, Ind,D);
+
+%% Catch h1, h2 and h3 before the padding is done as there reset padding
+render_element({h1,_,Content},State,0 = Pos,_Ind,D) ->
+ trimnlnl(render_element({code,[],[{em,[],Content}]}, State, Pos, 0, D));
+render_element({h2,_,Content},State,0 = Pos,_Ind,D) ->
+ trimnlnl(render_element({em,[],Content}, State, Pos, 0, D));
+render_element({h3,_,Content},State,Pos,_Ind,D) when Pos =< 2 ->
+ trimnlnl(render_element({code,[],Content}, State, Pos, 2, D));
+
+render_element({p,_Attr,_Content} = E,State,Pos,Ind,D) when Pos > Ind ->
+ {Docs,NewPos} = render_element(E,State,0,Ind,D),
+ {["\n",Docs],NewPos};
+render_element({p,[{class,What}],Content},State,Pos,Ind,D) ->
+ {Docs,_} = render_docs(Content, [p|State], 0, Ind+2, D),
+ trimnlnl([pad(Ind - Pos),string:titlecase(What),":\n",Docs]);
+render_element({p,_,Content},State,Pos,Ind,D) ->
+ trimnlnl(render_docs(Content, [p|State], Pos, Ind,D));
+
+render_element(Elem,State,Pos,Ind,D) when Pos < Ind ->
+% io:format("Pad: ~p~n",[Ind - Pos]),
+ {Docs,NewPos} = render_element(Elem,State,Ind,Ind,D),
+
+ {[pad(Ind - Pos), Docs],NewPos};
+
+render_element({code,_,Content},[pre|_] = State,Pos,Ind,D) ->
+ %% When code is within a pre we don't emit any underline
+ render_docs(Content, [code|State], Pos, Ind,D);
+render_element({code,_,Content},State,Pos,Ind,D) ->
+ Underline = sansi(underline),
+ {Docs, NewPos} = render_docs(Content, [code|State], Pos, Ind,D),
+ {[Underline,Docs,ransi(underline)], NewPos};
+
+render_element({i,_,Content},State,Pos,Ind,D) ->
+ %% Just ignore i as ansi does not have cursive style
+ render_docs(Content, State, Pos, Ind,D);
+
+render_element({br,[],[]},_State,_Pos,_Ind,_D) ->
+ nl("");
+
+render_element({em,_,Content},State,Pos,Ind,D) ->
+ Bold = sansi(bold),
+ {Docs, NewPos} = render_docs(Content, State, Pos, Ind,D),
+ {[Bold,Docs,ransi(bold)], NewPos};
+
+render_element({pre,_,Content},State,Pos,Ind,D) ->
+ %% For pre we make sure to respect the newlines in pre
+ trimnlnl(render_docs(Content, [pre|State], Pos, Ind+2, D));
+
+render_element({ul,[{class,"types"}],Content},State,_Pos,Ind,D) ->
+ {Docs, _} = render_docs(Content, [types|State], 0, Ind+2, D),
+ trimnlnl(["Types:\n", Docs]);
+render_element({li,Attr,Content},[types|_] = State,Pos,Ind,C) ->
+ Doc =
+ case {proplists:get_value(name, Attr),proplists:get_value(class, Attr)} of
+ {undefined,Class} when Class =:= undefined; Class =:= "type" ->
+ %% Inline html for types
+ render_docs(Content,[type|State],Pos,Ind,C);
+ {_,"description"} ->
+ %% Inline html for type descriptions
+ render_docs(Content,[type|State],Pos,Ind+2,C);
+ {Name,_} ->
+ %% Try to render from type metadata
+ case render_type_signature(list_to_atom(Name),C) of
+ undefined when Content =:= [] ->
+ %% Failed and no content, emit place-holder
+ {["-type ",Name,"() :: term()."],0};
+ undefined ->
+ %% Failed with metadata, render the content
+ render_docs(Content,[type|State],Pos,Ind,C);
+ Type ->
+ %% Emit the erl_pp typespec
+ {Type,0}
+ end
+ end,
+ trimnl(Doc);
+render_element({ul,[],Content},State,Pos,Ind,D) ->
+ render_docs(Content, [l|State], Pos, Ind,D);
+render_element({ol,[],Content},State,Pos,Ind,D) ->
+ %% For now ul and ol does the same thing
+ render_docs(Content, [l|State], Pos, Ind,D);
+render_element({li,[],Content},[l | _] = State, Pos, Ind,D) ->
+ Bullet = get_bullet(State, proplists:get_value(encoding, D#config.io_opts)),
+ BulletLen = string:length(Bullet),
+ {Docs, _NewPos} = render_docs(Content, [li | State], Pos + BulletLen,Ind + BulletLen, D),
+ trimnlnl([Bullet,Docs]);
+
+render_element({dl,_,Content},State,Pos,Ind,D) ->
+ render_docs(Content, [dl|State], Pos, Ind,D);
+render_element({dt,_,Content},[dl | _] = State,Pos,Ind,D) ->
+ Underline = sansi(underline),
+ {Docs, _NewPos} = render_docs(Content, [li | State], Pos, Ind, D),
+ {[Underline,Docs,ransi(underline),":","\n"], 0};
+render_element({dd,_,Content},[dl | _] = State,Pos,Ind,D) ->
+ trimnlnl(render_docs(Content, [li | State], Pos, Ind + 2, D));
+
+render_element(B, State, Pos, Ind,#config{ io_columns = Cols }) when is_binary(B) ->
+ case lists:member(pre,State) of
+ true ->
+ Pre = string:replace(B,"\n",["\n",pad(Ind)],all),
+ {Pre, Pos + lastline(Pre)};
+ _ ->
+ render_words(split_to_words(B),State,Pos,Ind,[[]],Cols)
+ end;
+
+render_element({Tag,Attr,Content}, State, Pos, Ind,D) ->
+ throw({unhandled,{Tag,Attr,Content,Pos,Ind}}),
+ render_docs(Content, State, Pos, Ind,D).
+
+render_words(Words,[_,types|State],Pos,Ind,Acc,Cols) ->
+ %% When we render words and are in the types->type state we indent
+ %% the extra lines two additional spaces to make it look nice
+ render_words(Words,State,Pos,Ind+2,Acc,Cols);
+render_words([Word|T],State,Pos,Ind,Acc,Cols) when is_binary(Word) ->
+ WordLength = string:length(Word),
+ NewPos = WordLength + Pos,
+ if
+ NewPos > (Cols - 10 - Ind) ->
+ %% Word does not fit, time to add a newline and also pad to Indent level
+ render_words(T,State,WordLength+Ind+1,Ind,[[[pad(Ind), Word]]|Acc],Cols);
+ true ->
+ %% Word does fit on line
+ [Line | LineAcc] = Acc,
+ %% Add + 1 to length for space
+ NewPosSpc = NewPos+1,
+ render_words(T,State,NewPosSpc,Ind,[[Word|Line]|LineAcc],Cols)
+ end;
+render_words([],_State,Pos,_Ind,Acc,_Cols) ->
+ Lines = lists:join(
+ $\n,lists:map(fun(RevLine) ->
+ Line = lists:reverse(RevLine),
+ lists:join($ ,Line)
+ end,lists:reverse(Acc))),
+ {iolist_to_binary(Lines), Pos}.
+
+render_type_signature(Name, #config{ docs = #docs_v1{ metadata = #{ types := AllTypes }}}) ->
+ case [Type || Type = {TName,_} <- maps:keys(AllTypes), TName =:= Name] of
+ [] ->
+ undefined;
+ Types ->
+ [erl_pp:attribute(maps:get(Type, AllTypes)) || Type <- Types]
+ end.
+
+%% Pad N spaces, disabling any ansi formatting while doing so
+pad(N) ->
+ Pad = lists:duplicate(N," "),
+ case ansi() of
+ undefined ->
+ Pad;
+ Ansi ->
+ ["\033[0m",Pad,Ansi]
+ end.
+
+get_bullet(_State,latin1) ->
+ <<" * ">>;
+get_bullet(State,unicode) ->
+ %% Fancy bullet point logic!
+ lists:nth(length([l || l <- State]),
+ [<<" • "/utf8>>,<<" ○ "/utf8>>,
+ <<" ◼ "/utf8>>,<<" ◻ "/utf8>>]).
+
+% Look for the length of the last line of a string
+lastline(Str) ->
+ LastStr = case string:find(Str,"\n",trailing) of
+ nomatch ->
+ Str;
+ Match ->
+ tl(string:next_codepoint(Match))
+ end,
+ string:length(LastStr).
+
+split_to_words(B) ->
+ binary:split(B,[<<" ">>],[global]).
+
+%% These functions make sure that we trim extra newlines added
+%% by the renderer. For example if we do <li><p></p></li>
+%% that would add 4 \n at after the last </li>. This is trimmed
+%% here to only be 2 \n
+trimnlnl({Chars, _Pos}) ->
+ nl(nl(string:trim(Chars, trailing, "\n")));
+trimnlnl(Chars) ->
+ nl(nl(string:trim(Chars, trailing, "\n"))).
+trimnl({Chars, _Pos}) ->
+ nl(string:trim(Chars, trailing, "\n")).
+nl({Chars, _Pos}) ->
+ nl(Chars);
+nl(Chars) ->
+ {[Chars,"\n"],0}.
+
+%% We keep the current ansi state in the pdict so that we know
+%% what to disable and enable when doing padding
+init_ansi(#config{ io_opts = Opts }) ->
+ %% We use this as our heuristic to see if we should print ansi or not
+ case {application:get_env(kernel, shell_docs_ansi),
+ proplists:is_defined(echo, Opts) andalso
+ proplists:is_defined(expand_fun, Opts),
+ os:type()} of
+ {{ok,false}, _, _} ->
+ put(ansi, noansi);
+ {{ok,true}, _, _} ->
+ put(ansi, []);
+ {_, _, {win32,_}} ->
+ put(ansi, noansi);
+ {_, true,_} ->
+ put(ansi, []);
+ {_, false,_} ->
+ put(ansi, noansi)
+ end.
+
+clean_ansi() ->
+ case get(ansi) of
+ [] -> erase(ansi);
+ noansi -> erase(ansi)
+ end,
+ ok.
+
+%% Set ansi
+sansi(Type) -> sansi(Type, get(ansi)).
+sansi(_Type, noansi) ->
+ [];
+sansi(Type, Curr) ->
+ put(ansi,[Type | Curr]),
+ ansi(get(ansi)).
+
+%% Clear ansi
+ransi(Type) -> ransi(Type, get(ansi)).
+ransi(_Type, noansi) ->
+ [];
+ransi(Type, Curr) ->
+ put(ansi,proplists:delete(Type,Curr)),
+ case ansi(get(ansi)) of
+ undefined ->
+ "\033[0m";
+ Ansi ->
+ Ansi
+ end.
+
+ansi() -> ansi(get(ansi)).
+ansi(noansi) -> undefined;
+ansi(Curr) ->
+ case lists:usort(Curr) of
+ [] ->
+ undefined;
+ [bold] ->
+ "\033[;1m";
+ [underline] ->
+ "\033[;;4m";
+ [bold,underline] ->
+ "\033[;1;4m"
+ end.
diff --git a/lib/stdlib/src/stdlib.app.src b/lib/stdlib/src/stdlib.app.src
index 0f5e6941da..9334a06ca2 100644
--- a/lib/stdlib/src/stdlib.app.src
+++ b/lib/stdlib/src/stdlib.app.src
@@ -92,6 +92,7 @@
sets,
shell,
shell_default,
+ shell_docs,
slave,
sofs,
string,
diff --git a/lib/stdlib/test/Makefile b/lib/stdlib/test/Makefile
index 7f7a0834ba..4b923c5fe2 100644
--- a/lib/stdlib/test/Makefile
+++ b/lib/stdlib/test/Makefile
@@ -34,11 +34,6 @@ MODULES= \
escript_SUITE \
ets_SUITE \
ets_tough_SUITE \
- expand_test \
- expand_test1 \
- unicode_expand \
- ExpandTestCaps \
- ExpandTestCaps1 \
filelib_SUITE \
file_sorter_SUITE \
filename_SUITE \
@@ -79,6 +74,7 @@ MODULES= \
supervisor_deadlock \
naughty_child \
shell_SUITE \
+ shell_docs_SUITE \
supervisor_SUITE \
supervisor_bridge_SUITE \
sys_SUITE \
diff --git a/lib/stdlib/test/edlin_expand_SUITE.erl b/lib/stdlib/test/edlin_expand_SUITE.erl
index 5c2b1965ba..dd6b25a531 100644
--- a/lib/stdlib/test/edlin_expand_SUITE.erl
+++ b/lib/stdlib/test/edlin_expand_SUITE.erl
@@ -27,6 +27,7 @@
-include_lib("common_test/include/ct.hrl").
init_per_testcase(_Case, Config) ->
+ cleanup(),
Config.
end_per_testcase(_Case, _Config) ->
@@ -44,10 +45,6 @@ groups() ->
[].
init_per_suite(Config) ->
- (catch code:delete(expand_test)),
- (catch code:delete(expand_test1)),
- (catch code:delete('ExpandTestCaps')),
- (catch code:delete('ExpandTestCaps1')),
Config.
end_per_suite(_Config) ->
@@ -59,9 +56,15 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+cleanup() ->
+ [try
+ code:purge(M),
+ code:delete(M)
+ catch _:_ -> ok end || M <- [expand_test, expand_test1,
+ 'ExpandTestCaps', 'ExpandTestCaps2']].
normal(Config) when is_list(Config) ->
- {module,expand_test} = c:l(expand_test),
+ {module,expand_test} = compile_and_load(Config,expand_test),
%% These tests might fail if another module with the prefix
%% "expand_" happens to also be loaded.
{yes, "test:", []} = do_expand("expand_"),
@@ -80,8 +83,8 @@ normal(Config) when is_list(Config) ->
%% Normal module name, some function names using quoted atoms.
quoted_fun(Config) when is_list(Config) ->
- {module,expand_test} = c:l(expand_test),
- {module,expand_test1} = c:l(expand_test1),
+ {module,expand_test} = compile_and_load(Config,expand_test),
+ {module,expand_test1} = compile_and_load(Config,expand_test1),
%% should be no colon after test this time
{yes, "test", []} = do_expand("expand_"),
{no, [], []} = do_expand("expandXX_"),
@@ -112,7 +115,7 @@ quoted_fun(Config) when is_list(Config) ->
ok.
quoted_module(Config) when is_list(Config) ->
- {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
+ {module,'ExpandTestCaps'} = compile_and_load(Config,'ExpandTestCaps'),
{yes, "Caps':", []} = do_expand("'ExpandTest"),
{no,[],
[{"a_fun_name",1},
@@ -125,8 +128,8 @@ quoted_module(Config) when is_list(Config) ->
ok.
quoted_both(Config) when is_list(Config) ->
- {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
- {module,'ExpandTestCaps1'} = c:l('ExpandTestCaps1'),
+ {module,'ExpandTestCaps'} = compile_and_load(Config,'ExpandTestCaps'),
+ {module,'ExpandTestCaps1'} = compile_and_load(Config,'ExpandTestCaps1'),
%% should be no colon (or quote) after test this time
{yes, "Caps", []} = do_expand("'ExpandTest"),
{no,[],[{"'#weird-fun-name'",0},
@@ -229,7 +232,7 @@ check_trailing([I|Str], ArityStr, Suffix, Dots) ->
end.
unicode(Config) when is_list(Config) ->
- {module,unicode_expand} = c:l('unicode_expand'),
+ {module,unicode_expand} = compile_and_load(Config,'unicode_expand'),
{no,[],[{"'кlирилли́ческий атом'",0},
{"'кlирилли́ческий атом'",1},
{"'кlирилли́ческий атомB'",1},
@@ -253,3 +256,10 @@ do_expand(String) ->
do_format(StringList) ->
lists:flatten(edlin_expand:format_matches(StringList)).
+
+compile_and_load(Config,Module) ->
+ Filename = filename:join(
+ proplists:get_value(data_dir,Config),
+ atom_to_list(Module)),
+ {ok,Module,Bin} = compile:file(Filename, [binary]),
+ code:load_binary(Module, Filename, Bin).
diff --git a/lib/stdlib/test/ExpandTestCaps.erl b/lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps.erl
index 7fb1107ae0..7fb1107ae0 100644
--- a/lib/stdlib/test/ExpandTestCaps.erl
+++ b/lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps.erl
diff --git a/lib/stdlib/test/ExpandTestCaps1.erl b/lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps1.erl
index 400a17b137..400a17b137 100644
--- a/lib/stdlib/test/ExpandTestCaps1.erl
+++ b/lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps1.erl
diff --git a/lib/stdlib/test/expand_test.erl b/lib/stdlib/test/edlin_expand_SUITE_data/expand_test.erl
index 5544923a12..5544923a12 100644
--- a/lib/stdlib/test/expand_test.erl
+++ b/lib/stdlib/test/edlin_expand_SUITE_data/expand_test.erl
diff --git a/lib/stdlib/test/expand_test1.erl b/lib/stdlib/test/edlin_expand_SUITE_data/expand_test1.erl
index abefaefcfd..abefaefcfd 100644
--- a/lib/stdlib/test/expand_test1.erl
+++ b/lib/stdlib/test/edlin_expand_SUITE_data/expand_test1.erl
diff --git a/lib/stdlib/test/unicode_expand.erl b/lib/stdlib/test/edlin_expand_SUITE_data/unicode_expand.erl
index 41f741fa84..41f741fa84 100644
--- a/lib/stdlib/test/unicode_expand.erl
+++ b/lib/stdlib/test/edlin_expand_SUITE_data/unicode_expand.erl
diff --git a/lib/stdlib/test/shell_docs_SUITE.erl b/lib/stdlib/test/shell_docs_SUITE.erl
new file mode 100644
index 0000000000..69cca467d0
--- /dev/null
+++ b/lib/stdlib/test/shell_docs_SUITE.erl
@@ -0,0 +1,88 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2004-2019. 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%
+%%
+-module(shell_docs_SUITE).
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+ init_per_group/2,end_per_group/2]).
+-export([init_per_testcase/2, end_per_testcase/2]).
+
+-export([render/1]).
+
+-include_lib("kernel/include/eep48.hrl").
+
+init_per_testcase(_Case, Config) ->
+ Config.
+
+end_per_testcase(_Case, Config) ->
+ ok.
+
+suite() ->
+ [{timetrap,{minutes,10}}].
+
+all() ->
+ [render].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+render(_Config) ->
+ Avail = code:all_available(),
+ [render_test(Mod) || {Mod,_,_} <- Avail],
+ ok.
+render_test(Mod) when is_list(Mod) ->
+ render_test(list_to_atom(Mod));
+render_test(Mod) ->
+ try
+ case code:get_doc(Mod) of
+ {error,missing} ->
+ ok;
+ {ok, #docs_v1{ docs = Docs } = D} ->
+ shell_docs:render(Mod, D),
+ shell_docs:render_type(Mod, D),
+ [try
+ shell_docs:render(Mod, F, A, D)
+ catch _E:R:ST ->
+ io:format("Failed to render ~p:~p/~p~n~p:~p~n~p~n",
+ [Mod,F,A,R,ST,shell_docs:get_doc(Mod,F,A)]),
+ erlang:raise(error,R,ST)
+ end || {F,A} <- Mod:module_info(exports)],
+ [try
+ shell_docs:render_type(Mod, T, A, D)
+ catch _E:R:ST ->
+ io:format("Failed to render type ~p:~p/~p~n~p:~p~n~p~n",
+ [Mod,T,A,R,ST,shell_docs:get_type_doc(Mod,T,A)]),
+ erlang:raise(error,R,ST)
+ end || {{type,T,A},_,_,_,_} <- Docs]
+ end
+ catch throw:R:ST ->
+ io:format("Failed to render ~p~n~p:~p~n",[Mod,R,ST]),
+ exit(R)
+ end.
diff --git a/lib/syntax_tools/doc/src/Makefile b/lib/syntax_tools/doc/src/Makefile
index b799c76177..3ff5b92cd7 100644
--- a/lib/syntax_tools/doc/src/Makefile
+++ b/lib/syntax_tools/doc/src/Makefile
@@ -28,21 +28,10 @@ VSN=$(SYNTAX_TOOLS_VSN)
APPLICATION=syntax_tools
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
-# Man page source directory (with .erl files)
-# ----------------------------------------------------
-SRC_DIR = $(ERL_TOP)/lib/syntax_tools/src
-INC_DIR = $(ERL_TOP)/lib/syntax_tools/include
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = \
+EDOC_REF3_FILES = \
epp_dodger.xml \
erl_comment_scan.xml \
erl_prettypr.xml \
@@ -56,100 +45,20 @@ XML_REF3_FILES = \
prettypr.xml
XML_PART_FILES = part.xml
-XML_CHAPTER_FILES = chapter.xml
+EDOC_CHAPTER_FILE = chapter.xml
XML_NOTES_FILES = notes.xml
BOOK_FILES = book.xml
-
XML_FILES=\
$(BOOK_FILES) $(XML_PART_FILES) $(XML_APPLICATION_FILES) \
$(XML_NOTES_FILES)
-XML_GEN_FILES = $(XML_REF3_FILES:%=$(XMLDIR)/%) $(XML_CHAPTER_FILES:%=$(XMLDIR)/%)
-
-# ----------------------------------------------------
-INFO_FILE = ../../info
-
-HTML_FILES = \
- $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+HTML_EXTRA_FILES = ../../examples/demo.erl
-EXAMPLES_DIR = ../../examples
-EXAMPLES = $(EXAMPLES_DIR)/demo.erl
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
+XML_GEN_FILES = $(XML_CHAPTER_FILES:%=$(XMLDIR)/%)
TOP_SPECS_FILE = specs.xml
# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-SPECS_FLAGS = -I../../include
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: man pdf html
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES)
-
-$(XML_REF3_FILES:%=$(XMLDIR)/%):
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript \
- -dir $(XMLDIR) $(SRC_DIR)/$(@:$(XMLDIR)/%.xml=%.erl)
-
-$(XML_CHAPTER_FILES:%=$(XMLDIR)/%):
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) \
- -chapter -dir $(XMLDIR) ../overview.edoc
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-xml: $(XML_REF3_FILES) $(XML_CHAPTER_FILES)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(XML_REF3_FILES) $(XML_CHAPTER_FILES) *.html
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECDIR)/*
- rm -f errs core *~
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DIR) "$(RELSYSDIR)/examples"
- $(INSTALL_DATA) $(EXAMPLES) "$(RELSYSDIR)/doc/html"
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/tftp/doc/src/Makefile b/lib/tftp/doc/src/Makefile
index 5d76799e41..e5ff8010fe 100644
--- a/lib/tftp/doc/src/Makefile
+++ b/lib/tftp/doc/src/Makefile
@@ -26,12 +26,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# ----------------------------------------------------
include ../../vsn.mk
VSN=$(TFTP_VSN)
-
-# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
+APPLICATION=tftp
# ----------------------------------------------------
# Target Specs
@@ -59,97 +54,6 @@ XML_FILES = \
$(XML_REF3_FILES) \
$(XML_APPLICATION_FILES)
-# GIF_FILES = tftp.gif
-
-
-# ----------------------------------------------------
-
-HTML_FILES = \
- $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-EXTRA_FILES = \
- $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_REF6_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-# ----------------------------------------------------
-# FLAGS
# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-ldocs: local_docs
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-clean clean_docs: clean_html clean_man clean_pdf
- rm -rf $(XMLDIR)
- rm -f errs core *~
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-clean_pdf:
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
-
-clean_html:
- rm -rf $(TOP_HTML_FILES) $(HTMLDIR)/*
-
-clean_man:
- rm -f $(MAN3_FILES)
-
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
-info:
- @echo "GIF_FILES:\n$(GIF_FILES)"
- @echo ""
- @echo "EXTRA_FILES:\n$(EXTRA_FILES)"
- @echo ""
- @echo "HTML_FILES:\n$(HTML_FILES)"
- @echo ""
- @echo "TOP_HTML_FILES:\n$(TOP_HTML_FILES)"
- @echo ""
- @echo "XML_REF3_FILES:\n$(XML_REF3_FILES)"
- @echo ""
- @echo "XML_REF6_FILES:\n$(XML_REF6_FILES)"
- @echo ""
- @echo "XML_CHAPTER_FILES:\n$(XML_CHAPTER_FILES)"
- @echo ""
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/tools/doc/src/Makefile b/lib/tools/doc/src/Makefile
index 5ff4fe3113..f9bb2314a8 100644
--- a/lib/tools/doc/src/Makefile
+++ b/lib/tools/doc/src/Makefile
@@ -28,11 +28,6 @@ VSN=$(TOOLS_VSN)
APPLICATION=tools
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
@@ -60,89 +55,25 @@ XML_CHAPTER_FILES = \
xref_chapter.xml \
notes.xml
-
BOOK_FILES = book.xml
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-GIF_FILES = \
+IMAGE_FILES = \
venn1.gif \
venn2.gif
-# ----------------------------------------------------
-
-HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-INFO_FILE = ../../info
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
-
TOP_SPECS_FILE = specs.xml
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-
-TOOLS_SRC=$(ERL_TOP)/lib/tools/src
-TOOLS_INCLUDE=$(ERL_TOP)/lib/tools/include
-
-SPECS_FLAGS = -I$(TOOLS_SRC) -I$(TOOLS_INCLUDE)
+NO_CHUNKS = erlang_mode.xml
# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECDIR)/*
- rm -f errs core *~
# erlang_mode doesn't have erlang source so we generate a dummy file for it.
$(SPECDIR)/specs_erlang_mode.xml:
- echo '<module name="erlang_mode"/>' > $(SPECDIR)/specs_erlang_mode.xml
+ $(gen_verbose)echo '<module name="erlang_mode"/>' > $(SPECDIR)/specs_erlang_mode.xml
# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/tools/doc/src/cprof.xml b/lib/tools/doc/src/cprof.xml
index b6af8b6d28..791fb06ba1 100644
--- a/lib/tools/doc/src/cprof.xml
+++ b/lib/tools/doc/src/cprof.xml
@@ -44,7 +44,7 @@
</p>
<p>Since breakpoints are used there is no need for special
compilation of any module to be profiled. For now these
- breakpoints can only be set on BEAM code so <term id="BIF"></term>s
+ breakpoints can only be set on BEAM code so BIFs
cannot be call count traced.
</p>
<p>The size of the call counters is the host machine word
diff --git a/lib/tools/doc/src/xref.xml b/lib/tools/doc/src/xref.xml
index 25ae9b6159..91f152e678 100644
--- a/lib/tools/doc/src/xref.xml
+++ b/lib/tools/doc/src/xref.xml
@@ -46,7 +46,7 @@
<em>Module data</em>,
which are extracted from BEAM files, include local functions,
exported functions, local calls and external calls. By default,
- calls to built-in functions (<term id="BIF"></term>) are ignored, but
+ calls to built-in functions (BIF) are ignored, but
if the option <c>builtins</c>, accepted by some of this
module's functions, is set to <c>true</c>, calls to BIFs
are included as well. It is the analyzing OTP version that
diff --git a/lib/tools/emacs/Makefile b/lib/tools/emacs/Makefile
index b7775d1c8c..c19ad3668c 100644
--- a/lib/tools/emacs/Makefile
+++ b/lib/tools/emacs/Makefile
@@ -65,7 +65,9 @@ clean:
rm -f $(TARGET_FILES) $(ELC_FILES)
rm -f errs core *~
-docs:
+DOC_TARGETS?=man
+
+docs: $(DOC_TARGETS)
# ----------------------------------------------------
# Release Target
@@ -77,14 +79,8 @@ release_spec: opt
$(INSTALL_DATA) $(EL_FILES) $(README_FILES) \
"$(RELSYSDIR)/emacs"
-ifeq ($(DOCTYPE),pdf)
-release_docs_spec:
-else
-ifeq ($(DOCTYPE),ps)
-release_docs_spec:
-else
-release_docs_spec: docs
+release_man_spec:
$(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
$(INSTALL_DATA) $(MAN_FILES) "$(RELEASE_PATH)/man/man3"
-endif
-endif
+
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
diff --git a/lib/tools/src/eprof.erl b/lib/tools/src/eprof.erl
index 86e3d3a8b8..ee72bad234 100644
--- a/lib/tools/src/eprof.erl
+++ b/lib/tools/src/eprof.erl
@@ -28,7 +28,7 @@
stop/0,
dump/0, dump_data/0,
start_profiling/1, start_profiling/2, start_profiling/3,
- profile/1, profile/2, profile/3, profile/4, profile/5,
+ profile/1, profile/2, profile/3, profile/4, profile/5, profile/6,
stop_profiling/0,
analyze/0, analyze/1, analyze/2, analyze/4,
log/1]).
diff --git a/lib/wx/doc/src/Makefile b/lib/wx/doc/src/Makefile
index f66d63f63b..1d2b9824f4 100644
--- a/lib/wx/doc/src/Makefile
+++ b/lib/wx/doc/src/Makefile
@@ -37,10 +37,11 @@ ModsNoExt = $(ErlMods:%.erl=%) $(GenMods:%.erl=%)
# Release directory specification
XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = $(ErlMods:%.erl=%.xml) $(GenMods:%.erl=%.xml)
+EDOC_REF3_FILES = $(ErlMods:%.erl=%.xml)
+XML_REF3_FILES = $(GenMods:%.erl=%.xml)
XML_PART_FILES = part.xml
-XML_CHAPTER_FILES = chapter.xml
+EDOC_CHAPTER_FILE = chapter.xml
XML_NOTES_FILES = notes.xml
BOOK_FILES = book.xml
@@ -50,101 +51,27 @@ XML_FILES = \
$(XML_PART_FILES) $(XML_NOTES_FILES)
XML_GEN_FILES = \
- $(XML_CHAPTER_FILES:%=$(XMLDIR)/%) \
- $(XML_REF3_FILES:%=$(XMLDIR)/%) \
- $(XML_APPLICATION_FILES:%=$(XMLDIR)/%)
+ $(XML_APPLICATION_FILES:%=$(XMLDIR)/%) \
+ $(XML_REF3_FILES:%=$(XMLDIR)/%)
-# ----------------------------------------------------
-INFO_FILE = ../../info
-
-HTML_FILES = \
- $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
+EDOC_FLAGS=-i ../../src -preprocess true -sort_functions false
TOP_SPECS_FILE = specs.xml
# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-SPECS_FLAGS = -I../../include -I../../src
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
# Targets
# ----------------------------------------------------
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
+include $(ERL_TOP)/make/doc.mk
-man: $(MAN3_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-xml: $(XML_REF3_FILES) $(XML_CHAPTER_FILES)
+$(XMLDIR)/%.xml: $(APP_SRC_DIR)/gen/%.erl
+ $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript \
+ -def vsn $(VSN) $(EDOC_FLAGS) -dir $(XMLDIR) $<
-ref_man.xml: ref_man.xml.src
+ref_man.xml: ref_man.xml.src Makefile
@echo Preparing $@
@cat ref_man.xml.src > $@
@for d in $(ModsNoExt); do \
echo " <xi:include href=\"$$d.xml\"/>" >> $@ ; \
done
@echo "</application>" >> $@
-
-$(ErlMods:%.erl=$(XMLDIR)/%.xml):
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript \
- -def vsn $(VSN) -preprocess true -sort_functions false -dir $(XMLDIR) \
- ../../src/$(@:$(XMLDIR)/%.xml=%.erl)
-
-$(GenMods:%.erl=$(XMLDIR)/%.xml):
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript \
- -def vsn $(VSN) -i ../../src -preprocess true -sort_functions false -dir $(XMLDIR) \
- ../../src/gen/$(@:$(XMLDIR)/%.xml=%.erl)
-
-$(XML_CHAPTER_FILES:%=$(XMLDIR)/%): ../overview.edoc
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript \
- -def vsn $(VSN) -chapter -dir $(XMLDIR) $<
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f $(SPECDIR)/*
- rm -f errs core *~ ../html/edoc-info
- rm -f $(XML_GEN_FILES) *.html
-
-# ----------------------------------------------------
-# Release Target
-# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3_FILES) "$(RELEASE_PATH)/man/man3"
-
-release_spec:
-
-release_tests_spec:
diff --git a/lib/xmerl/doc/src/Makefile b/lib/xmerl/doc/src/Makefile
index 0def492246..5effc831e2 100644
--- a/lib/xmerl/doc/src/Makefile
+++ b/lib/xmerl/doc/src/Makefile
@@ -28,33 +28,19 @@ VSN=$(XMERL_VSN)
APPLICATION=xmerl
# ----------------------------------------------------
-# Release directory specification
-# ----------------------------------------------------
-RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
-
-# ----------------------------------------------------
-# Help application directory specification
-# ----------------------------------------------------
-
-EDOC_DIR = $(ERL_TOP)/lib/edoc
-SYNTAX_TOOLS_DIR = $(ERL_TOP)/lib/syntax_tools
-
-# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
XMERL_DIR = $(ERL_TOP)/lib/$(APPLICATION)/src
-XMERL_MODULES = \
- xmerl_scan \
- xmerl \
- xmerl_xs \
- xmerl_eventp \
- xmerl_xpath \
- xmerl_xsd
-
+EDOC_REF3_FILES = \
+ xmerl_scan.xml \
+ xmerl.xml \
+ xmerl_xs.xml \
+ xmerl_eventp.xml \
+ xmerl_xpath.xml \
+ xmerl_xsd.xml
XML_APPLICATION_FILES = ref_man.xml
-XMERL_XML_FILES = $(XMERL_MODULES:%=$(XMLDIR)/%.xml)
XML_REF3_FILES = xmerl_sax_parser.xml
@@ -85,97 +71,15 @@ EXAMPLE_FILES = people2.txt people.txt motorcycles.txt motorcycles_dtd.txt \
new_motorcycles.txt new_motorcycles2.txt result_export.html \
motorcycles2.txt result_xs.html motorcycles2html.erl
+HTML_EXTRA_FILES = $(EXAMPLE_FILES) $(HTML_EXAMPLE_FILES) $(HTML_STYLESHEET_FILES)
+
XML_FILES= \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-XML_GEN_FILES = $(XMERL_XML_FILES) $(XML_CHAPTER_GEN_FILES)
-
-# ----------------------------------------------------
-INFO_FILE = ../../info
-
-HTML_FILES = $(XML_REF_MAN:%.xml=$(HTMLDIR)/%.html) \
- $(XML_HTML_FILES:%.xml=$(HTMLDIR)/%.html) \
- $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
-
-
-MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3) $(XMERL_MODULES:%=$(MAN3DIR)/%.3)
-MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
-
-HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
-
-TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
-
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-XML_FLAGS +=
-DVIPS_FLAGS +=
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-$(HTMLDIR)/%.gif: %.gif
- $(INSTALL_DATA) $< $@
-
-docs: pdf html man
-
-$(TOP_PDF_FILE): $(XML_FILES)
-
-pdf: $(TOP_PDF_FILE)
-
-html: gifs $(HTML_REF_MAN_FILE)
-
-$(XMERL_XML_FILES):
- $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -dir $(XMLDIR) $(XMERL_DIR)/$(@:$(XMLDIR)/%.xml=%.erl)
-
-man: $(MAN3_FILES) $(MAN6_FILES)
-
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
-
-xml: $(XMERL_XML_FILES)
-
-debug opt:
-
-clean clean_docs:
- rm -rf $(HTMLDIR)/*
- rm -rf $(XMLDIR)
- rm -f $(MAN3DIR)/*
- rm -f $(MAN6DIR)/*
- rm -f $(XMERL_XML_FILES)
- rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
- rm -f errs core *~
-
-
-info:
- @echo "XML_PART_FILES: $(XML_PART_FILES)"
- @echo "XML_APPLICATION_FILES: $(XML_APPLICATION_FILES)"
- @echo "XMERL_XML_FILES: $(XMERL_XML_FILES)"
- @echo "XMERL_MODULES: $(XMERL_MODULES)"
- @echo "HTML_FILES: $(HTML_FILES)"
- @echo "HTMLDIR: $(HTMLDIR)"
- @echo "DEFAULT_GIF_FILES: $(DEFAULT_GIF_FILES)"
- @echo "DEFAULT_HTML_FILES: $(DEFAULT_HTML_FILES)"
+XML_GEN_FILES = $(XML_CHAPTER_GEN_FILES)
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
-include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
- $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(HTMLDIR)/* \
- "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(EXAMPLE_FILES) $(HTML_EXAMPLE_FILES) $(HTML_STYLESHEET_FILES) "$(RELSYSDIR)/doc/html"
- $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
- $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
- $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
-
-release_spec:
-
-
-
-release_tests_spec:
+include $(ERL_TOP)/make/doc.mk
diff --git a/lib/xmerl/doc/src/xmerl_sax_parser.xml b/lib/xmerl/doc/src/xmerl_sax_parser.xml
index 2390779028..0c5ecb5c2e 100644
--- a/lib/xmerl/doc/src/xmerl_sax_parser.xml
+++ b/lib/xmerl/doc/src/xmerl_sax_parser.xml
@@ -56,7 +56,7 @@
<taglist>
<tag><c>{continuation_fun, ContinuationFun}</c></tag>
<item>
- <seealso marker="#ContinuationFun/1">ContinuationFun</seealso> is a call back function to decide what to do if
+ <seealso marker="#Module:ContinuationFun/1">ContinuationFun</seealso> is a call back function to decide what to do if
the parser runs into EOF before the document is complete.
</item>
<tag><c>{continuation_state, term()}</c></tag>
@@ -65,7 +65,7 @@
</item>
<tag><c>{event_fun, EventFun}</c></tag>
<item>
- <seealso marker="#EventFun/3">EventFun</seealso> is the call back function for parser events.
+ <seealso marker="#Module:EventFun/3">EventFun</seealso> is the call back function for parser events.
</item>
<tag><c>{event_state, term()}</c></tag>
<item>
@@ -381,7 +381,7 @@
<funcs>
<func>
- <name since="">ContinuationFun(State) -> {NewBytes, NewState}</name>
+ <name since="">Module:ContinuationFun(State) -> {NewBytes, NewState}</name>
<fsummary>Continuation call back function.</fsummary>
<type>
<v>State = NewState = term()</v>
@@ -402,7 +402,7 @@
</func>
<func>
- <name since="">EventFun(Event, Location, State) -> NewState</name>
+ <name since="">Module:EventFun(Event, Location, State) -> NewState</name>
<fsummary>Event call back function.</fsummary>
<type>
<v>Event = event()</v>
diff --git a/make/doc.mk b/make/doc.mk
new file mode 100644
index 0000000000..cbba59b60d
--- /dev/null
+++ b/make/doc.mk
@@ -0,0 +1,215 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1997-2019. 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%
+#
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+ifeq ($(APPLICATION),erts)
+RELSYSDIR = $(RELEASE_PATH)/$(APPLICATION)-$(VSN)
+else
+RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
+endif
+RELCHUNKSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
+
+APP_DIR = $(ERL_TOP)/lib/$(APPLICATION)
+APP_SRC_DIR = $(APP_DIR)/src
+APP_EBIN_DIR = $(APP_DIR)/src
+
+# ----------------------------------------------------
+HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
+ $(XML_HTML_FILES:%.xml=$(HTMLDIR)/%.html) \
+ $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
+
+XML_ALL_REF3_FILES = $(XML_REF3_FILES) $(EDOC_REF3_FILES)
+XML_CHAPTER_FILES += $(EDOC_CHAPTER_FILE)
+XML_GEN_FILES += $(EDOC_REF3_FILES:%=$(XMLDIR)/%) $(EDOC_CHAPTER_FILE:%=$(XMLDIR)/%)
+
+INFO_FILE = ../../info
+
+MAN1_FILES = $(XML_REF1_FILES:%_cmd.xml=$(MAN1DIR)/%.1)
+MAN2_FILES = $(XML_REF2_FILES:%.xml=$(MAN1DIR)/%.2)
+MAN3_FILES = $(XML_ALL_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
+MAN4_FILES = $(XML_REF4_FILES:%.xml=$(MAN4DIR)/%.4)
+MAN5_FILES = $(XML_REF5_FILES:%.xml=$(MAN4DIR)/%.5)
+MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
+MAN7_FILES = $(MIB_REF7_FILES:$(MIBSDIR)/%.mib=$(MAN7DIR)/%.7)
+
+HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
+
+TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+
+ifneq ($(TOP_SPECS_FILE),)
+SPECS_FILES = $(XML_ALL_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
+endif
+
+ifneq ($(strip $(CHUNKSDIR)),)
+_create_chunksdir_dirs := $(shell mkdir -p $(CHUNKSDIR))
+endif
+CHUNK_REF3_FILES = $(filter-out $(NO_CHUNKS), $(XML_ALL_REF3_FILES))
+CHUNK_FILES = $(CHUNK_REF3_FILES:%.xml=$(CHUNKSDIR)/%.chunk)
+
+ERL_CHUNK_FILES = $(patsubst $(APP_EBIN_DIR)/%.BEAM,$(CHUNKSDIR)/%.chunk,$(wildcard $(APP_EBIN_DIR)/*.beam))
+EMPTY_CHUNK_FILES = $(filter-out $(NO_CHUNKS:%.xml=$(CHUNKSDIR)/%.chunk) $(CHUNK_FILES), $(ERL_CHUNK_FILES))
+
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+SPECS_FLAGS = -I$(ERL_TOP)/lib -I$(ERL_TOP)/lib/*/include -I$(ERL_TOP)/lib/*/src
+
+
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+$(HTMLDIR)/%.gif: %.gif
+ $(INSTALL_DATA) $< $@
+$(HTMLDIR)/%.png: %.png
+ $(INSTALL_DATA) $< $@
+$(HTMLDIR)/%.jpg: %.jpg
+ $(INSTALL_DATA) $< $@
+
+DOC_TARGETS?=man pdf html chunks
+
+docs: $(INFO_FILE) $(DOC_TARGETS)
+
+$(TOP_PDF_FILE): $(XML_FILES)
+
+pdf: $(TOP_PDF_FILE)
+
+html: images $(HTML_REF_MAN_FILE) $(HTMLDIR)/$(APPLICATION).eix
+
+man: $(MAN1_FILES) $(MAN2_FILES) $(MAN3_FILES) $(MAN4_FILES) $(MAN5_FILES) $(MAN6_FILES) $(MAN7_FILES)
+
+chunks: $(CHUNK_FILES) $(EMPTY_CHUNK_FILES)
+
+images: $(IMAGE_FILES:%=$(HTMLDIR)/%)
+
+$(EDOC_REF3_FILES:%=$(XMLDIR)/%): $(APP_SRC_DIR)/$(@:$(XMLDIR)/%.xml=%.erl)
+ $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript \
+ -def vsn $(VSN) $(EDOC_FLAGS) -dir $(XMLDIR) $(APP_SRC_DIR)/$(@:$(XMLDIR)/%.xml=%.erl)
+$(XMLDIR)/$(EDOC_CHAPTER_FILE): ../overview.edoc
+ $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript -def vsn $(VSN) \
+ -chapter -dir $(XMLDIR) $<
+
+info:
+ @echo "XML_APPLICATION_FILES: $(XML_APPLICATION_FILES)"
+ @echo "XML_REF1_FILES: $(XML_REF1_FILES)"
+ @echo "XML_REF2_FILES: $(XML_REF2_FILES)"
+ @echo "XML_REF3_FILES: $(XML_ALL_REF3_FILES)"
+ @echo "XML_REF4_FILES: $(XML_REF4_FILES)"
+ @echo "XML_REF5_FILES: $(XML_REF5_FILES)"
+ @echo "XML_REF6_FILES: $(XML_REF6_FILES)"
+ @echo "XML_REF7_FILES: $(XML_REF7_FILES)"
+ @echo "XML_PART_FILES: $(XML_PART_FILES)"
+ @echo "XML_CHAPTER_FILES: $(XML_CHAPTER_FILES)"
+ @echo "BOOK_FILES: $(BOOK_FILES)"
+
+debug opt lcnt:
+
+clean clean_docs: clean_xml clean_pdf clean_html clean_man clean_chunks
+ rm -rf $(EXTRA_FILES)
+ rm -f errs core *~ *.eps
+
+clean_pdf:
+ rm -f $(PDFDIR)/*
+
+clean_man:
+ rm -f $(MAN1DIR)/* $(MAN3DIR)/* $(MAN4DIR)/* $(MAN6DIR)/*
+
+clean_xml:
+ rm -f $(SPECDIR)/*
+ rm -rf $(XMLDIR)
+
+clean_html:
+ rm -rf $(HTMLDIR)/*
+
+clean_chunks:
+ rm -f $(CHUNKDIR)/*
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+$(RELSYSDIR):
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+
+release_pdf_spec: pdf
+ $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
+ $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
+
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
+ $(INSTALL_DIR_DATA) $(HTMLDIR) "$(RELSYSDIR)/doc/html"
+ifneq ($(HTML_EXTRA_FILES),)
+ $(INSTALL_DATA) $(HTML_EXTRA_FILES) "$(RELSYSDIR)/doc/html"
+endif
+
+release_chunks_spec: chunks
+ifneq ($(CHUNK_FILES),)
+ $(INSTALL_DIR) "$(RELCHUNKSDIR)/doc/chunks"
+ $(INSTALL_DATA) $(CHUNKSDIR)/* "$(RELCHUNKSDIR)/doc/chunks"
+endif
+
+release_man_spec: man
+ifneq ($(MAN1_FILES),)
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1"
+ $(INSTALL_DATA) $(MAN1DIR)/* "$(RELEASE_PATH)/man/man1"
+endif
+ifneq ($(MAN2_FILES),)
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man2"
+ $(INSTALL_DATA) $(MAN2DIR)/* "$(RELEASE_PATH)/man/man2"
+endif
+ifneq ($(MAN3_FILES),)
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
+ $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
+endif
+ifneq ($(MAN4_FILES),)
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man4"
+ $(INSTALL_DATA) $(MAN4_FILES) "$(RELEASE_PATH)/man/man4"
+endif
+ifneq ($(MAN5_FILES),)
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man5"
+ $(INSTALL_DATA) $(MAN5_FILES) "$(RELEASE_PATH)/man/man5"
+endif
+ifneq ($(MAN6_FILES),)
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
+ $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
+endif
+ifneq ($(MAN7_FILES),)
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man7"
+ $(INSTALL_DATA) $(MAN7_FILES) "$(RELEASE_PATH)/man/man7"
+endif
+
+release_docs_spec: $(RELSYSDIR) $(INFO_FILE) $(DOC_TARGETS:%=release_%_spec)
+ $(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR)
+ifneq ($(STANDARDS),)
+ $(INSTALL_DIR) "$(RELEASE_PATH)/doc/standard"
+ $(INSTALL_DATA) $(STANDARDS) "$(RELEASE_PATH)/doc/standard"
+endif
+
+release_spec:
+
+.PHONY: clean clean_xml clean_html clean_man clean_pdf \
+ debug opt info \
+ docs images html man pdf chunks \
+ release_docs_spec release_spec
diff --git a/make/otp.mk.in b/make/otp.mk.in
index 54ec6b7a53..5c1032c894 100644
--- a/make/otp.mk.in
+++ b/make/otp.mk.in
@@ -226,13 +226,16 @@ MAN1DIR = $(DOCDIR)/man1
MAN2DIR = $(DOCDIR)/man2
MAN3DIR = $(DOCDIR)/man3
MAN4DIR = $(DOCDIR)/man4
+MAN5DIR = $(DOCDIR)/man5
MAN6DIR = $(DOCDIR)/man6
+MAN7DIR = $(DOCDIR)/man7
MAN9DIR = $(DOCDIR)/man9
TEXDIR = .
SPECDIR = $(DOCDIR)/specs
XMLDIR = $(DOCDIR)/xml
+CHUNKSDIR = $(DOCDIR)/chunks
ifeq ($(CSS_FILE),)
CSS_FILE = otp_doc.css
@@ -268,7 +271,7 @@ DEFAULT_HTML_FILES = \
$(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.kwc) \
$(HTMLDIR)/index.html
-DEFAULT_GIF_FILES = $(HTMLDIR)/min_head.gif
+DEFAULT_GIF_FILES =
#
# Flags & Commands
@@ -287,14 +290,18 @@ SPECS_ESRC = ../../src
endif
SPECS_EXTRACTOR=$(DOCGEN)/priv/bin/specs_gen.escript
# Extract specifications and types from Erlang source files (-spec, -type)
-$(SPECDIR)/specs_%.xml: $(SPECS_ESRC)/%.erl
+$(SPECDIR)/specs_%.xml: $(SPECS_ESRC)/%.erl $(TOP_SPECS_FILE)
$(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) -o$(dir $@) $<
-$(SPECDIR)/specs_%.xml: $(SPECS_ESRC)/gen/%.erl
+$(SPECDIR)/specs_%.xml: $(SPECS_ESRC)/gen/%.erl $(TOP_SPECS_FILE)
$(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) -o$(dir $@) $<
MANXSLTARGS=--stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_man_entities -path .
-$(MAN1DIR)/%.1 $(MAN2DIR)/%.2 $(MAN4DIR)/%.4 $(MAN4DIR)/%.5 $(MAN9DIR)/%.9: $(XMLDIR)/%.xml
+$(MAN1DIR)/%.1: $(XMLDIR)/%_cmd.xml
+ $(gen_verbose)date=`date +"%B %e, %Y"`; \
+ xsltproc --output "$@" $(MANXSLTARGS) $(DOCGEN)/priv/xsl/db_man.xsl $<
+
+$(MAN2DIR)/%.2 $(MAN4DIR)/%.4 $(MAN4DIR)/%.5 $(MAN9DIR)/%.9: $(XMLDIR)/%.xml
$(gen_verbose)date=`date +"%B %e, %Y"`; \
xsltproc --output "$@" $(MANXSLTARGS) $(DOCGEN)/priv/xsl/db_man.xsl $<
@@ -319,3 +326,12 @@ $(XMLDIR)/%.xml: $(XMLDIR)/%.xmlsrc
$(PDFDIR)/%.pdf: %.fo
$(FOP) -c $(FOP_CONFIG) -cache $(ERL_TOP)/make/$(TARGET)/fop-fonts.cache -fo $< -pdf $@
+
+$(CHUNKSDIR)/%.chunk: $(XMLDIR)/%.xml ../../ebin/%.beam $(DOCGEN)/priv/bin/chunk.escript
+ $(gen_verbose)escript $(DOCGEN)/priv/bin/chunk.escript $^ $@
+
+$(CHUNKSDIR)/%.chunk: $(XMLDIR)/%.xml ../../preloaded/ebin/%.beam $(DOCGEN)/priv/bin/chunk.escript
+ $(gen_verbose)escript $(DOCGEN)/priv/bin/chunk.escript $^ $@
+
+$(CHUNKSDIR)/%.chunk: ../../ebin/%.beam $(DOCGEN)/priv/bin/chunk.escript
+ $(gen_verbose)escript $(DOCGEN)/priv/bin/chunk.escript $^ $@
diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk
index c629a7d143..fe1f5103ca 100644
--- a/make/otp_release_targets.mk
+++ b/make/otp_release_targets.mk
@@ -60,7 +60,7 @@ endif
ifeq ($(TOPDOC),)
-$(HTMLDIR)/index.html: $(XML_GEN_FILES) $(SPECS_FILES)
+$(HTMLDIR)/index.html: $(XML_GEN_FILES) $(SPECS_FILES) $(TOP_SPECS_FILE)
$(gen_verbose)date=`date +"%B %e, %Y"`; \
$(XSLTPROC) --noout \
--stringparam outdir $(HTMLDIR) \
@@ -83,7 +83,7 @@ $(HTMLDIR)/index.html: $(XML_GEN_FILES) $(SPECS_FILES)
endif
-$(HTMLDIR)/users_guide.html: $(XML_GEN_FILES)
+$(HTMLDIR)/users_guide.html: $(XML_GEN_FILES) $(TOP_SPECS_FILE)
$(gen_verbose)date=`date +"%B %e, %Y"`; \
$(XSLTPROC) --noout \
--stringparam outdir $(HTMLDIR) \
@@ -104,7 +104,7 @@ $(HTMLDIR)/users_guide.html: $(XML_GEN_FILES)
-path $(DOCGEN)/priv/dtd_html_entities \
$(DOCGEN)/priv/xsl/db_html.xsl $(XMLDIR)/book.xml
-%.fo: $(XML_GEN_FILES) $(SPECS_FILES)
+%.fo: $(XML_GEN_FILES) $(SPECS_FILES) $(TOP_SPECS_FILE)
$(gen_verbose)date=`date +"%B %e, %Y"`; \
$(XSLTPROC) \
--stringparam docgen "$(DOCGEN)" \
@@ -142,8 +142,6 @@ $(HTMLDIR)/$(APPLICATION).eix: $(XML_GEN_FILES) $(SPECS_FILES)
-path $(DOCGEN)/priv/dtd_html_entities \
$(DOCGEN)/priv/xsl/db_eix.xsl $(XMLDIR)/book.xml > $@
-docs: $(HTMLDIR)/$(APPLICATION).eix
-
## Here awk is used to find all xi:include files in $(BOOK_FILES)
## Then we look into all those files check for xi:includes
BOOK_XI_INC_FILES:=$(foreach file,$(BOOK_FILES),$(shell awk -F\" '/xi:include/ {print $$2}' $(file))) $(BOOK_FILES)
@@ -207,15 +205,21 @@ endif
# Standard release target
# ----------------------------------------------------
+pdf man chunks html: $(XML_GEN_FILES) $(SPECS_FILES) $(TOP_SPECS_FILE)
+release_man_spec: man
+release_pdf_spec: pdf
+release_chunks_spec: chunks
+release_html_spec: html
+
ifeq ($(TESTROOT),)
-release release_docs release_tests release_html:
+release release_docs release_tests:
$(MAKE) $(MFLAGS) RELEASE_PATH=$(OTP_DEFAULT_RELEASE_PATH) \
$(TARGET_MAKEFILE) $@_spec
else
-release release_docs release_tests release_html:
+release release_docs release_tests:
$(MAKE) $(MFLAGS) RELEASE_PATH="$(TESTROOT)" $(TARGET_MAKEFILE) $@_spec
endif
diff --git a/scripts/build-otp b/scripts/build-otp
index afab1f9136..582c209e4d 100755
--- a/scripts/build-otp
+++ b/scripts/build-otp
@@ -58,6 +58,8 @@ if [ "$1" = "docs" ]; then
DOC_TARGET=${TRAVIS_TAG:-$DOC_TARGET}
TESTROOT=$PWD/$DOC_TARGET do_and_log "Building documentation" make release_docs
do_and_log "Linting documentation" make xmllint
+ do_and_log "Test chunks" erlc lib/stdlib/test/shell_docs_SUITE.erl &&
+ ct_run -no_auto_compile -suite shell_docs_SUITE -case render
# The code below prepares this build to be used as a deploy to
# github pages for documentation.
if [ "$TRAVIS_PULL_REQUEST" = "false" -a "$TRAVIS_TAG" = "" -a "$TRAVIS_REPO_SLUG" = "erlang/otp" ]; then
diff --git a/scripts/run-dialyzer b/scripts/run-dialyzer
index 34724a8ca0..dbc3c121d4 100755
--- a/scripts/run-dialyzer
+++ b/scripts/run-dialyzer
@@ -12,6 +12,7 @@ filter () {
}
ALL_APPLICATIONS=$(ls -d -1 lib/*/ | sed 's:^lib\|/::g')
+ALL_APPLICATIONS="erts $ALL_APPLICATIONS"
echo "All applications: $ALL_APPLICATIONS" |tr '\n' ' ' && echo ""
BASE_PLT="compiler crypto erts hipe kernel stdlib syntax_tools"
diff --git a/system/doc/definitions/term.defs.xml b/system/doc/definitions/term.defs.xml
deleted file mode 100644
index fdcda4eddb..0000000000
--- a/system/doc/definitions/term.defs.xml
+++ /dev/null
@@ -1,1525 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!DOCTYPE terms SYSTEM "terms.dtd">
-
-<terms>
- <term>
- <id>agent</id>
- <shortdef>agent</shortdef>
- <def>
-An entity that terminates a management protocol in the Network Element. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>API</id>
- <shortdef>API</shortdef>
- <def>
-Application Programming Interface. The interface towards an application. Usually this is a set of functions available, but can also be a set of messages sent to or from an application. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>application</id>
- <shortdef>application</shortdef>
- <def>
-A collection of resources which is required to offer a specific service. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>appmon</id>
- <shortdef>Application Monitor</shortdef>
- <def>
-A graphical node and application process tree viewer. See also appmon. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>Appmon</id>
- <shortdef>Appmon</shortdef>
- <def>
-Application name for the Application Monitor within Erlang/OTP. A graphical node and process viewer. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>app callback</id>
- <shortdef>application callback module</shortdef>
- <def>
-A module which is called when the application is started, and when it has stopped. Every application has one application callback module. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>AC</id>
- <shortdef>application controller</shortdef>
- <def>
-A process which coordinates all operations on applications. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>app master</id>
- <shortdef>application master</shortdef>
- <def>
-The application master is a process that monitors the application. It is provided by the Erlang run-time system. Every application has an application master process. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>.app file</id>
- <shortdef>application resource file</shortdef>
- <def>
-Specifies the resources required by the application and how the application should be started. Every application has one application resource file, called AppName.app. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>arity</id>
- <shortdef>arity</shortdef>
- <def>
-Denotes the number of arguments to a function. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>ASN.1</id>
- <shortdef>ASN.1</shortdef>
- <def>
-Abstract Syntax Notation One - an ITU-T and ISO standard notation for describing data formats used in communication protocols. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>ASN.1 Compiler</id>
- <shortdef>ASN.1 Compiler</shortdef>
- <def>
-The Erlang/OTP ASN.1 Compiler translates an ASN.1 module into a corresponding Erlang module with encode and decode functions. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>atom</id>
- <shortdef>atom</shortdef>
- <def>
-An atom is a constant. Atoms always starts with a lower case letter (a-z) and are terminated by a non-alphanumeric character - otherwise they must be quoted (enclosed in ' '). An atom is a data type in Erlang, used to enhance the legibility of programs. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>atomicity</id>
- <shortdef>atomicity</shortdef>
- <def>
-Atomicity refers to the "all or nothing" property. If a transaction succeeds (i.e. commits), then all its effects on the data is captured in the database. If the transaction does not succeed (i.e. aborts), then none of its effect on the data is captured in the database. In other words, the transaction processing algorithm guarantees that the database will not reflect a partitial effect of a transaction. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>attach</id>
- <shortdef>attach</shortdef>
- <def>
-The debugger may attach to a process. When attached, the debugger may show process details, such as message queues and variable bindings. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>behaviour</id>
- <shortdef>behaviour</shortdef>
- <def>
-A "pattern of design" which can be used to build applications and processes in an applications. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>BIF</id>
- <shortdef>BIF</shortdef>
- <def>
-Built-In Functions which perform operations that are impossible or inefficient to program in Erlang itself. Are defined in the module Erlang in the application kernel </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>binary</id>
- <shortdef>binary</shortdef>
- <def>
-A data type in Erlang which is used to store an area of untyped memory. Binaries are used for efficiently handling large quantities of untyped data. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>boolean</id>
- <shortdef>boolean</shortdef>
- <def>
-A common data type in programming and specification languages. The value can be either true or false. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>boot file</id>
- <shortdef>boot file</shortdef>
- <def>
-A binary file with extension .boot which is read during start of an Erlang node. See SASL User's Guide for more info. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>break point</id>
- <shortdef>break point</shortdef>
- <def>
-By setting a break point using the debugger, the user specifies a position in the source code of a module where execution is to be suspended and control transferred to the debugger. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>CAshort</id>
- <shortdef>CA</shortdef>
- <def>
-See Certification Authority. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>CA certificate</id>
- <shortdef>CA certificate</shortdef>
- <def>
-A certificate containing a CA's public key. Network entities use this public key to verify certificates signed with the CA's private key. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>callback function</id>
- <shortdef>callback function</shortdef>
- <def>
-A callback function is a function exported from a callback module, that a generic behaviour calls to perform a specific task. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>callback module</id>
- <shortdef>callback module</shortdef>
- <def>
-A callback module is a module that implements the specific parts of a generic behaviour. The generic behaviour specifies which callback functions must be exported from the module. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>certificate</id>
- <shortdef>certificate</shortdef>
- <def>
-A file used for authenticating network entities under the SSL protocol. A certificate contains information about its owner (called the subject) and issuer, plus the owner's public key and a signature made by a CA. Network entities verify these signatures using CA certificates. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>CAlong</id>
- <shortdef>Certification Authority (CA)</shortdef>
- <def>
-A trusted third party whose purpose is to sign certificates for network entities it has authenticated using secure means. Other network entities can check the signature to verify that a CA has authenticated the bearer of a certificate. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>CSRlong</id>
- <shortdef>Certificate Signing Request (CSR)</shortdef>
- <def>
-An unsigned certificate for submission to a Certification Authority, which signs it with its private key. Once the CSR is signed, it becomes a certificate. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>child</id>
- <shortdef>child</shortdef>
- <def>
-A supervised process. See also permanent, transient, temporary child. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>cipher</id>
- <shortdef>cipher</shortdef>
- <def>
-A system of encryption. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>ClearCase</id>
- <shortdef>ClearCase</shortdef>
- <def>
-A configuration management system from Rational Software Corporation. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>client-server model</id>
- <shortdef>client-server model</shortdef>
- <def>
-A model where there is a server, which manages some resource, and a number of clients which send requests to the server to access the resource. The client-server model is one of the basic programming techniques for coordinating the activities of several parallel processes. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>cover</id>
- <shortdef>Coverage Analyser</shortdef>
- <def>
-Module name for the coverage analyser tool, located in the Tools application. </def>
- <resp>gunilla</resp>
- </term>
- <term>
- <id>CORBAlong</id>
- <shortdef>Common Object Request Broker Architecture (CORBA)</shortdef>
- <def>
-A specification of an architecture for a distributed object system </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>CORBA</id>
- <shortdef>Common Object Request Broker Architecture (CORBA)</shortdef>
- <def>
-A specification of an architecture for a distributed object system </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>compiler</id>
- <shortdef>compiler</shortdef>
- <def>
-A compiler is a translator. A common type of compilers are those who takes source code for a programming language and translates it into code that is executable on a specific platform. E.g. the Erlang compiler translates Erlang source code to an intermediary code that is executable by the Erlang Run Time System. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>consistency</id>
- <shortdef>consistency</shortdef>
- <def>
-Consistency refers to the requirement that, given a consistent initial database state, the state of the database after the successful execution of a transaction is also consistent; that is, a transaction transforms the database from a consistent state to another consistent state. Database consistency may be defined as a set of rules or constraints. If the execution of a transaction causes the consistency constraints to be violated, the transaction is not accepted (and thus aborted) by the system. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>cookie</id>
- <shortdef>cookie</shortdef>
- <def>
-A magic cookie is a secret atom assigned to each Erlang node. The Erlang nodes in a distributed system must know each others cookies in order to authorize each other for communication </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>CORBAshort</id>
- <shortdef>CORBA</shortdef>
- <def>
-See Common Object RequestBroker Architecture. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>Coverage Analyser</id>
- <shortdef>Coverage Analyser</shortdef>
- <def>
-A tool which provides a set of functions for coverage analysis of Erlang programs, i.e observing how many times each line or function are executed. See also cover. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>coverage analysis</id>
- <shortdef>coverage analysis</shortdef>
- <def>
-The task of determining which lines, or how many lines of code, has actually been executed. Useful for determining the completeness of test suites. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>cross reference tool</id>
- <shortdef>cross reference tool</shortdef>
- <def>
-A tool that can be used for finding dependencies between functions, modules, applications and releases. The Erlang/OTP cross reference tool is called xref and is part of the Tools application. </def>
- <resp>gunilla</resp>
- </term>
- <term>
- <id>CSRshort</id>
- <shortdef>CSR</shortdef>
- <def>
-See Certificate Signing Request. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>data type</id>
- <shortdef>data type</shortdef>
- <def>
-The data types in Erlang are numbers, atoms, tuples, lists, pids, funs, records, ports, references and binaries. The values of Erlang data types can be stored in variables. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>DBMSlong</id>
- <shortdef>Database Management System (DBMS)</shortdef>
- <def>
-A database is a collection of data and a DBMS is a system which manages the database. Applications accesses the database through the database management system. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>DBMSshort</id>
- <shortdef>DBMS</shortdef>
- <def>
-See Database Management System. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>Debugger</id>
- <shortdef>Debugger</shortdef>
- <def>
-An Erlang/OTP tool which provides mechanisms which makes it possible to see what happens during the execution of code in specified modules, or when processes crash. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>dets</id>
- <shortdef>dets</shortdef>
- <def>
-A module within the stdlib application, which provides a term storage, and which is used as the underlying file storage mechanism by the Mnesia DBMS. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>dirty operations</id>
- <shortdef>dirty operations</shortdef>
- <def>
-Functions which manipulate data in a DBMS, without using transactions. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>distributed application</id>
- <shortdef>distributed application</shortdef>
- <def>
-An application which runs on one of several nodes. May be restarted on another node. (See local application.) </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>DNSshort</id>
- <shortdef>DNS</shortdef>
- <def>
-See Domain Name System. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>Docbuilder</id>
- <shortdef>Docbuilder</shortdef>
- <def>
-The documentation system used in Erlang/OTP. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>DNSlong</id>
- <shortdef>Domain Name System (DNS)</shortdef>
- <def>
-DNS is a service that map names to internet addresses </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>DTD</id>
- <shortdef>DTD</shortdef>
- <def>
-Document Type Definition as defined in SGML. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>durability</id>
- <shortdef>durability</shortdef>
- <def>
-If a transaction succeeds, then its effect on the data is persistently captured, and will survive subsequent system failures resulting in loss of data in volatile memory. Durability is usually enforced by first writing modified data to some non-volatile memory (usually disc), before a transaction is allowed to commit. If there is a system failure, the state of the non-volatile memory must be recovered to reflect the effect of all and only committed transactions. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>Emacs</id>
- <shortdef>Emacs</shortdef>
- <def>
-A widely used text editor which allows customization of its behaviour. An Erlang mode for Emacs is included in the Erlang deliverables. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Emacs for Erlang</id>
- <shortdef>Emacs for Erlang</shortdef>
- <def>
-A tool which provides a major mode for editing Erlang source files in Emacs. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>encaps</id>
- <shortdef>encapsulation</shortdef>
- <def>
-Data can be encapsulated into another data element. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>eprof</id>
- <shortdef>eprof</shortdef>
- <def>
-A module in the tools application. See Profiler. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>erl</id>
- <shortdef>erl</shortdef>
- <def>
-The command which starts an Erlang run-time system. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>erl_interface</id>
- <shortdef>erl_interface library</shortdef>
- <def>
-A thread safe library with C-functions which makes it possible to write a C-program which appears as one of the nodes in a system of distributed Erlang nodes. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Erlang</id>
- <shortdef>Erlang</shortdef>
- <def>
-Erlang is a functional programming language intended for designing large industrial soft real time systems. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Erlang emulator</id>
- <shortdef>Erlang emulator</shortdef>
- <def>
-Another word for Erlang Virtual Machine. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>ERTSlong</id>
- <shortdef>Erlang Run Time System</shortdef>
- <def>
-A fundamental part of Erlang/OTP which contains the Erlang Virtual Machine, the kernel and stdlib applications. The Erlang Run Time System is a mandatory part which all other Erlang applications are dependent upon. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Erlang VM</id>
- <shortdef>Erlang Virtual Machine</shortdef>
- <def>
-The virtual machine, which makes Erlang/OTP work together with a specific OS/HW platform. The Erlang Virtual Machine is available on several different platforms. The Erlang Virtual Machine is the glue which makes it possible to run an Erlang application on any platform without change. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>ERTSshort</id>
- <shortdef>ERTS</shortdef>
- <def>
-See Erlang Run Time System. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>ETS</id>
- <shortdef>ETS</shortdef>
- <def>
-Erlang Term Storage tables. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>EVAshort</id>
- <shortdef>EVA</shortdef>
- <def>
-See Event and Alarm handling application </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>EVAlong</id>
- <shortdef>Event and Alarm handling application (EVA)</shortdef>
- <def>
-An application that consists of Fault Management functionality, such as sending and logging of events and alarms. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>event handler</id>
- <shortdef>event handler</shortdef>
- <def>
-A module exporting functions which can process events sent to an event manager process. The event handler is a behaviour of type gen_event. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>event manager</id>
- <shortdef>event manager</shortdef>
- <def>
-A process to which events of a certain category is sent. gen_event handler can be installed in the event manager. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>exit signal</id>
- <shortdef>exit signal</shortdef>
- <def>
-A signal which is sent from a terminating process to the processes and ports it is linked to. An EXIT signal has the following format: {'EXIT', Exiting_Process_Id, Reason}. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>foo</id>
- <shortdef>foo</shortdef>
- <def>
-Algebraic place holder. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>FSM</id>
- <shortdef>FSM</shortdef>
- <def>
-Finite State Machine. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>fun</id>
- <shortdef>fun</shortdef>
- <def>
-A data type, introduced in Erlang 4.4, which represent functional objects. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>function</id>
- <shortdef>function</shortdef>
- <def>
-Erlang programs are written entirely in terms of modules with functions. A function can have arguments and does always return a result. A function can be exported which makes it available for calls from other modules. Non exported functions can only be called internally within the module. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Gateway</id>
- <shortdef>gateway</shortdef>
- <def>
-A server which acts as an intermediary for some other server. Unlike a proxy, a gateway receives requests as if it were the origin server for the requested resource; the requesting client may not be aware that it is communicating with a gateway. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>gen_event</id>
- <shortdef>gen_event</shortdef>
- <def>
-A behaviour used for programming event handling mechanisms, such as alarm handlers, error loggers, and plug-and-play handlers. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>gen_fsm</id>
- <shortdef>gen_fsm</shortdef>
- <def>
-A behaviour used for programming finite state machines. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>gen_server</id>
- <shortdef>gen_server</shortdef>
- <def>
-A behaviour used for programming client-server processes. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>gterm</id>
- <shortdef>Global Glossary Database</shortdef>
- <def>
-A glossary database used to list common acronymns and defintions etc. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>xref</id>
- <shortdef>xref</shortdef>
- <def>
-A cross reference tool that can be used for finding dependencies between functions, modules, applications and releases. Part of the Tools application. </def>
- <resp>gunilla</resp>
- </term>
- <term>
- <id>GSlong</id>
- <shortdef>Graphics System</shortdef>
- <def>
-A library module which provides a graphics interface for Erlang. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>grid</id>
- <shortdef>grid</shortdef>
- <def>
-A multi-column object which is used to display tables. (Graphics System.) </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>GSshort</id>
- <shortdef>GS</shortdef>
- <def>
-See Graphics System. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>GS Contributions</id>
- <shortdef>GS Contributions</shortdef>
- <def>
-Unsupported user supplied tools which are included with the Erlang/OTP software release. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>GUI</id>
- <shortdef>GUI</shortdef>
- <def>
-Graphical User Interface </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>Home Directory</id>
- <shortdef>Home Directory</shortdef>
- <def>
-The position of a user account in the file system. The Home Directory is automatically passed to the Erlang run-time system at startup. On Unix the contents of the environment variable "HOME" is passed. Om Win32 the concatenation of the environment variables "HOMEDRIVE" and "HOMEPATH" is passed, or if these variables are not set, the value returned by the Win32 API function "GetWindowsDirectory" is passed. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>host name</id>
- <shortdef>host name</shortdef>
- <def>
-The name of a machine on a network, e.g. erlang.ericsson.se. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>HTML</id>
- <shortdef>HTML</shortdef>
- <def>
-Hypertext Markup Language. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>HTTP</id>
- <shortdef>HTTP</shortdef>
- <def>
-Hypertext Transfer Protocol. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>HTTPS</id>
- <shortdef>HTTPS</shortdef>
- <def>
-The Hypertext Transport Protocol, Secure, the standard SSL communication mechanism of the World Wide Web. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>IDLshort</id>
- <shortdef>IDL</shortdef>
- <def>
-See Interface Description Language. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>IDLlong</id>
- <shortdef>Interface Description Language (IDL)</shortdef>
- <def>
-The interface specification language created by OMG. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>indexing</id>
- <shortdef>indexing</shortdef>
- <def>
-Fast lookup using an (usually enumerated) key. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>I1</id>
- <shortdef>INETS</shortdef>
- <def>
-The Internet Services application </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>initial call</id>
- <shortdef>initial call</shortdef>
- <def>
-The first call to an interpreted function (when using the Interpreter). </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>instrumentation function</id>
- <shortdef>instrumentation function</shortdef>
- <def>
-A function used to implement a Managed Object, i.e. give access to the real resources behind an MO. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>IDLlong</id>
- <shortdef>Interface Description Language (IDL)</shortdef>
- <def>
-The interface specification language created by OMG. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>interpreter</id>
- <shortdef>interpreter</shortdef>
- <def>
-An application which provides mechanisms which make it possible to see what happens during the execution of code in specified (interpreted) modules, or when processes crash. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>isolation</id>
- <shortdef>isolation</shortdef>
- <def>
-A transaction executes as if no other concurrent transactions are executing, and thus its execution results are equivalent to those obtained by executing database transactions serially. A system which maintains transaction isolation is also said to be enforcing serializability. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>kernel</id>
- <shortdef>kernel</shortdef>
- <def>
-An application which contains file servers, code servers and other code necessary for the Erlang run-time system. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>key</id>
- <shortdef>key</shortdef>
- <def>
-A file containing the value that must be fed into an algorithm in order to encrypt or decrypt a message. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>key pair</id>
- <shortdef>key pair</shortdef>
- <def>
-A set of two keys used in public key cryptography. One is the public key used to encrypt data, and the other is the private key necessary to decrypt the same data. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>list</id>
- <shortdef>list</shortdef>
- <def>
-Terms separated by commas and enclosed in square brackets [ ] are called lists. A list is a data type in Erlang, used for storing a variable number of terms. It is dynamically sized. The first element of the list is referred to as the head of the list, and the remainer of the list as the tail. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>list box</id>
- <shortdef>list box </shortdef>
- <def>
-A list of labels with optional scroll bars attached. (Graphics System.) </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>lc</id>
- <shortdef>list comprehension</shortdef>
- <def>
-A language construct in Erlang which are analogous to set comprehensions in Zermelo-Frankel set theory. Analogous to the 'setof' and 'findall' predicates in Prolog. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>local application</id>
- <shortdef>local application</shortdef>
- <def>
-An application which runs on one node and which are always started at the local node only. (See distributed application.) </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>manager</id>
- <shortdef>manager</shortdef>
- <def>
-An entity that terminates a management protocol in the Network Management Station. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>Master Agent</id>
- <shortdef>Master Agent</shortdef>
- <def>
-The SNMP agent system consists of one Master Agent which terminates the SNMP protocol </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>MIB</id>
- <shortdef>Management Information Base (MIB)</shortdef>
- <def>
-An abstract definition of the management information available through a management interface in a system. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>matching</id>
- <shortdef>matching</shortdef>
- <def>
-See pattern matching. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>message queue</id>
- <shortdef>message queue</shortdef>
- <def>
-The queue of not yet received messages that are in the mailbox of a process. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>Mnemosyne</id>
- <shortdef>Mnemosyne</shortdef>
- <def>
-Mnemosyne was the query language of Mnesia up to the R11B release. Supersed by QLC.</def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>Mnesia</id>
- <shortdef>Mnesia</shortdef>
- <def>
-Mnesia is a distributed Database Management System, appropriate for telecommunications applications and other applications with need of continuous operation and soft real-time properties. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>MIBshort</id>
- <shortdef>MIB</shortdef>
- <def>
-See Management Information Base. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>MIME</id>
- <shortdef>MIME</shortdef>
- <def>
-Multi-purpose Internet Mail Extensions. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>MOlong</id>
- <shortdef>Managed Object (MO)</shortdef>
- <def>
-The abstract management information defined in a MIB. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>MO</id>
- <shortdef>MO</shortdef>
- <def>
-Managed Object; The abstract management information defined in a MIB. </def>
- <resp>nibe</resp>
- </term>
- <term>
- <id>MOshort</id>
- <shortdef>MO</shortdef>
- <def>
-See Managed Object. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>module</id>
- <shortdef>module</shortdef>
- <def>
-Module is the unit for compilation and for loading in Erlang. A Module contains a module declaration, export declarations and code representing the functions in the module. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>NCSA</id>
- <shortdef>NCSA</shortdef>
- <def>
-The National Center for Supercomputing Applications. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>NEshort</id>
- <shortdef>NE</shortdef>
- <def>
-See Network Element. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>NElong</id>
- <shortdef>Network Element</shortdef>
- <def>
-In OTP, the Network Element is the entire distributed OTP system, meaning that the distributed OTP system is managed as one entity. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>NE</id>
- <shortdef>NE</shortdef>
- <def>
-Network Element; In OTP, the Network Element is the entire distributed OTP system, meaning that the distributed OTP system is managed as one entity. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>NMSlong</id>
- <shortdef>Network Management Station (NMS)</shortdef>
- <def>
-The place where the operator manages the network. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>NMS</id>
- <shortdef>NMS</shortdef>
- <def>
-Network Management Station; The place where the operator manages the network. </def>
- <resp>nibe</resp>
- </term>
- <term>
- <id>NMSshort</id>
- <shortdef>NMS</shortdef>
- <def>
-See Network Management Station. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>node</id>
- <shortdef>node</shortdef>
- <def>
-An executing Erlang run-time system which can communicate with other Erlang run-time systems. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>node name</id>
- <shortdef>node name</shortdef>
- <def>
-A node name is an atom constructed as the concatenation of a name supplied by the user, an "@" character, and the name of the host where the node is executing. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>notation</id>
- <shortdef>notation</shortdef>
- <def>
-How things are written. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>notification</id>
- <shortdef>notification</shortdef>
- <def>
-Information of an event. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>NROFF</id>
- <shortdef>NROFF</shortdef>
- <def>
-A text formatting language for line printer quality output devices that runs on the UNIX operating system. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>number</id>
- <shortdef>number</shortdef>
- <def>
-A data type in Erlang. Are subdivided into integers, for storing natural numbers, or floats, for storing real numbers. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>OMGlong</id>
- <shortdef>Object Managment Group (OMG)</shortdef>
- <def>
-A standardisation group for all specifications in the area of CORBA. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>OMGshort</id>
- <shortdef>OMG</shortdef>
- <def>
-Object Managment Group. </def>
- <resp>lars</resp>
- </term>
- <term>
- <id>OTP</id>
- <shortdef>OTP</shortdef>
- <def>
-Open Telecom Platform </def>
- <resp>mike</resp>
- </term>
- <term>
- <id>os_mon</id>
- <shortdef>os_mon</shortdef>
- <def>
-An application which monitors the behaviour of the underlying operating system </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>parser generator</id>
- <shortdef>parser generator</shortdef>
- <def>
-A tool for making compilers which takes a grammar description as input and generates a complete program (a parser) which recognizes input which complies with the grammar. YECC is a parser generator included in the Erlang/OTP. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>pass phrase</id>
- <shortdef>pass phrase</shortdef>
- <def>
-The word or phrase which authenticates the user who is authorized to use private key file. The pass phrase prevents unauthorized users from starting, restarting, or reconfiguring the server. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>pattern matching</id>
- <shortdef>pattern matching</shortdef>
- <def>
-A basic mechanism in Erlang for assigning values to variables and for controlling the flow of a program. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>permanent child</id>
- <shortdef>permanent child</shortdef>
- <def>
-A supervised process which always is restarted when it dies. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>Pid</id>
- <shortdef>Pid</shortdef>
- <def>
-Process Identifier. A data type in Erlang for storing process references. The process identity of the process displayed in the line. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Pman</id>
- <shortdef>Pman</shortdef>
- <def>
-Module and application name for the Process Trace Tool. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>point</id>
- <shortdef>point</shortdef>
- <def>
-A unit used to indicate the size of a typeface. Equal to 1/72 inches. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>pointer</id>
- <shortdef>pointer</shortdef>
- <def>
-A pointer tells where data is stored. Memory pointers are not used in Erlang. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>port</id>
- <shortdef>port</shortdef>
- <def>
-A data type in Erlang. Ports provide the basic mechanism for communication with the external world. </def>
- <resp>peterl</resp>
- </term>
- <term>
- <id>port controller</id>
- <shortdef>port controller</shortdef>
- <def>
-An Erlang process which controls a port program. A port has exactly one port controller. </def>
- <resp>peterl</resp>
- </term>
- <term>
- <id>port program</id>
- <shortdef>port program</shortdef>
- <def>
-A program that runs as an external program in the operating system and which the Erlang run-time system can start and communicate with by means of the Erlang port mechanism. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>PostScript</id>
- <shortdef>PostScript</shortdef>
- <def>
-A language describing a fully laid-out page in terms of fonts, lines, grey scales, and so on, in a way that is interpretable by a printer. The language was developed by Adobe Systems. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>pretty-printed</id>
- <shortdef>pretty-printed</shortdef>
- <def>
-Nicely formatted code or data, e.g. C or Erlang, with indents and tabs etc. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>primitive</id>
- <shortdef>primitive</shortdef>
- <def>
-The basic elements in a programming language. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>private key</id>
- <shortdef>private key</shortdef>
- <def>
-The secret key in a pair, used to decrypt incoming messages and sign outgoing ones. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>process</id>
- <shortdef>process</shortdef>
- <def>
-A process is a self-contained separate unit of execution which exists concurrently with other processes in the system. The BIF "spawn/3" creates and starts the execution of a new process. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>process dictionary</id>
- <shortdef>process dictionary</shortdef>
- <def>
-Each process has an associated dictionary which provides the process with simple destructive storage capabilities. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Process Manager</id>
- <shortdef>Process Manager</shortdef>
- <def>
-Obsolete name for the Process Trace Tool. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>Process Trace Tool</id>
- <shortdef>Process Trace Tool</shortdef>
- <def>
-A tool which gives an overview of the processes in the Erlang run-time system. See also Pman. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>Profiler</id>
- <shortdef>Profiler</shortdef>
- <def>
-Another name for eprof, a tool used to profile a system in order to find out how much time is spent in various segments of a program. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>program</id>
- <shortdef>program</shortdef>
- <def>
-Routines which can be executed by a computer. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>Proxy</id>
- <shortdef>proxy</shortdef>
- <def>
-An intermediary program which acts as both a server and a client for the purpose of making requests on behalf of other clients. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>public key</id>
- <shortdef>public key</shortdef>
- <def>
-The publicly available key in a key pair, used to encrypt messages bound for its owner and to decrypt signatures made by its owner. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>query</id>
- <shortdef>query</shortdef>
- <def>
-Queries are used for accessing the data in a Database Management System. The query specify a maybe complicated relation that should hold for all of the selected data. This could involve several tables as well as conditions like for instance less then and greater then. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>query language</id>
- <shortdef>query language</shortdef>
- <def>
-A language which is specially designed to express database queries. Examples of query languages are QLC and SQL. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>receive</id>
- <shortdef>receive</shortdef>
- <def>
-A primitive for message processing in Erlang, receives a message from a process. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>record</id>
- <shortdef>record</shortdef>
- <def>
-A data structure intended for storing a fixed number of related Erlang terms, it is similar to a "struct" in C or a "record" in Pascal. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>recursion</id>
- <shortdef>recursion</shortdef>
- <def>
-A function is recursive if it calls itself until the result desired is attained. Recursion is the heart of functional programming. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>reference</id>
- <shortdef>reference</shortdef>
- <def>
-A data type in Erlang for storing system unique references. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>release handler</id>
- <shortdef>release handler</shortdef>
- <def>
-A SASL process which handles software upgrade. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>relup</id>
- <shortdef>release upgrade script</shortdef>
- <def>
-A script with instructions to the release handler of how the release should be installed in the system. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>RPC</id>
- <shortdef>Remote Proceedure Call</shortdef>
- <def>
-A technique for evaluating a function transparently on a remote node. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>resource</id>
- <shortdef>resource</shortdef>
- <def>
-The actual resource to be managed. A resource is represented by a Managed Object. Each resource is mapped to one or several resources. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>resources</id>
- <shortdef>resources</shortdef>
- <def>
-The actual resources to be managed. A resource is represented by a Managed Object. Each resource is mapped to one or several resources. </def>
- <resp>nibe</resp>
- </term>
- <term>
- <id>RFC</id>
- <shortdef>RFC</shortdef>
- <def>
-A "Request for Comments" used as a proposed standard by IETF. </def>
- <resp>jocke</resp>
- </term>
- <term>
- <id>SASLshort</id>
- <shortdef>SASL</shortdef>
- <def>
-See System Architecture Support Libraries. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>schema</id>
- <shortdef>schema</shortdef>
- <def>
-The schema contains the definitions and whereabouts for all tables. In Mnesia it is realized as a special table named "schema". </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>schema functions</id>
- <shortdef>schema functions</shortdef>
- <def>
-The functions which are available for managing schemas. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>SDL</id>
- <shortdef>SDL</shortdef>
- <def>
-Specification and Description Language. A ITU-T standard specification language which is used to specify the behaviour of switching systems. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>send</id>
- <shortdef>send</shortdef>
- <def>
-A primitive for message processing in Erlang, sends a message to a process. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>shell</id>
- <shortdef>shell</shortdef>
- <def>
-The shell is an interactive front-end to an Erlang node where Erlang expressions can be evaluated. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>shell prompt</id>
- <shortdef>shell prompt</shortdef>
- <def>
-The text or symbol shown on the screen when the shell is ready to receive commands. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>SNMPEAlong</id>
- <shortdef>Simple Network Management Protocol Extensible Agent (SNMPEA).</shortdef>
- <def>
-An Erlang/OTP application that includes a bilingual extensible SNMP agent. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>single assignment</id>
- <shortdef>single assignment</shortdef>
- <def>
-Means that once a variable has been assigned a value, the value can never be changed. Erlang is a single assignment language. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>single step</id>
- <shortdef>single step</shortdef>
- <def>
-Single stepping is a function provided by the debugger. By single stepping the developer may use the debugger to follow the execution of a process and see what actually happens at each function call. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>slave</id>
- <shortdef>slave</shortdef>
- <def>
-Not in control, can never take over by himself. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>SSLlong</id>
- <shortdef>Secure Sockets Layer (SSL)</shortdef>
- <def>
-A protocol created by Netscape Communications Corporation for authentication and encryption over TCP/IP networks, including Web. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>signature</id>
- <shortdef>signature</shortdef>
- <def>
-An encrypted text block that validates a certificate or other file. A Certification Authority (CA) creates a signature by generating a hash of the public key embedded in a certificate, then encrypting the hash with its own private key. Only the CA's public key can decrypt the signature, verifying that the CA has authenticated the network entity that owns the certificate. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>SNMPshort</id>
- <shortdef>SNMP</shortdef>
- <def>
-Simple Network Management Protocol. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>SNMPshort</id>
- <shortdef>SNMPEA</shortdef>
- <def>
-See Simple Network Management Protocol Extensible Agent. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>spawn</id>
- <shortdef>spawn</shortdef>
- <def>
-A primitive for multiprocessing in Erlang, that starts a parallel computation (called a process). The creation of a new process </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>SSLshort</id>
- <shortdef>SSL</shortdef>
- <def>
-See Secure Sockets Layer. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>SSLeay</id>
- <shortdef>SSLeay</shortdef>
- <def>
-An SSL library developed by Eric Yong (eay@mincom.oz.au). </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>SSLTOP</id>
- <shortdef>SSLTOP</shortdef>
- <def>
-The path to your SSL directory, a subdirectory of ServerRoot. </def>
- <resp>helen</resp>
- </term>
- <term>
- <id>start script</id>
- <shortdef>start script</shortdef>
- <def>
-A start script is a file with .script extension which is the source when a boot file is created. See SASL User's Guide for more info. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>stdlib</id>
- <shortdef>stdlib</shortdef>
- <def>
-An application within Erlang/OTP which contains modules for manipulating lists, strings, files, etc. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>sticky directory</id>
- <shortdef>sticky directory</shortdef>
- <def>
-A directory containing Erlang object code that is part of the runtime system. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>sticky lock</id>
- <shortdef>sticky lock</shortdef>
- <def>
-A lock which lingers at a node after the transaction which first acquired the lock has terminated. Once a process has obtained a sticky lock on a node, subsequent locks acquired by processes on the same node, can be set without need of involving remote nodes. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>string</id>
- <shortdef>string</shortdef>
- <def>
-The ASCII or ISO-8859-1 representation of the list of characters occurring within quotation marks in Erlang code. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>Subagent</id>
- <shortdef>Subagent</shortdef>
- <def>
-The SNMP agent system consists of one Master Agent (See Master Agent) and zero or more Subagents which can be used to distribute the SNMP agent system on several nodes. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>supervision tree</id>
- <shortdef>supervision tree</shortdef>
- <def>
-A hierarcial tree of processes used to program fault tolerant systems. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>supervisor</id>
- <shortdef>supervisor</shortdef>
- <def>
-A behaviour to stucture fault tolerant computations, and program supervision trees with. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>sup_bridge</id>
- <shortdef>supervisor bridge</shortdef>
- <def>
-A behaviour used to connect a process, or subsystem, to a supervisor tree. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>SASLlong</id>
- <shortdef>System Architecture Support Libraries (SASL)</shortdef>
- <def>
-An Erlang/OTP application which contains services for error logging, release handling and report browsing. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>.config</id>
- <shortdef>system configuration file</shortdef>
- <def>
-A file which specifies configuration parameters for the applications in the system. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>table lock</id>
- <shortdef>table lock</shortdef>
- <def>
-Table locks are locks which are set on whole tables. They may either be read locks or write locks. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>Table Visualizer</id>
- <shortdef>Table Visualizer</shortdef>
- <def>
-A tool which enables the user to examine ETS and Mnesia tables. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>temporary child</id>
- <shortdef>temporary child</shortdef>
- <def>
-A supervised process which is never restarted when it dies. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>term</id>
- <shortdef>term</shortdef>
- <def>
-The super type of all Erlang types. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>Toolbar</id>
- <shortdef>Toolbar</shortdef>
- <def>
-A tool that provides an simplistic interface to the other various Erlang/OTP tools </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>tools</id>
- <shortdef>tools</shortdef>
- <def>
-An application within Erlang/OTP which contains the tools which are not applications themselves. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>transaction</id>
- <shortdef>transaction</shortdef>
- <def>
-Transactions groups a set of database accesses into an atomic unit. All transactions has the ACID (atomicity, concistency, isolation and durability) properties. </def>
- <resp>hakan</resp>
- </term>
- <term>
- <id>transient child</id>
- <shortdef>transient child</shortdef>
- <def>
-A supervised process which is restarted if it dies non-normally. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>trigger</id>
- <shortdef>trigger</shortdef>
- <def>
-The Interpreter. A break point that is reached by a process triggers if it is active, and the execution of the process is stopped. </def>
- <resp>olin</resp>
- </term>
- <term>
- <id>tty</id>
- <shortdef>tty</shortdef>
- <def>
-tty is a simple command line interface program where keystrokes are collected and interpreted. Originally meant teletypewriter equipment. Now it usually means the user console/terminal/shell window. </def>
- <resp>kent</resp>
- </term>
- <term>
- <id>tuple</id>
- <shortdef>tuple</shortdef>
- <def>
-A tuple is a data type in Erlang. Tuples are used as place holders for complex data structures. Tuples may contain anything of any size, and are written as sequences of terms separated by commas, and enclosed in curly brackets { }. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>variable</id>
- <shortdef>variable</shortdef>
- <def>
-An alias for a memory position, in which a value can be put. Erlang variables always start with an upper case letter. </def>
- <resp>kenneth</resp>
- </term>
- <term>
- <id>workers</id>
- <shortdef>workers</shortdef>
- <def>
-The lower nodes in a supervision tree. These are the processes that actually performs some real work, e.g. servers. </def>
- <resp>mbj</resp>
- </term>
- <term>
- <id>YECC</id>
- <shortdef>YECC</shortdef>
- <def>
-A LALR-1 parser generator included in Erlang/OTP. It is written in Erlang and generates a parser as an Erlang module. </def>
- <resp>kenneth</resp>
- </term>
-</terms>
-
diff --git a/system/doc/design_principles/Makefile b/system/doc/design_principles/Makefile
index 2fbd7d087f..d781809137 100644
--- a/system/doc/design_principles/Makefile
+++ b/system/doc/design_principles/Makefile
@@ -95,7 +95,9 @@ $(HTMLDIR)/%.gif: %.gif
$(HTMLDIR)/%.svg: %.svg
$(INSTALL_DATA) $< $@
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -116,12 +118,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
-# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf"
-# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf"
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(IMAGE_FILES) $(HTMLDIR)/*.html \
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(IMAGE_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
release_spec:
diff --git a/system/doc/efficiency_guide/Makefile b/system/doc/efficiency_guide/Makefile
index a2742a1354..285f8aad4b 100644
--- a/system/doc/efficiency_guide/Makefile
+++ b/system/doc/efficiency_guide/Makefile
@@ -88,7 +88,9 @@ DVIPS_FLAGS +=
# Targets
# ----------------------------------------------------
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -107,15 +109,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
-# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf"
-# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf"
- $(INSTALL_DIR) $(RELSYSDIR)
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
$(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
release_spec:
-
-
-
diff --git a/system/doc/embedded/Makefile b/system/doc/embedded/Makefile
index 1604075312..bb95c8370f 100644
--- a/system/doc/embedded/Makefile
+++ b/system/doc/embedded/Makefile
@@ -76,7 +76,9 @@ DVIPS_FLAGS +=
# Targets
# ----------------------------------------------------
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -95,13 +97,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
-# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf"
-# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf"
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html \
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
-release_spec:
-
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+release_spec:
diff --git a/system/doc/general_info/Makefile b/system/doc/general_info/Makefile
index 539075280e..7496e128b2 100644
--- a/system/doc/general_info/Makefile
+++ b/system/doc/general_info/Makefile
@@ -69,7 +69,9 @@ DVIPS_FLAGS +=
# Targets
# ----------------------------------------------------
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -88,12 +90,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
-# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf"
-# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf"
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html \
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
-release_spec:
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+release_spec:
diff --git a/system/doc/getting_started/Makefile b/system/doc/getting_started/Makefile
index 1c917895d5..47442e85e3 100644
--- a/system/doc/getting_started/Makefile
+++ b/system/doc/getting_started/Makefile
@@ -75,7 +75,9 @@ DVIPS_FLAGS +=
# Targets
# ----------------------------------------------------
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -94,11 +96,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
-# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf"
-# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf"
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html \
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+
release_spec:
diff --git a/system/doc/installation_guide/Makefile b/system/doc/installation_guide/Makefile
index c5234c1c9a..c95a426653 100644
--- a/system/doc/installation_guide/Makefile
+++ b/system/doc/installation_guide/Makefile
@@ -100,7 +100,9 @@ $(REDIRECT_HTML_DIR)/%.html: Makefile
echo "This <a href=\"../"$(notdir $@)"\">link</a> will" >> $@
echo "take you there immediately.</p></body></html>" >> $@
-docs: $(XML_GEN_FILES) html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
local_docs: $(XML_GEN_FILES)
@@ -123,13 +125,12 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-
-release_docs_spec: docs
- $(INSTALL_DIR) $(RELSYSDIR)
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
$(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html $(RELSYSDIR)
$(INSTALL_DIR) $(REDIRECT_HTML_RELSYSDIR)
$(INSTALL_DATA) $(REDIRECT_HTML_FILES) $(REDIRECT_HTML_RELSYSDIR)
-release_spec:
-
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+release_spec:
diff --git a/system/doc/oam/Makefile b/system/doc/oam/Makefile
index 2eb429e04d..4e3848a91a 100644
--- a/system/doc/oam/Makefile
+++ b/system/doc/oam/Makefile
@@ -75,7 +75,9 @@ DVIPS_FLAGS +=
$(HTMLDIR)/%.gif: %.gif
$(CP) $< $@
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -96,11 +98,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html \
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
-release_spec:
-
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+release_spec:
diff --git a/system/doc/programming_examples/Makefile b/system/doc/programming_examples/Makefile
index 9c67c24b64..7c1bdde698 100644
--- a/system/doc/programming_examples/Makefile
+++ b/system/doc/programming_examples/Makefile
@@ -75,7 +75,10 @@ DVIPS_FLAGS +=
# Targets
# ----------------------------------------------------
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
+
local_docs: PDFDIR=../../pdf
html: $(GIF_FILES) $(HTML_UG_FILE)
@@ -93,12 +96,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html \
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
-release_spec:
-
-
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+release_spec:
diff --git a/system/doc/reference_manual/Makefile b/system/doc/reference_manual/Makefile
index 809eb2c979..f7b93814ab 100644
--- a/system/doc/reference_manual/Makefile
+++ b/system/doc/reference_manual/Makefile
@@ -18,6 +18,7 @@
# %CopyrightEnd%
#
#
+
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
@@ -25,10 +26,10 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# Application version
# ----------------------------------------------------
include $(ERL_TOP)/erts/vsn.mk
-#VSN=$(SYSTEM_VSN)
APPLICATION=otp-system-documentation
XMLDIR := $(XMLDIR)/reference_manual
+
# ----------------------------------------------------
# Release directory specification
# ----------------------------------------------------
@@ -40,6 +41,7 @@ RELSYSDIR = "$(RELEASE_PATH)/doc/reference_manual"
XML_PART_FILES = part.xml
include xmlfiles.mk
+
XML_CHAPTER_FILES=$(REF_MAN_CHAPTER_FILES)
TOPDOCDIR=..
@@ -48,7 +50,6 @@ BOOK_FILES = book.xml
GIF_FILES=
-
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
$(XML_PART_FILES)
@@ -65,14 +66,6 @@ HTML_FILES = \
HTMLDIR = ../html/reference_manual
-EXTRA_FILES = $(DEFAULT_GIF_FILES) \
- $(DEFAULT_HTML_FILES) \
- $(C_FILES) \
- $(ERL_FILES) \
- $(HRL_FILES) \
- $(MISC_FILES) \
- $(XML_CHAPTER_FILES:%.xml=%.html)
-
HTML_UG_FILE = $(HTMLDIR)/users_guide.html
# ----------------------------------------------------
@@ -85,7 +78,9 @@ DVIPS_FLAGS +=
# Targets
# ----------------------------------------------------
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -104,14 +99,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
-# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf"
-# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf"
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html \
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
-release_spec:
-
-
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+release_spec:
diff --git a/system/doc/system_architecture_intro/Makefile b/system/doc/system_architecture_intro/Makefile
index ea9ee85105..a7b00b4ec5 100644
--- a/system/doc/system_architecture_intro/Makefile
+++ b/system/doc/system_architecture_intro/Makefile
@@ -70,7 +70,9 @@ DVIPS_FLAGS +=
# Targets
# ----------------------------------------------------
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -89,13 +91,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
-# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf"
-# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf"
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html \
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
-release_spec:
-
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+release_spec:
diff --git a/system/doc/system_principles/Makefile b/system/doc/system_principles/Makefile
index 5110b73373..44009b674f 100644
--- a/system/doc/system_principles/Makefile
+++ b/system/doc/system_principles/Makefile
@@ -71,7 +71,9 @@ DVIPS_FLAGS +=
# Targets
# ----------------------------------------------------
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -90,12 +92,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
-# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf"
-# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf"
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(GIF_FILES) $(HTMLDIR)/*.html \
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
-release_spec:
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+release_spec:
diff --git a/system/doc/top/Makefile b/system/doc/top/Makefile
index e3f9c4710a..2953491d71 100644
--- a/system/doc/top/Makefile
+++ b/system/doc/top/Makefile
@@ -249,8 +249,9 @@ DVIPS_FLAGS +=
# Targets
# ----------------------------------------------------
+DOC_TARGETS?=pdf html man
-docs: pdf html $(INFO_FILES)
+docs: $(DOC_TARGETS) $(INFO_FILES)
local_docs: PDFREFDIR=../pdf
@@ -258,10 +259,11 @@ $(TOP_PDF_FILE): $(XML_FILES)
pdf: $(TOP_PDF_FILE)
-html: $(INDEX_FILES) \
- $(MAN_INDEX) $(JAVASCRIPT)
+html: $(INDEX_FILES) $(JAVASCRIPT)
-debug opt:
+man: $(MAN_INDEX)
+
+debug opt:
clean:
$(RM) ../html/js/*.js
@@ -280,21 +282,28 @@ include $(ERL_TOP)/make/otp_release_targets.mk
$(RELSYSDIR)/temporary:
$(INSTALL_DIR) $(RELSYSDIR)/temporary
-release_docs_spec: docs
- $(INSTALL_DIR) "$(RELEASE_PATH)"
- $(INSTALL_DATA) $(INFO_FILES) "$(RELEASE_PATH)"
- $(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DIR) $(RELSYSDIR)/pdf
- $(INSTALL_DATA) \
- $(TOP_PDF_FILE) $(RELSYSDIR)/pdf
+$(RELSYSDIR)/docbuild:
+ $(INSTALL_DIR) $(RELSYSDIR)/docbuild
+
+release_man_spec: man $(RELSYSDIR)/docbuild
+ $(INSTALL_DATA) $(MAN_INDEX) $(RELSYSDIR)
+ $(INSTALL_DATA) $(MAN_INDEX_SRC) $(MAN_INDEX_SCRIPT) $(RELSYSDIR)/docbuild
+
+release_html_spec: html $(RELSYSDIR)/docbuild
$(INSTALL_DIR) $(RELSYSDIR)/js
$(INSTALL_DATA) $(JAVASCRIPT) $(RELSYSDIR)/js
- $(INSTALL_DATA) $(INDEX_FILES) $(MAN_INDEX) $(RELSYSDIR)
- $(INSTALL_DIR) $(RELSYSDIR)/docbuild
- $(INSTALL_DATA) $(INDEX_SCRIPT) $(MAN_INDEX_SCRIPT) $(JAVASCRIPT_BUILD_SCRIPT) \
- $(INDEX_SRC) $(MAN_INDEX_SRC) $(JAVASCRIPT_BUILD_SCRIPT_SRC) \
+ $(INSTALL_DATA) $(INDEX_FILES) $(RELSYSDIR)
+ $(INSTALL_DATA) $(INDEX_SCRIPT) $(JAVASCRIPT_BUILD_SCRIPT) \
+ $(INDEX_SRC) $(JAVASCRIPT_BUILD_SCRIPT_SRC) \
$(TEMPLATES) $(RELSYSDIR)/docbuild
- $(RM) -r $(RELSYSDIR)/temporary
+release_pdf_spec: pdf
+ $(INSTALL_DIR) $(RELSYSDIR)/pdf
+ $(INSTALL_DATA) \
+ $(TOP_PDF_FILE) $(RELSYSDIR)/pdf
+
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec) $(INFO_FILES)
+ $(INSTALL_DATA) $(INFO_FILES) "$(RELEASE_PATH)"
+ $(RM) -r $(RELSYSDIR)/temporary
release_spec:
diff --git a/system/doc/top/print.html b/system/doc/top/print.html
index b562d0e9bc..e65ac491a9 100644
--- a/system/doc/top/print.html
+++ b/system/doc/top/print.html
@@ -19,7 +19,7 @@
<center>
<a href="http://www.ericsson.com/technology/opensource/erlang">
- <img alt="Ericsson AB" BORDER=0 SRC="pics/min_head.gif">
+ <img alt="Ericsson AB" BORDER=0>
</a>
<br>
diff --git a/system/doc/tutorial/Makefile b/system/doc/tutorial/Makefile
index 4c62deeffd..effc673af6 100644
--- a/system/doc/tutorial/Makefile
+++ b/system/doc/tutorial/Makefile
@@ -97,7 +97,9 @@ DVIPS_FLAGS +=
$(HTMLDIR)/%.gif: %.gif
$(CP) $< $@
-docs: html
+DOC_TARGETS?=html
+
+docs: $(DOC_TARGETS)
local_docs: PDFDIR=../../pdf
@@ -118,11 +120,11 @@ clean clean_docs:
# ----------------------------------------------------
include $(ERL_TOP)/make/otp_release_targets.mk
-release_docs_spec: docs
-# $(INSTALL_DIR) "$(RELEASE_PATH)/pdf"
-# $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELEASE_PATH)/pdf"
- $(INSTALL_DIR) $(RELSYSDIR)
+release_html_spec: html
+ $(INSTALL_DIR) "$(RELSYSDIR)"
$(INSTALL_DATA) $(GIF_FILES) $(EXTRA_FILES) $(HTMLDIR)/*.html \
$(RELSYSDIR)
+release_docs_spec: $(DOC_TARGETS:%=release_%_spec)
+
release_spec: