From e81ee7a6ad203326694152b1302da178eb335b37 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 19 Feb 2020 10:56:20 +0100 Subject: travis: Move doc build to be start earlier in parallel build travis only start 5 jobs and before this change the doc build was always pushed until after another build was done so it took a very long time to finish one build. --- .travis.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) 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 -- cgit v1.2.1 From cb5747109fb6506ab42e98779dfbd724458abe60 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 29 Jan 2020 15:50:02 +0100 Subject: kernel: Add code:all_available that returns all modules This function returns all modules that can be loaded or already have been loaded. --- lib/kernel/doc/src/code.xml | 15 +++++++++++++ lib/kernel/src/code.erl | 48 ++++++++++++++++++++++++++++++++++++++++++ lib/kernel/test/code_SUITE.erl | 45 +++++++++++++++++++++++++++++++++++++-- 3 files changed, 106 insertions(+), 2 deletions(-) diff --git a/lib/kernel/doc/src/code.xml b/lib/kernel/doc/src/code.xml index 268eb5e839..01068c7263 100644 --- a/lib/kernel/doc/src/code.xml +++ b/lib/kernel/doc/src/code.xml @@ -704,6 +704,21 @@ ok = code:finish_loading(Prepared), Loaded==cover_compiled.

+ + + Get all available modules. + + + Filename is an absolute + filename. + +

Returns a list of tuples {Module, Filename, + Loaded} for all available modules. A module is considered + to be available if it either is loaded or would be loaded if called. + Filename is normally the absolute filename, as described for + is_loaded/1.

+
+
Get all loaded modules. diff --git a/lib/kernel/src/code.erl b/lib/kernel/src/code.erl index e205d6450c..a8cf6b55ea 100644 --- a/lib/kernel/src/code.erl +++ b/lib/kernel/src/code.erl @@ -44,6 +44,7 @@ soft_purge/1, is_loaded/1, all_loaded/0, + all_available/0, stop/0, root_dir/0, lib_dir/0, @@ -220,6 +221,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). 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(), -- cgit v1.2.1 From 9fc49083063112abdf18775c41460f9b4ea0697e Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 29 Jan 2020 15:51:47 +0100 Subject: stdlib: Make shell expand work with all available modules Before this change all modules had to be loaded for the autocompletion to work, now they only have to be in the path. This also changes so that if you hit when there is nothing to complete only a bell is signaled. --- lib/stdlib/src/edlin_expand.erl | 40 +++++++++++-------- lib/stdlib/test/ExpandTestCaps.erl | 33 ---------------- lib/stdlib/test/ExpandTestCaps1.erl | 45 ---------------------- lib/stdlib/test/Makefile | 5 --- lib/stdlib/test/edlin_expand_SUITE.erl | 32 +++++++++------ .../edlin_expand_SUITE_data/ExpandTestCaps.erl | 33 ++++++++++++++++ .../edlin_expand_SUITE_data/ExpandTestCaps1.erl | 45 ++++++++++++++++++++++ .../test/edlin_expand_SUITE_data/expand_test.erl | 37 ++++++++++++++++++ .../test/edlin_expand_SUITE_data/expand_test1.erl | 45 ++++++++++++++++++++++ .../edlin_expand_SUITE_data/unicode_expand.erl | 36 +++++++++++++++++ lib/stdlib/test/expand_test.erl | 37 ------------------ lib/stdlib/test/expand_test1.erl | 45 ---------------------- lib/stdlib/test/unicode_expand.erl | 36 ----------------- 13 files changed, 242 insertions(+), 227 deletions(-) delete mode 100644 lib/stdlib/test/ExpandTestCaps.erl delete mode 100644 lib/stdlib/test/ExpandTestCaps1.erl create mode 100644 lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps.erl create mode 100644 lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps1.erl create mode 100644 lib/stdlib/test/edlin_expand_SUITE_data/expand_test.erl create mode 100644 lib/stdlib/test/edlin_expand_SUITE_data/expand_test1.erl create mode 100644 lib/stdlib/test/edlin_expand_SUITE_data/unicode_expand.erl delete mode 100644 lib/stdlib/test/expand_test.erl delete mode 100644 lib/stdlib/test/expand_test1.erl delete mode 100644 lib/stdlib/test/unicode_expand.erl diff --git a/lib/stdlib/src/edlin_expand.erl b/lib/stdlib/src/edlin_expand.erl index bdcefda6e5..da6671b013 100644 --- a/lib/stdlib/src/edlin_expand.erl +++ b/lib/stdlib/src/edlin_expand.erl @@ -43,24 +43,32 @@ expand(Bef0) -> expand_module_name(Word) end. +expand_module_name("") -> + {no, [], []}; expand_module_name(Prefix) -> - match(Prefix, code:all_loaded(), ":"). + match(Prefix, [{list_to_atom(M),P} || {M,P,_} <- code:all_available()], ":"). expand_function_name(ModStr, FuncPrefix) -> 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, "(") + end; error -> {no, [], []} end. @@ -99,8 +107,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/test/ExpandTestCaps.erl b/lib/stdlib/test/ExpandTestCaps.erl deleted file mode 100644 index 7fb1107ae0..0000000000 --- a/lib/stdlib/test/ExpandTestCaps.erl +++ /dev/null @@ -1,33 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2010-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% -%% --module('ExpandTestCaps'). - --export([a_fun_name/1, - a_less_fun_name/1, - b_comes_after_a/1]). - -a_fun_name(X) -> - X. - -a_less_fun_name(X) -> - X. - -b_comes_after_a(X) -> - X. diff --git a/lib/stdlib/test/ExpandTestCaps1.erl b/lib/stdlib/test/ExpandTestCaps1.erl deleted file mode 100644 index 400a17b137..0000000000 --- a/lib/stdlib/test/ExpandTestCaps1.erl +++ /dev/null @@ -1,45 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2010-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% -%% --module('ExpandTestCaps1'). - --export([a_fun_name/1, - a_less_fun_name/1, - b_comes_after_a/1, - 'Quoted_fun_name'/0, - 'Quoted_fun_too'/0, - '#weird-fun-name'/0]). - -a_fun_name(X) -> - X. - -a_less_fun_name(X) -> - X. - -b_comes_after_a(X) -> - X. - -'Quoted_fun_name'() -> - whoopee. - -'Quoted_fun_too'() -> - too. - -'#weird-fun-name'() -> - weird. diff --git a/lib/stdlib/test/Makefile b/lib/stdlib/test/Makefile index 7f7a0834ba..d6717ccaa6 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 \ 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/edlin_expand_SUITE_data/ExpandTestCaps.erl b/lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps.erl new file mode 100644 index 0000000000..7fb1107ae0 --- /dev/null +++ b/lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps.erl @@ -0,0 +1,33 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010-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% +%% +-module('ExpandTestCaps'). + +-export([a_fun_name/1, + a_less_fun_name/1, + b_comes_after_a/1]). + +a_fun_name(X) -> + X. + +a_less_fun_name(X) -> + X. + +b_comes_after_a(X) -> + X. diff --git a/lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps1.erl b/lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps1.erl new file mode 100644 index 0000000000..400a17b137 --- /dev/null +++ b/lib/stdlib/test/edlin_expand_SUITE_data/ExpandTestCaps1.erl @@ -0,0 +1,45 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010-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% +%% +-module('ExpandTestCaps1'). + +-export([a_fun_name/1, + a_less_fun_name/1, + b_comes_after_a/1, + 'Quoted_fun_name'/0, + 'Quoted_fun_too'/0, + '#weird-fun-name'/0]). + +a_fun_name(X) -> + X. + +a_less_fun_name(X) -> + X. + +b_comes_after_a(X) -> + X. + +'Quoted_fun_name'() -> + whoopee. + +'Quoted_fun_too'() -> + too. + +'#weird-fun-name'() -> + weird. diff --git a/lib/stdlib/test/edlin_expand_SUITE_data/expand_test.erl b/lib/stdlib/test/edlin_expand_SUITE_data/expand_test.erl new file mode 100644 index 0000000000..5544923a12 --- /dev/null +++ b/lib/stdlib/test/edlin_expand_SUITE_data/expand_test.erl @@ -0,0 +1,37 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010-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% +%% +-module(expand_test). + +-export([a_fun_name/1, + a_less_fun_name/1, + b_comes_after_a/1, + expand0arity_entirely/0]). + +a_fun_name(X) -> + X. + +a_less_fun_name(X) -> + X. + +b_comes_after_a(X) -> + X. + +expand0arity_entirely () -> + ok. diff --git a/lib/stdlib/test/edlin_expand_SUITE_data/expand_test1.erl b/lib/stdlib/test/edlin_expand_SUITE_data/expand_test1.erl new file mode 100644 index 0000000000..abefaefcfd --- /dev/null +++ b/lib/stdlib/test/edlin_expand_SUITE_data/expand_test1.erl @@ -0,0 +1,45 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2010-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% +%% +-module(expand_test1). + +-export([a_fun_name/1, + a_less_fun_name/1, + b_comes_after_a/1, + 'Quoted_fun_name'/0, + 'Quoted_fun_too'/0, + '#weird-fun-name'/1]). + +a_fun_name(X) -> + X. + +a_less_fun_name(X) -> + X. + +b_comes_after_a(X) -> + X. + +'Quoted_fun_name'() -> + whoopee. + +'Quoted_fun_too'() -> + too. + +'#weird-fun-name'(_) -> + weird. diff --git a/lib/stdlib/test/edlin_expand_SUITE_data/unicode_expand.erl b/lib/stdlib/test/edlin_expand_SUITE_data/unicode_expand.erl new file mode 100644 index 0000000000..41f741fa84 --- /dev/null +++ b/lib/stdlib/test/edlin_expand_SUITE_data/unicode_expand.erl @@ -0,0 +1,36 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2017. 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(unicode_expand). + +-export(['кlирилли́ческий атом'/0, 'кlирилли́ческий атом'/1, + 'кlирилли́ческий атомB'/1]). + +-export_type(['кlирилли́ческий атом'/0]). + +-type 'кlирилли́ческий атом'() :: integer(). + +'кlирилли́ческий атом'() -> + 'кlирилли́ческий атом'('кlирилли́ческий атом'). + +'кlирилли́ческий атом'(_Atom) -> + ok. + +'кlирилли́ческий атомB'(_B) -> + true. diff --git a/lib/stdlib/test/expand_test.erl b/lib/stdlib/test/expand_test.erl deleted file mode 100644 index 5544923a12..0000000000 --- a/lib/stdlib/test/expand_test.erl +++ /dev/null @@ -1,37 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2010-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% -%% --module(expand_test). - --export([a_fun_name/1, - a_less_fun_name/1, - b_comes_after_a/1, - expand0arity_entirely/0]). - -a_fun_name(X) -> - X. - -a_less_fun_name(X) -> - X. - -b_comes_after_a(X) -> - X. - -expand0arity_entirely () -> - ok. diff --git a/lib/stdlib/test/expand_test1.erl b/lib/stdlib/test/expand_test1.erl deleted file mode 100644 index abefaefcfd..0000000000 --- a/lib/stdlib/test/expand_test1.erl +++ /dev/null @@ -1,45 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2010-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% -%% --module(expand_test1). - --export([a_fun_name/1, - a_less_fun_name/1, - b_comes_after_a/1, - 'Quoted_fun_name'/0, - 'Quoted_fun_too'/0, - '#weird-fun-name'/1]). - -a_fun_name(X) -> - X. - -a_less_fun_name(X) -> - X. - -b_comes_after_a(X) -> - X. - -'Quoted_fun_name'() -> - whoopee. - -'Quoted_fun_too'() -> - too. - -'#weird-fun-name'(_) -> - weird. diff --git a/lib/stdlib/test/unicode_expand.erl b/lib/stdlib/test/unicode_expand.erl deleted file mode 100644 index 41f741fa84..0000000000 --- a/lib/stdlib/test/unicode_expand.erl +++ /dev/null @@ -1,36 +0,0 @@ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2017. 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(unicode_expand). - --export(['кlирилли́ческий атом'/0, 'кlирилли́ческий атом'/1, - 'кlирилли́ческий атомB'/1]). - --export_type(['кlирилли́ческий атом'/0]). - --type 'кlирилли́ческий атом'() :: integer(). - -'кlирилли́ческий атом'() -> - 'кlирилли́ческий атом'('кlирилли́ческий атом'). - -'кlирилли́ческий атом'(_Atom) -> - ok. - -'кlирилли́ческий атомB'(_B) -> - true. -- cgit v1.2.1 From 7c94901057d205509e1e15ed702cea9b8a816946 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 31 Jan 2020 16:49:46 +0100 Subject: kernel: Add erts to code:lib_dir lookup --- erts/test/otp_SUITE.erl | 10 ++++++++-- lib/dialyzer/src/dialyzer_cl_parse.erl | 16 ++++++++++------ lib/kernel/src/code_server.erl | 33 ++++++++++++++++++++++++--------- 3 files changed, 42 insertions(+), 17 deletions(-) diff --git a/erts/test/otp_SUITE.erl b/erts/test/otp_SUITE.erl index c5e0dfe649..b5f15ebb10 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]. 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/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. %% -- cgit v1.2.1 From cffbaac853b1022f3bd7ef7ed3f3fefe3bd1f4e1 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 12 Feb 2020 14:41:51 +0100 Subject: Fix erlang:system_info overview docs --- erts/doc/src/erlang.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(), - + System info overview.

Returns information about the current system. @@ -9602,6 +9602,7 @@ Metadata = #{ pid => pid(), + Information about the system. -- cgit v1.2.1 From 2816f35db2195f9029f60238ce1cdbccdd17fca8 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 18 Feb 2020 16:13:55 +0100 Subject: Fix net doc since tag --- lib/kernel/doc/src/net.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ - + Get hostname.

Returns the name of the current host.

-- cgit v1.2.1 From 5e9988201d68199ddecf39fbf98e9757bce8c37f Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 18 Feb 2020 16:16:17 +0100 Subject: Add missing space to dbg:p/2 docs --- lib/runtime_tools/doc/src/dbg.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {matched, Node, N}. If the - remote processor call,rpc, to a remote node fails, + remote processor call, rpc, to a remote node fails, the rpc 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 -- cgit v1.2.1 From 117938f18e6ce6e23a38b193ea9e72172a057713 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 12 Feb 2020 10:04:25 +0100 Subject: docgen: Remove many dead entities from dtds Removed unused cite and path enitity from dtd Removed unused dtds Removed unused elements from existing dtds Removed almost unused elements from existing dtds --- erts/doc/src/epmd.xml | 5 +- lib/crypto/doc/src/insidecover.xml | 26 - lib/erl_docgen/doc/src/block_tags.xml | 16 - lib/erl_docgen/doc/src/inline_tags.xml | 40 - lib/erl_docgen/priv/dtd/Makefile | 7 +- lib/erl_docgen/priv/dtd/bookinsidecover.dtd | 37 - lib/erl_docgen/priv/dtd/cites.dtd | 36 - lib/erl_docgen/priv/dtd/common.dtd | 27 +- lib/erl_docgen/priv/dtd/fascicules.dtd | 36 - lib/erl_docgen/priv/dtd/report.dtd | 141 --- lib/erl_docgen/priv/dtd/terms.dtd | 37 - lib/erl_docgen/priv/xsl/db_html.xsl | 136 --- lib/erl_docgen/priv/xsl/db_pdf.xsl | 2 +- lib/inets/doc/src/httpd_util.xml | 8 +- lib/inets/doc/src/introduction.xml | 2 +- lib/inets/doc/src/part.xml | 2 +- lib/megaco/doc/src/definitions/term.defs.xml | 1518 ------------------------- lib/parsetools/doc/src/ref_man.xml | 6 +- lib/tools/doc/src/cprof.xml | 2 +- lib/tools/doc/src/xref.xml | 2 +- system/doc/definitions/term.defs.xml | 1525 -------------------------- 21 files changed, 15 insertions(+), 3596 deletions(-) delete mode 100644 lib/crypto/doc/src/insidecover.xml delete mode 100644 lib/erl_docgen/priv/dtd/bookinsidecover.dtd delete mode 100644 lib/erl_docgen/priv/dtd/cites.dtd delete mode 100644 lib/erl_docgen/priv/dtd/fascicules.dtd delete mode 100644 lib/erl_docgen/priv/dtd/report.dtd delete mode 100644 lib/erl_docgen/priv/dtd/terms.dtd delete mode 100644 lib/megaco/doc/src/definitions/term.defs.xml delete mode 100644 system/doc/definitions/term.defs.xml diff --git a/erts/doc/src/epmd.xml b/erts/doc/src/epmd.xml index 75353cbc07..8a9da59605 100644 --- a/erts/doc/src/epmd.xml +++ b/erts/doc/src/epmd.xml @@ -295,9 +295,8 @@ Logging

On some operating systems syslog will be used for error reporting when epmd runs as a daemon. To enable - the error logging, you must edit the - /etc/syslog.conf file and add an - entry:

+ the error logging, you must edit the /etc/syslog.conf file and + add an entry:

- - - - - 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. - -
- 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. - -
- For further OpenSSL and SSLeay license information se the chapter - Licenses. - - -
- http://www.erlang.org -
-
- 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 @@ <list>, <taglist>, <codeinclude> and - <erleval>.

@@ -130,21 +129,6 @@ start(Pid) -> is "none"

-
- - <erleval> - Erlang Evaluation - -

Include the result from evaluating an Erlang expression. Example: -

- - ]]> -

results in:

- - -

Note the '.' and space after the expression.

-
-
<list> - List 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 @@

-
- - - <term>, <termdef> - Glossary - -

Used to highlight a term with a local (for this document only) or - global definition. The identity of the term is given by - the id attribute.

- -

For a locally defined term, the tag contains a - <termdef>, which in turn contains an explanation of - the term as plain text. Example:

-
Hyper-Text Markup Language
-      ]]>
- -

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:

-
Hyper-Text Markup Language
-      ]]>
-

results in: Hyper-Text Markup Language -

- -

If a term is defined both locally and globally, the global - definition takes precedence.

-
- -
- - - <cite>, <citedef> - Bibliography - -

Works the same way as <term> and - <termdef>, but for a bibliography list rather than - a glossary.

- -
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 @@ - - -%ISOlat1; - - - - - - - - - - - - - - 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 @@ - - -%ISOlat1; - - - - - - - - - - - - - - - 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 @@ %common.entities; - - + @@ -43,26 +42,9 @@ - - - - - - - - - - - - - - - - @@ -86,8 +68,3 @@ - - - - - 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 @@ - - - - -%ISOlat1; - - - - - - - - - - - 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 @@ - - - - -%ISOlat1; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 @@ - - -%ISOlat1; - - - - - - - - - - - - - - - - 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 @@ - - - - - - - - - - @@ -2609,118 +2585,6 @@ - - - - - - - - Erlang Documentation -- <xsl:value-of select="header/title"/> - - - -
- - - - - -
-
-

Glossary

-
- -
- - - -
-
-
-
-
- - - -
-
- - - - -
-
- - - - - - - - - - Erlang Documentation -- <xsl:value-of select="header/title"/> - - - -
- - - - - -
-
-

Bibliography

-
- - - - - - - - - - - -
- - - -
-
- - - - -
-
- - 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 @@ - + 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 @@

lookup_mime returns the MIME type associated with a specific file suffix as specified in the file mime.types - (located in the - - config directory).

+ (located in the config directory).

@@ -191,9 +189,7 @@

lookup_mime_default returns the MIME type associated with a specific file suffix as specified in the - mime.types file (located in the - - config directory). + mime.types file (located in the config directory). If no appropriate association is found, the value of DefaultType is returned.

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 @@

Inets is a container for Internet clients and servers including the following:

- An client and server + An HTTP client and server

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 @@

The Inets application provides a set of Internet-related services as follows:

- An client and server + An HTTP client and server

The HTTP client and server are HTTP 1.1 compliant as defined in 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 @@ - - - - - - agent - agent - -An entity that terminates a management protocol in the Network Element. - mbj - - - API - API - -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. - mbj - - - application - application - -A collection of resources which is required to offer a specific service. - mbj - - - appmon - Application Monitor - -A graphical node and application process tree viewer. See also appmon. - mbj - - - Appmon - Appmon - -Application name for the Application Monitor within Erlang/OTP. A graphical node and process viewer. - mbj - - - app callback - application callback module - -A module which is called when the application is started, and when it has stopped. Every application has one application callback module. - mbj - - - AC - application controller - -A process which coordinates all operations on applications. - mbj - - - app master - application master - -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. - mbj - - - .app file - application resource file - -Specifies the resources required by the application and how the application should be started. Every application has one application resource file, called AppName.app. - mbj - - - arity - arity - -Denotes the number of arguments to a function. - jocke - - - ASN.1 - ASN.1 - -Abstract Syntax Notation One - an ITU-T and ISO standard notation for describing data formats used in communication protocols. - kenneth - - - ASN.1 Compiler - ASN.1 Compiler - -The Erlang/OTP ASN.1 Compiler translates an ASN.1 module into a corresponding Erlang module with encode and decode functions. - kenneth - - - atom - atom - -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. - kenneth - - - atomicity - atomicity - -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. - hakan - - - attach - attach - -The debugger may attach to a process. When attached, the debugger may show process details, such as message queues and variable bindings. - olin - - - behaviour - behaviour - -A "pattern of design" which can be used to build applications and processes in an applications. - mbj - - - BIF - BIF - -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 - kenneth - - - binary - binary - -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. - kenneth - - - boolean - boolean - -A common data type in programming and specification languages. The value can be either true or false. - kenneth - - - boot file - boot file - -A binary file with extension .boot which is read during start of an Erlang node. See SASL User's Guide for more info. - kenneth - - - break point - break point - -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. - olin - - - CAshort - CA - -See Certification Authority. - helen - - - CA certificate - CA certificate - -A certificate containing a CA's public key. Network entities use this public key to verify certificates signed with the CA's private key. - helen - - - callback function - callback function - -A callback function is a function exported from a callback module, that a generic behaviour calls to perform a specific task. - mbj - - - callback module - callback module - -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. - mbj - - - certificate - certificate - -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. - helen - - - CAlong - Certification Authority (CA) - -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. - helen - - - CSRlong - Certificate Signing Request (CSR) - -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. - helen - - - child - child - -A supervised process. See also permanent, transient, temporary child. - mbj - - - cipher - cipher - -A system of encryption. - helen - - - ClearCase - ClearCase - -A configuration management system from Rational Software Corporation. - lars - - - client-server model - client-server model - -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. - mbj - - - cover - Coverage Analyser - -Module name for the coverage analyser tool, located in the Tools application. - gunilla - - - CORBAlong - Common Object Request Broker Architecture (CORBA) - -A specification of an architecture for a distributed object system - lars - - - CORBA - Common Object Request Broker Architecture (CORBA) - -A specification of an architecture for a distributed object system - lars - - - compiler - compiler - -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. - kenneth - - - consistency - consistency - -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. - hakan - - - cookie - cookie - -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 - kenneth - - - CORBAshort - CORBA - -See Common Object RequestBroker Architecture. - lars - - - Coverage Analyser - Coverage Analyser - -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. - olin - - - coverage analysis - coverage analysis - -The task of determining which lines, or how many lines of code, has actually been executed. Useful for determining the completeness of test suites. - olin - - - cross reference tool - cross reference tool - -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. - gunilla - - - CSRshort - CSR - -See Certificate Signing Request. - helen - - - data type - data type - -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. - kenneth - - - DBMSlong - Database Management System (DBMS) - -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. - hakan - - - DBMSshort - DBMS - -See Database Management System. - hakan - - - Debugger - Debugger - -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. - olin - - - dets - dets - -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. - hakan - - - dirty operations - dirty operations - -Functions which manipulate data in a DBMS, without using transactions. - hakan - - - distributed application - distributed application - -An application which runs on one of several nodes. May be restarted on another node. (See local application.) - mbj - - - DNSshort - DNS - -See Domain Name System. - lars - - - Docbuilder - Docbuilder - -The documentation system used in Erlang/OTP. - jocke - - - DNSlong - Domain Name System (DNS) - -DNS is a service that map names to internet addresses - lars - - - DTD - DTD - -Document Type Definition as defined in SGML. - jocke - - - durability - durability - -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. - hakan - - - Emacs - Emacs - -A widely used text editor which allows customization of its behaviour. An Erlang mode for Emacs is included in the Erlang deliverables. - kenneth - - - Emacs for Erlang - Emacs for Erlang - -A tool which provides a major mode for editing Erlang source files in Emacs. - olin - - - encaps - encapsulation - -Data can be encapsulated into another data element. - kent - - - eprof - eprof - -A module in the tools application. See Profiler. - olin - - - erl - erl - -The command which starts an Erlang run-time system. - kenneth - - - erl_interface - erl_interface library - -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. - kenneth - - - Erlang - Erlang - -Erlang is a functional programming language intended for designing large industrial soft real time systems. - kenneth - - - Erlang emulator - Erlang emulator - -Another word for Erlang Virtual Machine. - kenneth - - - ERTSlong - Erlang Run Time System - -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. - kenneth - - - Erlang VM - Erlang Virtual Machine - -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. - kenneth - - - ERTSshort - ERTS - -See Erlang Run Time System. - kenneth - - - ETS - ETS - -Erlang Term Storage tables. - olin - - - EVAshort - EVA - -See Event and Alarm handling application - mbj - - - EVAlong - Event and Alarm handling application (EVA) - -An application that consists of Fault Management functionality, such as sending and logging of events and alarms. - mbj - - - event handler - event handler - -A module exporting functions which can process events sent to an event manager process. The event handler is a behaviour of type gen_event. - mbj - - - event manager - event manager - -A process to which events of a certain category is sent. gen_event handler can be installed in the event manager. - mbj - - - exit signal - exit signal - -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}. - kent - - - foo - foo - -Algebraic place holder. - kent - - - FSM - FSM - -Finite State Machine. - kenneth - - - fun - fun - -A data type, introduced in Erlang 4.4, which represent functional objects. - kenneth - - - function - function - -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. - kenneth - - - Gateway - gateway - -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. - jocke - - - gen_event - gen_event - -A behaviour used for programming event handling mechanisms, such as alarm handlers, error loggers, and plug-and-play handlers. - mbj - - - gen_fsm - gen_fsm - -A behaviour used for programming finite state machines. - mbj - - - gen_server - gen_server - -A behaviour used for programming client-server processes. - mbj - - - gterm - Global Glossary Database - -A glossary database used to list common acronymns and defintions etc. - jocke - - - xref - xref - -A cross reference tool that can be used for finding dependencies between functions, modules, applications and releases. Part of the Tools application. - gunilla - - - GSlong - Graphics System - -A library module which provides a graphics interface for Erlang. - mbj - - - grid - grid - -A multi-column object which is used to display tables. (Graphics System.) - mbj - - - GSshort - GS - -See Graphics System. - olin - - - GS Contributions - GS Contributions - -Unsupported user supplied tools which are included with the Erlang/OTP software release. - olin - - - GUI - GUI - -Graphical User Interface - mbj - - - Home Directory - Home Directory - -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. - kenneth - - - host name - host name - -The name of a machine on a network, e.g. erlang.ericsson.se. - kent - - - HTML - HTML - -Hypertext Markup Language. - jocke - - - HTTP - HTTP - -Hypertext Transfer Protocol. - jocke - - - HTTPS - HTTPS - -The Hypertext Transport Protocol, Secure, the standard SSL communication mechanism of the World Wide Web. - helen - - - IDLshort - IDL - -See Interface Description Language. - lars - - - IDLlong - Interface Description Language (IDL) - -The interface specification language created by OMG. - lars - - - indexing - indexing - -Fast lookup using an (usually enumerated) key. - kent - - - I1 - INETS - -The Internet Services application - jocke - - - initial call - initial call - -The first call to an interpreted function (when using the Interpreter). - kent - - - instrumentation function - instrumentation function - -A function used to implement a Managed Object, i.e. give access to the real resources behind an MO. - mbj - - - IDLlong - Interface Description Language (IDL) - -The interface specification language created by OMG. - lars - - - interpreter - interpreter - -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. - kent - - - isolation - isolation - -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. - hakan - - - kernel - kernel - -An application which contains file servers, code servers and other code necessary for the Erlang run-time system. - kenneth - - - key - key - -A file containing the value that must be fed into an algorithm in order to encrypt or decrypt a message. - helen - - - key pair - key pair - -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. - helen - - - list - list - -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. - kenneth - - - list box - list box - -A list of labels with optional scroll bars attached. (Graphics System.) - mbj - - - lc - list comprehension - -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. - kenneth - - - local application - local application - -An application which runs on one node and which are always started at the local node only. (See distributed application.) - mbj - - - manager - manager - -An entity that terminates a management protocol in the Network Management Station. - mbj - - - Master Agent - Master Agent - -The SNMP agent system consists of one Master Agent which terminates the SNMP protocol - mbj - - - MIB - Management Information Base (MIB) - -An abstract definition of the management information available through a management interface in a system. - mbj - - - matching - matching - -See pattern matching. - kenneth - - - message queue - message queue - -The queue of not yet received messages that are in the mailbox of a process. - olin - - - Mnesia - Mnesia - -Mnesia is a distributed Database Management System, appropriate for telecommunications applications and other applications with need of continuous operation and soft real-time properties. - hakan - - - MIBshort - MIB - -See Management Information Base. - mbj - - - MIME - MIME - -Multi-purpose Internet Mail Extensions. - jocke - - - MOlong - Managed Object (MO) - -The abstract management information defined in a MIB. - mbj - - - MO - MO - -Managed Object; The abstract management information defined in a MIB. - nibe - - - MOshort - MO - -See Managed Object. - mbj - - - module - module - -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. - kenneth - - - NCSA - NCSA - -The National Center for Supercomputing Applications. - jocke - - - NEshort - NE - -See Network Element. - mbj - - - NElong - Network Element - -In OTP, the Network Element is the entire distributed OTP system, meaning that the distributed OTP system is managed as one entity. - mbj - - - NE - NE - -Network Element; In OTP, the Network Element is the entire distributed OTP system, meaning that the distributed OTP system is managed as one entity. - mbj - - - NMSlong - Network Management Station (NMS) - -The place where the operator manages the network. - mbj - - - NMS - NMS - -Network Management Station; The place where the operator manages the network. - nibe - - - NMSshort - NMS - -See Network Management Station. - mbj - - - node - node - -An executing Erlang run-time system which can communicate with other Erlang run-time systems. - kenneth - - - node name - node name - -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. - kenneth - - - notation - notation - -How things are written. - kent - - - notification - notification - -Information of an event. - kent - - - NROFF - NROFF - -A text formatting language for line printer quality output devices that runs on the UNIX operating system. - jocke - - - number - number - -A data type in Erlang. Are subdivided into integers, for storing natural numbers, or floats, for storing real numbers. - kenneth - - - OMGlong - Object Managment Group (OMG) - -A standardisation group for all specifications in the area of CORBA. - lars - - - OMGshort - OMG - -Object Managment Group. - lars - - - OTP - OTP - -Open Telecom Platform - mike - - - os_mon - os_mon - -An application which monitors the behaviour of the underlying operating system - mbj - - - parser generator - parser generator - -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. - kenneth - - - pass phrase - pass phrase - -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. - helen - - - pattern matching - pattern matching - -A basic mechanism in Erlang for assigning values to variables and for controlling the flow of a program. - kenneth - - - permanent child - permanent child - -A supervised process which always is restarted when it dies. - mbj - - - Pid - Pid - -Process Identifier. A data type in Erlang for storing process references. The process identity of the process displayed in the line. - kenneth - - - Pman - Pman - -Module and application name for the Process Trace Tool. - olin - - - point - point - -A unit used to indicate the size of a typeface. Equal to 1/72 inches. - jocke - - - pointer - pointer - -A pointer tells where data is stored. Memory pointers are not used in Erlang. - kent - - - port - port - -A data type in Erlang. Ports provide the basic mechanism for communication with the external world. - peterl - - - port controller - port controller - -An Erlang process which controls a port program. A port has exactly one port controller. - peterl - - - port program - port program - -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. - kenneth - - - PostScript - PostScript - -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. - jocke - - - pretty-printed - pretty-printed - -Nicely formatted code or data, e.g. C or Erlang, with indents and tabs etc. - jocke - - - primitive - primitive - -The basic elements in a programming language. - kent - - - private key - private key - -The secret key in a pair, used to decrypt incoming messages and sign outgoing ones. - helen - - - process - process - -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. - kenneth - - - process dictionary - process dictionary - -Each process has an associated dictionary which provides the process with simple destructive storage capabilities. - kenneth - - - Process Manager - Process Manager - -Obsolete name for the Process Trace Tool. - olin - - - Process Trace Tool - Process Trace Tool - -A tool which gives an overview of the processes in the Erlang run-time system. See also Pman. - olin - - - Profiler - Profiler - -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. - olin - - - program - program - -Routines which can be executed by a computer. - kent - - - Proxy - proxy - -An intermediary program which acts as both a server and a client for the purpose of making requests on behalf of other clients. - jocke - - - public key - public key - -The publicly available key in a key pair, used to encrypt messages bound for its owner and to decrypt signatures made by its owner. - helen - - - query - query - -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. - hakan - - - query language - query language - -A language which is specially designed to express database queries. Examples of query languages are QLC and SQL. - hakan - - - receive - receive - -A primitive for message processing in Erlang, receives a message from a process. - kenneth - - - record - record - -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. - kenneth - - - recursion - recursion - -A function is recursive if it calls itself until the result desired is attained. Recursion is the heart of functional programming. - kenneth - - - reference - reference - -A data type in Erlang for storing system unique references. - kenneth - - - release handler - release handler - -A SASL process which handles software upgrade. - mbj - - - relup - release upgrade script - -A script with instructions to the release handler of how the release should be installed in the system. - mbj - - - RPC - Remote Proceedure Call - -A technique for evaluating a function transparently on a remote node. - kenneth - - - resource - resource - -The actual resource to be managed. A resource is represented by a Managed Object. Each resource is mapped to one or several resources. - mbj - - - resources - resources - -The actual resources to be managed. A resource is represented by a Managed Object. Each resource is mapped to one or several resources. - nibe - - - RFC - RFC - -A "Request for Comments" used as a proposed standard by IETF. - jocke - - - SASLshort - SASL - -See System Architecture Support Libraries. - mbj - - - schema - schema - -The schema contains the definitions and whereabouts for all tables. In Mnesia it is realized as a special table named "schema". - hakan - - - schema functions - schema functions - -The functions which are available for managing schemas. - hakan - - - SDL - SDL - -Specification and Description Language. A ITU-T standard specification language which is used to specify the behaviour of switching systems. - kenneth - - - send - send - -A primitive for message processing in Erlang, sends a message to a process. - kenneth - - - shell - shell - -The shell is an interactive front-end to an Erlang node where Erlang expressions can be evaluated. - kenneth - - - shell prompt - shell prompt - -The text or symbol shown on the screen when the shell is ready to receive commands. - kent - - - SNMPEAlong - Simple Network Management Protocol Extensible Agent (SNMPEA). - -An Erlang/OTP application that includes a bilingual extensible SNMP agent. - mbj - - - single assignment - single assignment - -Means that once a variable has been assigned a value, the value can never be changed. Erlang is a single assignment language. - kenneth - - - single step - single step - -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. - olin - - - slave - slave - -Not in control, can never take over by himself. - kent - - - SSLlong - Secure Sockets Layer (SSL) - -A protocol created by Netscape Communications Corporation for authentication and encryption over TCP/IP networks, including Web. - helen - - - signature - signature - -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. - helen - - - SNMPshort - SNMP - -Simple Network Management Protocol. - mbj - - - SNMPshort - SNMPEA - -See Simple Network Management Protocol Extensible Agent. - mbj - - - spawn - spawn - -A primitive for multiprocessing in Erlang, that starts a parallel computation (called a process). The creation of a new process - kenneth - - - SSLshort - SSL - -See Secure Sockets Layer. - helen - - - SSLeay - SSLeay - -An SSL library developed by Eric Yong (eay@mincom.oz.au). - helen - - - SSLTOP - SSLTOP - -The path to your SSL directory, a subdirectory of ServerRoot. - helen - - - start script - start script - -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. - kenneth - - - stdlib - stdlib - -An application within Erlang/OTP which contains modules for manipulating lists, strings, files, etc. - kenneth - - - sticky directory - sticky directory - -A directory containing Erlang object code that is part of the runtime system. - kent - - - sticky lock - sticky lock - -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. - hakan - - - string - string - -The ASCII or ISO-8859-1 representation of the list of characters occurring within quotation marks in Erlang code. - kent - - - Subagent - Subagent - -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. - mbj - - - supervision tree - supervision tree - -A hierarcial tree of processes used to program fault tolerant systems. - mbj - - - supervisor - supervisor - -A behaviour to stucture fault tolerant computations, and program supervision trees with. - mbj - - - sup_bridge - supervisor bridge - -A behaviour used to connect a process, or subsystem, to a supervisor tree. - mbj - - - SASLlong - System Architecture Support Libraries (SASL) - -An Erlang/OTP application which contains services for error logging, release handling and report browsing. - mbj - - - .config - system configuration file - -A file which specifies configuration parameters for the applications in the system. - mbj - - - table lock - table lock - -Table locks are locks which are set on whole tables. They may either be read locks or write locks. - hakan - - - Table Visualizer - Table Visualizer - -A tool which enables the user to examine ETS and Mnesia tables. - olin - - - temporary child - temporary child - -A supervised process which is never restarted when it dies. - mbj - - - term - term - -The super type of all Erlang types. - kenneth - - - Toolbar - Toolbar - -A tool that provides an simplistic interface to the other various Erlang/OTP tools - olin - - - tools - tools - -An application within Erlang/OTP which contains the tools which are not applications themselves. - olin - - - transaction - transaction - -Transactions groups a set of database accesses into an atomic unit. All transactions has the ACID (atomicity, concistency, isolation and durability) properties. - hakan - - - transient child - transient child - -A supervised process which is restarted if it dies non-normally. - mbj - - - trigger - trigger - -The Interpreter. A break point that is reached by a process triggers if it is active, and the execution of the process is stopped. - olin - - - tty - tty - -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. - kent - - - tuple - tuple - -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 { }. - kenneth - - - variable - variable - -An alias for a memory position, in which a value can be put. Erlang variables always start with an upper case letter. - kenneth - - - workers - workers - -The lower nodes in a supervision tree. These are the processes that actually performs some real work, e.g. servers. - mbj - - - YECC - YECC - -A LALR-1 parser generator included in Erlang/OTP. It is written in Erlang and generates a parser as an Erlang module. - kenneth - - - 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 @@

The Parsetools application contains utilities for - parsing and scanning. Yecc is an parser - generator for Erlang, similar to yacc. Yecc takes a 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.

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 @@

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 s + breakpoints can only be set on BEAM code so BIFs cannot be call count traced.

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 @@ Module data, which are extracted from BEAM files, include local functions, exported functions, local calls and external calls. By default, - calls to built-in functions () are ignored, but + calls to built-in functions (BIF) are ignored, but if the option builtins, accepted by some of this module's functions, is set to true, calls to BIFs are included as well. It is the analyzing OTP version that 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 @@ - - - - - - agent - agent - -An entity that terminates a management protocol in the Network Element. - mbj - - - API - API - -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. - mbj - - - application - application - -A collection of resources which is required to offer a specific service. - mbj - - - appmon - Application Monitor - -A graphical node and application process tree viewer. See also appmon. - mbj - - - Appmon - Appmon - -Application name for the Application Monitor within Erlang/OTP. A graphical node and process viewer. - mbj - - - app callback - application callback module - -A module which is called when the application is started, and when it has stopped. Every application has one application callback module. - mbj - - - AC - application controller - -A process which coordinates all operations on applications. - mbj - - - app master - application master - -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. - mbj - - - .app file - application resource file - -Specifies the resources required by the application and how the application should be started. Every application has one application resource file, called AppName.app. - mbj - - - arity - arity - -Denotes the number of arguments to a function. - jocke - - - ASN.1 - ASN.1 - -Abstract Syntax Notation One - an ITU-T and ISO standard notation for describing data formats used in communication protocols. - kenneth - - - ASN.1 Compiler - ASN.1 Compiler - -The Erlang/OTP ASN.1 Compiler translates an ASN.1 module into a corresponding Erlang module with encode and decode functions. - kenneth - - - atom - atom - -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. - kenneth - - - atomicity - atomicity - -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. - hakan - - - attach - attach - -The debugger may attach to a process. When attached, the debugger may show process details, such as message queues and variable bindings. - olin - - - behaviour - behaviour - -A "pattern of design" which can be used to build applications and processes in an applications. - mbj - - - BIF - BIF - -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 - kenneth - - - binary - binary - -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. - kenneth - - - boolean - boolean - -A common data type in programming and specification languages. The value can be either true or false. - kenneth - - - boot file - boot file - -A binary file with extension .boot which is read during start of an Erlang node. See SASL User's Guide for more info. - kenneth - - - break point - break point - -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. - olin - - - CAshort - CA - -See Certification Authority. - helen - - - CA certificate - CA certificate - -A certificate containing a CA's public key. Network entities use this public key to verify certificates signed with the CA's private key. - helen - - - callback function - callback function - -A callback function is a function exported from a callback module, that a generic behaviour calls to perform a specific task. - mbj - - - callback module - callback module - -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. - mbj - - - certificate - certificate - -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. - helen - - - CAlong - Certification Authority (CA) - -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. - helen - - - CSRlong - Certificate Signing Request (CSR) - -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. - helen - - - child - child - -A supervised process. See also permanent, transient, temporary child. - mbj - - - cipher - cipher - -A system of encryption. - helen - - - ClearCase - ClearCase - -A configuration management system from Rational Software Corporation. - lars - - - client-server model - client-server model - -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. - mbj - - - cover - Coverage Analyser - -Module name for the coverage analyser tool, located in the Tools application. - gunilla - - - CORBAlong - Common Object Request Broker Architecture (CORBA) - -A specification of an architecture for a distributed object system - lars - - - CORBA - Common Object Request Broker Architecture (CORBA) - -A specification of an architecture for a distributed object system - lars - - - compiler - compiler - -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. - kenneth - - - consistency - consistency - -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. - hakan - - - cookie - cookie - -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 - kenneth - - - CORBAshort - CORBA - -See Common Object RequestBroker Architecture. - lars - - - Coverage Analyser - Coverage Analyser - -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. - olin - - - coverage analysis - coverage analysis - -The task of determining which lines, or how many lines of code, has actually been executed. Useful for determining the completeness of test suites. - olin - - - cross reference tool - cross reference tool - -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. - gunilla - - - CSRshort - CSR - -See Certificate Signing Request. - helen - - - data type - data type - -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. - kenneth - - - DBMSlong - Database Management System (DBMS) - -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. - hakan - - - DBMSshort - DBMS - -See Database Management System. - hakan - - - Debugger - Debugger - -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. - olin - - - dets - dets - -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. - hakan - - - dirty operations - dirty operations - -Functions which manipulate data in a DBMS, without using transactions. - hakan - - - distributed application - distributed application - -An application which runs on one of several nodes. May be restarted on another node. (See local application.) - mbj - - - DNSshort - DNS - -See Domain Name System. - lars - - - Docbuilder - Docbuilder - -The documentation system used in Erlang/OTP. - jocke - - - DNSlong - Domain Name System (DNS) - -DNS is a service that map names to internet addresses - lars - - - DTD - DTD - -Document Type Definition as defined in SGML. - jocke - - - durability - durability - -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. - hakan - - - Emacs - Emacs - -A widely used text editor which allows customization of its behaviour. An Erlang mode for Emacs is included in the Erlang deliverables. - kenneth - - - Emacs for Erlang - Emacs for Erlang - -A tool which provides a major mode for editing Erlang source files in Emacs. - olin - - - encaps - encapsulation - -Data can be encapsulated into another data element. - kent - - - eprof - eprof - -A module in the tools application. See Profiler. - olin - - - erl - erl - -The command which starts an Erlang run-time system. - kenneth - - - erl_interface - erl_interface library - -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. - kenneth - - - Erlang - Erlang - -Erlang is a functional programming language intended for designing large industrial soft real time systems. - kenneth - - - Erlang emulator - Erlang emulator - -Another word for Erlang Virtual Machine. - kenneth - - - ERTSlong - Erlang Run Time System - -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. - kenneth - - - Erlang VM - Erlang Virtual Machine - -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. - kenneth - - - ERTSshort - ERTS - -See Erlang Run Time System. - kenneth - - - ETS - ETS - -Erlang Term Storage tables. - olin - - - EVAshort - EVA - -See Event and Alarm handling application - mbj - - - EVAlong - Event and Alarm handling application (EVA) - -An application that consists of Fault Management functionality, such as sending and logging of events and alarms. - mbj - - - event handler - event handler - -A module exporting functions which can process events sent to an event manager process. The event handler is a behaviour of type gen_event. - mbj - - - event manager - event manager - -A process to which events of a certain category is sent. gen_event handler can be installed in the event manager. - mbj - - - exit signal - exit signal - -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}. - kent - - - foo - foo - -Algebraic place holder. - kent - - - FSM - FSM - -Finite State Machine. - kenneth - - - fun - fun - -A data type, introduced in Erlang 4.4, which represent functional objects. - kenneth - - - function - function - -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. - kenneth - - - Gateway - gateway - -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. - jocke - - - gen_event - gen_event - -A behaviour used for programming event handling mechanisms, such as alarm handlers, error loggers, and plug-and-play handlers. - mbj - - - gen_fsm - gen_fsm - -A behaviour used for programming finite state machines. - mbj - - - gen_server - gen_server - -A behaviour used for programming client-server processes. - mbj - - - gterm - Global Glossary Database - -A glossary database used to list common acronymns and defintions etc. - jocke - - - xref - xref - -A cross reference tool that can be used for finding dependencies between functions, modules, applications and releases. Part of the Tools application. - gunilla - - - GSlong - Graphics System - -A library module which provides a graphics interface for Erlang. - mbj - - - grid - grid - -A multi-column object which is used to display tables. (Graphics System.) - mbj - - - GSshort - GS - -See Graphics System. - olin - - - GS Contributions - GS Contributions - -Unsupported user supplied tools which are included with the Erlang/OTP software release. - olin - - - GUI - GUI - -Graphical User Interface - mbj - - - Home Directory - Home Directory - -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. - kenneth - - - host name - host name - -The name of a machine on a network, e.g. erlang.ericsson.se. - kent - - - HTML - HTML - -Hypertext Markup Language. - jocke - - - HTTP - HTTP - -Hypertext Transfer Protocol. - jocke - - - HTTPS - HTTPS - -The Hypertext Transport Protocol, Secure, the standard SSL communication mechanism of the World Wide Web. - helen - - - IDLshort - IDL - -See Interface Description Language. - lars - - - IDLlong - Interface Description Language (IDL) - -The interface specification language created by OMG. - lars - - - indexing - indexing - -Fast lookup using an (usually enumerated) key. - kent - - - I1 - INETS - -The Internet Services application - jocke - - - initial call - initial call - -The first call to an interpreted function (when using the Interpreter). - kent - - - instrumentation function - instrumentation function - -A function used to implement a Managed Object, i.e. give access to the real resources behind an MO. - mbj - - - IDLlong - Interface Description Language (IDL) - -The interface specification language created by OMG. - lars - - - interpreter - interpreter - -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. - kent - - - isolation - isolation - -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. - hakan - - - kernel - kernel - -An application which contains file servers, code servers and other code necessary for the Erlang run-time system. - kenneth - - - key - key - -A file containing the value that must be fed into an algorithm in order to encrypt or decrypt a message. - helen - - - key pair - key pair - -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. - helen - - - list - list - -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. - kenneth - - - list box - list box - -A list of labels with optional scroll bars attached. (Graphics System.) - mbj - - - lc - list comprehension - -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. - kenneth - - - local application - local application - -An application which runs on one node and which are always started at the local node only. (See distributed application.) - mbj - - - manager - manager - -An entity that terminates a management protocol in the Network Management Station. - mbj - - - Master Agent - Master Agent - -The SNMP agent system consists of one Master Agent which terminates the SNMP protocol - mbj - - - MIB - Management Information Base (MIB) - -An abstract definition of the management information available through a management interface in a system. - mbj - - - matching - matching - -See pattern matching. - kenneth - - - message queue - message queue - -The queue of not yet received messages that are in the mailbox of a process. - olin - - - Mnemosyne - Mnemosyne - -Mnemosyne was the query language of Mnesia up to the R11B release. Supersed by QLC. - hakan - - - Mnesia - Mnesia - -Mnesia is a distributed Database Management System, appropriate for telecommunications applications and other applications with need of continuous operation and soft real-time properties. - hakan - - - MIBshort - MIB - -See Management Information Base. - mbj - - - MIME - MIME - -Multi-purpose Internet Mail Extensions. - jocke - - - MOlong - Managed Object (MO) - -The abstract management information defined in a MIB. - mbj - - - MO - MO - -Managed Object; The abstract management information defined in a MIB. - nibe - - - MOshort - MO - -See Managed Object. - mbj - - - module - module - -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. - kenneth - - - NCSA - NCSA - -The National Center for Supercomputing Applications. - jocke - - - NEshort - NE - -See Network Element. - mbj - - - NElong - Network Element - -In OTP, the Network Element is the entire distributed OTP system, meaning that the distributed OTP system is managed as one entity. - mbj - - - NE - NE - -Network Element; In OTP, the Network Element is the entire distributed OTP system, meaning that the distributed OTP system is managed as one entity. - mbj - - - NMSlong - Network Management Station (NMS) - -The place where the operator manages the network. - mbj - - - NMS - NMS - -Network Management Station; The place where the operator manages the network. - nibe - - - NMSshort - NMS - -See Network Management Station. - mbj - - - node - node - -An executing Erlang run-time system which can communicate with other Erlang run-time systems. - kenneth - - - node name - node name - -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. - kenneth - - - notation - notation - -How things are written. - kent - - - notification - notification - -Information of an event. - kent - - - NROFF - NROFF - -A text formatting language for line printer quality output devices that runs on the UNIX operating system. - jocke - - - number - number - -A data type in Erlang. Are subdivided into integers, for storing natural numbers, or floats, for storing real numbers. - kenneth - - - OMGlong - Object Managment Group (OMG) - -A standardisation group for all specifications in the area of CORBA. - lars - - - OMGshort - OMG - -Object Managment Group. - lars - - - OTP - OTP - -Open Telecom Platform - mike - - - os_mon - os_mon - -An application which monitors the behaviour of the underlying operating system - mbj - - - parser generator - parser generator - -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. - kenneth - - - pass phrase - pass phrase - -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. - helen - - - pattern matching - pattern matching - -A basic mechanism in Erlang for assigning values to variables and for controlling the flow of a program. - kenneth - - - permanent child - permanent child - -A supervised process which always is restarted when it dies. - mbj - - - Pid - Pid - -Process Identifier. A data type in Erlang for storing process references. The process identity of the process displayed in the line. - kenneth - - - Pman - Pman - -Module and application name for the Process Trace Tool. - olin - - - point - point - -A unit used to indicate the size of a typeface. Equal to 1/72 inches. - jocke - - - pointer - pointer - -A pointer tells where data is stored. Memory pointers are not used in Erlang. - kent - - - port - port - -A data type in Erlang. Ports provide the basic mechanism for communication with the external world. - peterl - - - port controller - port controller - -An Erlang process which controls a port program. A port has exactly one port controller. - peterl - - - port program - port program - -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. - kenneth - - - PostScript - PostScript - -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. - jocke - - - pretty-printed - pretty-printed - -Nicely formatted code or data, e.g. C or Erlang, with indents and tabs etc. - jocke - - - primitive - primitive - -The basic elements in a programming language. - kent - - - private key - private key - -The secret key in a pair, used to decrypt incoming messages and sign outgoing ones. - helen - - - process - process - -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. - kenneth - - - process dictionary - process dictionary - -Each process has an associated dictionary which provides the process with simple destructive storage capabilities. - kenneth - - - Process Manager - Process Manager - -Obsolete name for the Process Trace Tool. - olin - - - Process Trace Tool - Process Trace Tool - -A tool which gives an overview of the processes in the Erlang run-time system. See also Pman. - olin - - - Profiler - Profiler - -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. - olin - - - program - program - -Routines which can be executed by a computer. - kent - - - Proxy - proxy - -An intermediary program which acts as both a server and a client for the purpose of making requests on behalf of other clients. - jocke - - - public key - public key - -The publicly available key in a key pair, used to encrypt messages bound for its owner and to decrypt signatures made by its owner. - helen - - - query - query - -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. - hakan - - - query language - query language - -A language which is specially designed to express database queries. Examples of query languages are QLC and SQL. - hakan - - - receive - receive - -A primitive for message processing in Erlang, receives a message from a process. - kenneth - - - record - record - -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. - kenneth - - - recursion - recursion - -A function is recursive if it calls itself until the result desired is attained. Recursion is the heart of functional programming. - kenneth - - - reference - reference - -A data type in Erlang for storing system unique references. - kenneth - - - release handler - release handler - -A SASL process which handles software upgrade. - mbj - - - relup - release upgrade script - -A script with instructions to the release handler of how the release should be installed in the system. - mbj - - - RPC - Remote Proceedure Call - -A technique for evaluating a function transparently on a remote node. - kenneth - - - resource - resource - -The actual resource to be managed. A resource is represented by a Managed Object. Each resource is mapped to one or several resources. - mbj - - - resources - resources - -The actual resources to be managed. A resource is represented by a Managed Object. Each resource is mapped to one or several resources. - nibe - - - RFC - RFC - -A "Request for Comments" used as a proposed standard by IETF. - jocke - - - SASLshort - SASL - -See System Architecture Support Libraries. - mbj - - - schema - schema - -The schema contains the definitions and whereabouts for all tables. In Mnesia it is realized as a special table named "schema". - hakan - - - schema functions - schema functions - -The functions which are available for managing schemas. - hakan - - - SDL - SDL - -Specification and Description Language. A ITU-T standard specification language which is used to specify the behaviour of switching systems. - kenneth - - - send - send - -A primitive for message processing in Erlang, sends a message to a process. - kenneth - - - shell - shell - -The shell is an interactive front-end to an Erlang node where Erlang expressions can be evaluated. - kenneth - - - shell prompt - shell prompt - -The text or symbol shown on the screen when the shell is ready to receive commands. - kent - - - SNMPEAlong - Simple Network Management Protocol Extensible Agent (SNMPEA). - -An Erlang/OTP application that includes a bilingual extensible SNMP agent. - mbj - - - single assignment - single assignment - -Means that once a variable has been assigned a value, the value can never be changed. Erlang is a single assignment language. - kenneth - - - single step - single step - -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. - olin - - - slave - slave - -Not in control, can never take over by himself. - kent - - - SSLlong - Secure Sockets Layer (SSL) - -A protocol created by Netscape Communications Corporation for authentication and encryption over TCP/IP networks, including Web. - helen - - - signature - signature - -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. - helen - - - SNMPshort - SNMP - -Simple Network Management Protocol. - mbj - - - SNMPshort - SNMPEA - -See Simple Network Management Protocol Extensible Agent. - mbj - - - spawn - spawn - -A primitive for multiprocessing in Erlang, that starts a parallel computation (called a process). The creation of a new process - kenneth - - - SSLshort - SSL - -See Secure Sockets Layer. - helen - - - SSLeay - SSLeay - -An SSL library developed by Eric Yong (eay@mincom.oz.au). - helen - - - SSLTOP - SSLTOP - -The path to your SSL directory, a subdirectory of ServerRoot. - helen - - - start script - start script - -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. - kenneth - - - stdlib - stdlib - -An application within Erlang/OTP which contains modules for manipulating lists, strings, files, etc. - kenneth - - - sticky directory - sticky directory - -A directory containing Erlang object code that is part of the runtime system. - kent - - - sticky lock - sticky lock - -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. - hakan - - - string - string - -The ASCII or ISO-8859-1 representation of the list of characters occurring within quotation marks in Erlang code. - kent - - - Subagent - Subagent - -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. - mbj - - - supervision tree - supervision tree - -A hierarcial tree of processes used to program fault tolerant systems. - mbj - - - supervisor - supervisor - -A behaviour to stucture fault tolerant computations, and program supervision trees with. - mbj - - - sup_bridge - supervisor bridge - -A behaviour used to connect a process, or subsystem, to a supervisor tree. - mbj - - - SASLlong - System Architecture Support Libraries (SASL) - -An Erlang/OTP application which contains services for error logging, release handling and report browsing. - mbj - - - .config - system configuration file - -A file which specifies configuration parameters for the applications in the system. - mbj - - - table lock - table lock - -Table locks are locks which are set on whole tables. They may either be read locks or write locks. - hakan - - - Table Visualizer - Table Visualizer - -A tool which enables the user to examine ETS and Mnesia tables. - olin - - - temporary child - temporary child - -A supervised process which is never restarted when it dies. - mbj - - - term - term - -The super type of all Erlang types. - kenneth - - - Toolbar - Toolbar - -A tool that provides an simplistic interface to the other various Erlang/OTP tools - olin - - - tools - tools - -An application within Erlang/OTP which contains the tools which are not applications themselves. - olin - - - transaction - transaction - -Transactions groups a set of database accesses into an atomic unit. All transactions has the ACID (atomicity, concistency, isolation and durability) properties. - hakan - - - transient child - transient child - -A supervised process which is restarted if it dies non-normally. - mbj - - - trigger - trigger - -The Interpreter. A break point that is reached by a process triggers if it is active, and the execution of the process is stopped. - olin - - - tty - tty - -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. - kent - - - tuple - tuple - -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 { }. - kenneth - - - variable - variable - -An alias for a memory position, in which a value can be put. Erlang variables always start with an upper case letter. - kenneth - - - workers - workers - -The lower nodes in a supervision tree. These are the processes that actually performs some real work, e.g. servers. - mbj - - - YECC - YECC - -A LALR-1 parser generator included in Erlang/OTP. It is written in Erlang and generates a parser as an Erlang module. - kenneth - - - -- cgit v1.2.1 From 0d0093a0a888d6ad168b389bd61b05f3f3a7878e Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 18 Feb 2020 16:21:15 +0100 Subject: Add Module prefix to all callbacks --- lib/parsetools/doc/src/leex.xml | 12 ++++++------ lib/xmerl/doc/src/xmerl_sax_parser.xml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) 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() - string(String) -> StringRet - string(String, StartLine) -> StringRet + Module:string(String) -> StringRet + Module:string(String, StartLine) -> StringRet Generated by Leex String = string() @@ -164,9 +164,9 @@ Token = tuple() - token(Cont, Chars) -> {more,Cont1} | {done,TokenRet,RestChars} + Module:token(Cont, Chars) -> {more,Cont1} | {done,TokenRet,RestChars} - token(Cont, Chars, StartLine) -> {more,Cont1} + Module:token(Cont, Chars, StartLine) -> {more,Cont1} | {done,TokenRet,RestChars} Generated by Leex @@ -199,9 +199,9 @@ io:request(InFile, {get_until,unicode,Prompt,Module,token,[Line]}) - tokens(Cont, Chars) -> {more,Cont1} | {done,TokensRet,RestChars} + Module:tokens(Cont, Chars) -> {more,Cont1} | {done,TokensRet,RestChars} - tokens(Cont, Chars, StartLine) -> + Module:tokens(Cont, Chars, StartLine) -> {more,Cont1} | {done,TokensRet,RestChars} Generated by Leex diff --git a/lib/xmerl/doc/src/xmerl_sax_parser.xml b/lib/xmerl/doc/src/xmerl_sax_parser.xml index 2390779028..2244b53e44 100644 --- a/lib/xmerl/doc/src/xmerl_sax_parser.xml +++ b/lib/xmerl/doc/src/xmerl_sax_parser.xml @@ -381,7 +381,7 @@ - ContinuationFun(State) -> {NewBytes, NewState} + Module:ContinuationFun(State) -> {NewBytes, NewState} Continuation call back function. State = NewState = term() @@ -402,7 +402,7 @@ - EventFun(Event, Location, State) -> NewState + Module:EventFun(Event, Location, State) -> NewState Event call back function. Event = event() -- cgit v1.2.1 From 76196166139bbc951ba654c990235bf1119cbd8b Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 18 Feb 2020 16:23:30 +0100 Subject: Fix ssl doc to use a single name convention --- lib/ssl/doc/src/ssl.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) -> - start(Type) -> ok | {error, Reason} + Starts the SSL application.

Starts the SSL application. Default type -- cgit v1.2.1 From 20768968b529bc6d5b31da7ed1cbba49dc4fb3ed Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 18 Feb 2020 16:25:47 +0100 Subject: Fix ssh type doc to use common name convention --- lib/ssh/doc/src/ssh.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 @@ - opaque_client_options - opaque_daemon_options - opaque_common_options + opaque_client_options() + opaque_daemon_options() + opaque_common_options() -- cgit v1.2.1 From eae33e2e3d4fc37fe0c6883b4aebf7acf5f93abc Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 18 Feb 2020 16:27:51 +0100 Subject: Fix mnesia docs to use common name convention --- lib/mnesia/doc/src/mnesia.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) - async_dirty(Fun, [, Args]) -> ResultOfFun | exit(Reason) + async_dirty(Fun [, Args]) -> ResultOfFun | exit(Reason) Calls the Fun in a context that is not protected by a transaction. @@ -1259,7 +1259,7 @@ mnesia:create_table(person, - ets(Fun, [, Args]) -> ResultOfFun | exit(Reason) + ets(Fun [, Args]) -> ResultOfFun | exit(Reason) Calls the Fun in a raw context that is not protected by a transaction. @@ -2134,7 +2134,7 @@ mnesia:create_table(employee, - sync_dirty(Fun, [, Args]) -> ResultOfFun | exit(Reason) + sync_dirty(Fun [, Args]) -> ResultOfFun | exit(Reason) Calls the Fun in a context that is not protected by a transaction. -- cgit v1.2.1 From e58cf21c13b69b12211543d493d236f51103c0af Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 18 Feb 2020 16:30:48 +0100 Subject: Fix docs to handle chunk generation Many modules are only there as references for call-backs. Also some functions seem to have documentation but no implementation. --- lib/et/doc/src/et_collector.xml | 24 ------------------------ lib/et/src/et_collector.erl | 2 -- lib/inets/src/http_server/httpd.erl | 3 ++- lib/megaco/doc/src/megaco.xml | 17 ----------------- lib/mnesia/doc/src/Mnesia_chap4.xmlsrc | 2 +- lib/observer/doc/src/ttb.xml | 17 +++++++++++++++-- lib/snmp/doc/src/snmp_pdus.xml | 1 - lib/tools/src/eprof.erl | 2 +- 8 files changed, 19 insertions(+), 49 deletions(-) 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 @@ -138,19 +138,6 @@

The options defaults to existing, write and keep.

- - load_event_file(CollectorPid, FileName) -> {ok, BadBytes} | exit(Reason) - Load the event table from a file - - CollectorPid = pid() - FileName = string() - BadBytes = integer(X) where X >= 0 - Reason = term() - - -

Load the event table from a file.

-
-
report(Handle, TraceOrEvent) -> {ok, Continuation} | exit(Reason) report_event(Handle, DetailLevel, FromTo, Label, Contents) -> {ok, Continuation} | exit(Reason) @@ -192,17 +179,6 @@

Make a key out of an event record or an old key.

- - get_table_handle(CollectorPid) -> Handle - Return a table handle - - CollectorPid = pid() - Handle = record(table_handle) - - -

Return a table handle.

-
-
get_global_pid() -> CollectorPid | exit(Reason) Return a the identity of the globally registered collector if there is any 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/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/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 @@ -1968,23 +1968,6 @@ megaco_incr_timer() = #megaco_incr_timer{} - - get_sdp_record_from_PropertGroup(Type, PG) -> [sdp()] - Get all sdp records of a certain type from a property group - - Type = v | c | m | o | a | b | t | r | z | k | s | i | u | e | p - PG = sdp_property_group() - Reason = term() - - -

Retreive all the sdp records of type Type from the - property group PG.

- - - -
-
- versions1() -> {ok, VersionInfo} | {error, Reason} versions2() -> {ok, Info} | {error, Reason} diff --git a/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc b/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc index b8d86adbf1..b07c40b22f 100644 --- a/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc +++ b/lib/mnesia/doc/src/Mnesia_chap4.xmlsrc @@ -761,7 +761,7 @@ mnesia:all_keys/1. node but not the others. If the table resides locally, no waiting occurs.

By passing the same "fun" as an argument to the function - mnesia:sync_dirty(Fun [, Args]), + mnesia:sync_dirty(Fun [, Args]), it is performed in almost the same context as the function mnesia:async_dirty/1,2. The difference is that the operations are performed 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). - tp, tpl, ctp, ctpl, ctpg - tpe, ctpe + tp(Module [, Function [, Arity]], MatchSpec) + tp({Module, Function , Arity}, MatchSpec) + tpl(Module [, Function [, Arity]], MatchSpec) + tpl({Module, Function , Arity}, MatchSpec) + ctp() + ctp(Module [, Function [, Arity]]) + ctp({Module, Function, Arity}) + ctpl() + ctpl(Module [, Function [, Arity]]) + ctpl({Module, Function, Arity}) + ctpg() + ctpg(Module [, Function [, Arity]]) + ctpg({Module, Function, Arity}) + tpe(Event,MatchSpec) + ctpe(Event) Set and clear trace patterns.

These functions are to be used with trace 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 @@

Decodes a list of bytes into an SNMP UsmSecurityParameters

- enc_message(Message) -> [byte()] Encode an SNMP Message 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]). -- cgit v1.2.1 From 043a1ae7a4c14ead443884aaa57995d852d2a9e7 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 30 Jan 2020 16:10:22 +0100 Subject: otp: Refactor doc make system and introduce EEP-48 --- .gitignore | 2 + erts/doc/Makefile | 37 - erts/doc/src/.gitignore | 3 + erts/doc/src/Makefile | 113 +- erts/doc/src/epmd.xml | 337 ---- erts/doc/src/epmd_cmd.xml | 335 ++++ erts/doc/src/erl.xml | 1781 -------------------- erts/doc/src/erl_cmd.xml | 1781 ++++++++++++++++++++ erts/doc/src/erlc.xml | 390 ----- erts/doc/src/erlc_cmd.xml | 389 +++++ erts/doc/src/erlsrv.xml | 533 ------ erts/doc/src/erlsrv_cmd.xml | 532 ++++++ erts/doc/src/escript.xml | 451 ----- erts/doc/src/escript_cmd.xml | 450 +++++ erts/doc/src/ref_man.xml.src | 18 +- erts/doc/src/run_erl.xml | 216 --- erts/doc/src/run_erl_cmd.xml | 215 +++ erts/doc/src/start.xml | 73 - erts/doc/src/start_cmd.xml | 72 + erts/doc/src/start_erl.xml | 169 -- erts/doc/src/start_erl_cmd.xml | 168 ++ erts/doc/src/werl.xml | 118 -- erts/doc/src/werl_cmd.xml | 117 ++ lib/asn1/doc/src/Makefile | 79 +- lib/common_test/doc/src/Makefile | 89 +- lib/common_test/doc/src/ct_run.xml | 229 --- lib/common_test/doc/src/ct_run_cmd.xml | 228 +++ lib/common_test/doc/src/ref_man.xml | 2 +- lib/compiler/doc/src/Makefile | 83 +- lib/crypto/doc/src/Makefile | 79 +- lib/debugger/doc/src/Makefile | 84 +- lib/debugger/doc/src/attach.jpg | Bin 0 -> 56341 bytes lib/debugger/doc/src/cond_break_dialog.jpg | Bin 0 -> 21770 bytes lib/debugger/doc/src/debugger_chapter.xml | 14 +- lib/debugger/doc/src/function_break_dialog.jpg | Bin 0 -> 13532 bytes lib/debugger/doc/src/images/attach.jpg | Bin 56341 -> 0 bytes lib/debugger/doc/src/images/cond_break_dialog.jpg | Bin 21770 -> 0 bytes .../doc/src/images/function_break_dialog.jpg | Bin 13532 -> 0 bytes lib/debugger/doc/src/images/interpret.jpg | Bin 28924 -> 0 bytes lib/debugger/doc/src/images/line_break_dialog.jpg | Bin 14414 -> 0 bytes lib/debugger/doc/src/images/monitor.jpg | Bin 40742 -> 0 bytes lib/debugger/doc/src/images/view.jpg | Bin 34504 -> 0 bytes lib/debugger/doc/src/interpret.jpg | Bin 0 -> 28924 bytes lib/debugger/doc/src/line_break_dialog.jpg | Bin 0 -> 14414 bytes lib/debugger/doc/src/monitor.jpg | Bin 0 -> 40742 bytes lib/debugger/doc/src/view.jpg | Bin 0 -> 34504 bytes lib/dialyzer/doc/src/Makefile | 70 +- lib/diameter/doc/src/Makefile | 116 +- lib/diameter/doc/src/diameterc.xml | 149 -- lib/diameter/doc/src/diameterc_cmd.xml | 149 ++ lib/diameter/doc/src/files.mk | 4 +- lib/diameter/doc/src/ref_man.xml | 2 +- lib/edoc/doc/src/Makefile | 97 +- lib/eldap/doc/src/Makefile | 76 +- lib/erl_docgen/doc/src/Makefile | 75 +- lib/erl_docgen/priv/bin/specs_gen.escript | 3 +- lib/erl_interface/doc/src/Makefile | 69 +- lib/erl_interface/doc/src/erl_call.xml | 283 ---- lib/erl_interface/doc/src/erl_call_cmd.xml | 283 ++++ lib/erl_interface/doc/src/ref_man.xml | 2 +- lib/et/doc/src/Makefile | 80 +- lib/et/doc/src/files.mk | 2 - lib/eunit/doc/src/Makefile | 127 +- lib/ftp/doc/src/Makefile | 102 +- lib/hipe/doc/src/Makefile | 76 +- lib/inets/doc/src/Makefile | 99 +- lib/jinterface/doc/src/Makefile | 68 +- lib/kernel/doc/src/Makefile | 108 +- lib/megaco/doc/src/Makefile | 119 +- lib/megaco/doc/src/files.mk | 2 +- lib/mnesia/doc/src/Makefile | 81 +- lib/observer/doc/src/Makefile | 88 +- lib/observer/doc/src/cdv.xml | 61 - lib/observer/doc/src/cdv_cmd.xml | 61 + lib/observer/doc/src/ref_man.xml | 2 +- lib/odbc/doc/src/Makefile | 76 +- lib/os_mon/doc/src/Makefile | 71 +- lib/parsetools/doc/src/Makefile | 71 +- lib/public_key/doc/src/Makefile | 105 +- lib/reltool/doc/src/Makefile | 77 +- lib/runtime_tools/doc/src/Makefile | 77 +- lib/sasl/doc/src/Makefile | 76 +- lib/snmp/doc/src/Makefile | 116 +- lib/snmp/doc/src/files.mk | 16 +- lib/ssh/doc/src/Makefile | 87 +- lib/ssl/doc/src/Makefile | 86 +- lib/stdlib/doc/src/Makefile | 71 +- lib/syntax_tools/doc/src/Makefile | 101 +- lib/tftp/doc/src/Makefile | 100 +- lib/tools/doc/src/Makefile | 77 +- lib/wx/doc/src/Makefile | 95 +- lib/xmerl/doc/src/Makefile | 118 +- make/doc.mk | 179 ++ make/otp.mk.in | 12 +- make/otp_release_targets.mk | 6 +- 95 files changed, 5161 insertions(+), 8097 deletions(-) delete mode 100644 erts/doc/Makefile create mode 100644 erts/doc/src/.gitignore delete mode 100644 erts/doc/src/epmd.xml create mode 100644 erts/doc/src/epmd_cmd.xml delete mode 100644 erts/doc/src/erl.xml create mode 100644 erts/doc/src/erl_cmd.xml delete mode 100644 erts/doc/src/erlc.xml create mode 100644 erts/doc/src/erlc_cmd.xml delete mode 100644 erts/doc/src/erlsrv.xml create mode 100644 erts/doc/src/erlsrv_cmd.xml delete mode 100644 erts/doc/src/escript.xml create mode 100644 erts/doc/src/escript_cmd.xml delete mode 100644 erts/doc/src/run_erl.xml create mode 100644 erts/doc/src/run_erl_cmd.xml delete mode 100644 erts/doc/src/start.xml create mode 100644 erts/doc/src/start_cmd.xml delete mode 100644 erts/doc/src/start_erl.xml create mode 100644 erts/doc/src/start_erl_cmd.xml delete mode 100644 erts/doc/src/werl.xml create mode 100644 erts/doc/src/werl_cmd.xml delete mode 100644 lib/common_test/doc/src/ct_run.xml create mode 100644 lib/common_test/doc/src/ct_run_cmd.xml create mode 100644 lib/debugger/doc/src/attach.jpg create mode 100644 lib/debugger/doc/src/cond_break_dialog.jpg create mode 100644 lib/debugger/doc/src/function_break_dialog.jpg delete mode 100644 lib/debugger/doc/src/images/attach.jpg delete mode 100644 lib/debugger/doc/src/images/cond_break_dialog.jpg delete mode 100644 lib/debugger/doc/src/images/function_break_dialog.jpg delete mode 100644 lib/debugger/doc/src/images/interpret.jpg delete mode 100644 lib/debugger/doc/src/images/line_break_dialog.jpg delete mode 100644 lib/debugger/doc/src/images/monitor.jpg delete mode 100644 lib/debugger/doc/src/images/view.jpg create mode 100644 lib/debugger/doc/src/interpret.jpg create mode 100644 lib/debugger/doc/src/line_break_dialog.jpg create mode 100644 lib/debugger/doc/src/monitor.jpg create mode 100644 lib/debugger/doc/src/view.jpg delete mode 100644 lib/diameter/doc/src/diameterc.xml create mode 100644 lib/diameter/doc/src/diameterc_cmd.xml delete mode 100644 lib/erl_interface/doc/src/erl_call.xml create mode 100644 lib/erl_interface/doc/src/erl_call_cmd.xml delete mode 100644 lib/observer/doc/src/cdv.xml create mode 100644 lib/observer/doc/src/cdv_cmd.xml create mode 100644 make/doc.mk diff --git a/.gitignore b/.gitignore index 754d13515c..485acca50d 100644 --- a/.gitignore +++ b/.gitignore @@ -185,6 +185,7 @@ JAVADOC-GENERATED /lib/*/doc/pdf/*.pdf /lib/*/doc/src/*.fo /lib/*/doc/xml/*.xml +/lib/*/doc/xml/*.ent /lib/config.log /lib/config.status @@ -283,6 +284,7 @@ JAVADOC-GENERATED /erts/doc/pdf/*.pdf /erts/doc/src/*.fo /erts/doc/xml/*.xml +/erts/doc/xml/figures/*.png /erts/doc/man[0-9]/*.[0-9] /erts/doc/CONF_INFO 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..2e13620b13 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) -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 @@ -152,61 +146,25 @@ INTERNAL_DOC_PNG_FILES = $(wildcard ../../emulator/internal_doc/figures/*.png) 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)/%) +docs: 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_docs_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.xml deleted file mode 100644 index 8a9da59605..0000000000 --- a/erts/doc/src/epmd.xml +++ /dev/null @@ -1,337 +0,0 @@ - - - - -
- - 19962016 - Ericsson AB. 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. - - - - epmd - Claes Wikström - - 1 - - - 1998-01-05 - A - epmd.xml -
- - epmd - Erlang Port Mapper Daemon - - - - - - -

Starts the port mapper daemon.

-
- - -

Communicates with a running port mapper daemon.

-
-
- -

This daemon acts as a name server on all hosts involved in - distributed Erlang computations. When an Erlang node starts, - the node has a name and it obtains an address from the host - OS kernel. The name and address are sent to the - daemon running on the local host. - In a TCP/IP environment, the address consists - of the IP address and a port number. The node name is - an atom on the form of . - The job of the daemon is to keep track of which - node name listens on which address. Hence, maps - symbolic node names to machine addresses.

- -

The TCP/IP epmd daemon only keeps track of - the Name (first) part of an Erlang node name. The Host - part (whatever is after the ) is implicit in the - node name where the epmd daemon was contacted, - as is the IP address where the Erlang node can be - reached. Consistent and correct TCP naming services are - therefore required for an Erlang network to function - correctly.

- -

On Windows the maximum number of nodes allowed in one - epmd instance is 60. This is because of limitations in the current - implementation. If you need more nodes, you should look into using - and erlang based epmd implementation such as - Erlang EPMD.

- - - Starting the port mapper daemon - -

The daemon is started automatically by command - erl(1) - if the node is to be distributed and no running - instance is present. If automatically launched - environment variables must be used to change the behavior - of the daemon; see section - Environment - Variables.

-

If argument -daemon is not specified, - runs as a normal program with the - controlling terminal of the shell in which it is - started. Normally, it is to be run as a daemon.

-

Regular startup options are described in section - Regular Options.

-

The DbgExtra options are described in section - DbgExtra Options.

-
- Communicating with a running port mapper daemon - -

Communicating with the running epmd daemon by the - epmd program is done primarily for debugging purposes.

-

The different queries are described in section Interactive options.

-
-
-
- -
- - Regular Options -

These options are available when starting the name server. The name - server is normally started automatically by command - erl(1) (if not already available), - but it can also be started at system startup.

- - - - -

Lets this instance of epmd listen only on the - comma-separated list of IP addresses and on the loopback address - (which is implicitly added to the list if it has not been - specified). This can also be set using environment variable - ; see section Environment Variables.

-
- - -

Lets this instance of epmd listen to another TCP port than - default 4369. This can also be set using environment variable - ; see section Environment Variables.

-
- - -

Enables debug output. The more -d flags specified, the more - debug output you will get (to a certain limit). This option is most - useful when the epmd daemon is not started as a daemon.

-
- - -

Starts epmd detached from the controlling terminal. Logging - ends up in syslog when available and correctly configured. If the - epmd daemon is started at boot, this option is definitely - to be used. It is also used when command erl automatically - starts epmd.

-
- - -

Starts the epmd program with relaxed command checking - (mostly for backward compatibility). This affects the following:

- - -

With relaxed command checking, the epmd daemon can be - killed from the local host with, for example, command - epmd -kill even if active nodes are registered. Normally - only daemons with an empty node database can be killed with - epmd -kill.

-
- -

Command epmd -stop (and the corresponding messages to - epmd, as can be specified using erl_interface:ei(3)) is - normally always ignored. This because it can cause a strange - situation where two nodes of the same name can be alive at the - same time. A node unregisters itself by only closing the - connection to epmd, which is why command stop - was only intended for use in debugging situations.

-

With relaxed command checking enabled, you can forcibly - unregister live nodes.

-
-
-

Relaxed command checking can also be enabled by setting environment - variable ERL_EPMD_RELAXED_COMMAND_CHECK before starting - epmd.

-

Use relaxed command checking only on systems with very limited - interactive usage.

-
-
-
- -
- - DbgExtra Options - -

These options are only for debugging and testing epmd clients. - They are not to be used in normal operation.

-
- - - - -

Sets the number of seconds a connection can be - inactive before epmd times out and closes the - connection. Defaults to 60.

-
- - -

To simulate a busy server, you can insert a delay between when - epmd gets notified that a new connection is requested and - when the connection gets accepted.

-
- - -

Also a simulation of a busy server. Inserts - a delay before a reply is sent.

-
-
-
- -
- - Interactive Options -

These options make epmd run as an interactive command, - displaying the results of sending queries to an already running - instance of epmd. The epmd contacted is always on the - local node, but option -port can be used to select between - instances if several are running using different ports on the host.

- - - - -

Contacts the epmd listening on the specified TCP port - number (default 4369). This can also be set using environment - variable ; see section Environment Variables.

-
- - -

Lists names registered with the currently running epmd.

-
- - -

Kills the currently running epmd.

-

Killing the running epmd is only allowed if - epmd -names shows an empty database or if - -relaxed_command_check was specified when the running - instance of epmd was started.

-

Notice that -relaxed_command_check is specified when - starting the daemon that is to accept killing when it has live - nodes registered. When running epmd interactively, - -relaxed_command_check has no effect. A daemon that is - started without relaxed command checking must be killed using, - for example, signals or some other OS-specific method if it has - active clients registered.

-
- - -

Forcibly unregisters a live node from the epmd database.

-

This command can only be used when contacting epmd - instances started with flag -relaxed_command_check.

-

Notice that relaxed command checking must enabled for the - epmd daemon contacted. When running epmd - interactively, -relaxed_command_check has no effect.

-
-
-
- -
- - Environment Variables - - - -

Can be set to a comma-separated - list of IP addresses, in which case the epmd daemon - will listen only on the specified address(es) and on the - loopback address (which is implicitly added to the list if it - has not been specified). The default behavior is to listen on - all available IP addresses.

-
- - -

Can contain the port number epmd will use. - The default port will work fine in most cases. A different port can - be specified to allow several instances of epmd, representing - independent clusters of nodes, to co-exist on the same host. - All nodes in a cluster must use the same epmd port number.

-
- - -

If set before start, the epmd daemon behaves - as if option -relaxed_command_check was specified at - startup. Consequently, if this option is set before starting - the Erlang virtual machine, the automatically started - epmd accepts the -kill and -stop - commands without restrictions.

-
-
-
- -
- Logging -

On some operating systems syslog will be used for - error reporting when epmd runs as a daemon. To enable - the error logging, you must edit the /etc/syslog.conf file and - add an entry:

- - /var/log/epmd.log -]]> - -

where <TABs> are at least one real tab character. - Spaces are silently ignored.

-
- -
- Access Restrictions -

The epmd daemon accepts messages from both the local host and - remote hosts. However, only the query commands are answered (and - acted upon) if the query comes from a remote host. It is always an - error to try to register a node name if the client is not a process - on the same host as the epmd instance is running on. Such - requests are considered hostile and the connection is closed - immediately.

- -

The following queries are accepted from remote nodes:

- - - -

Port queries, that is, on which port the node with a specified - name listens

-
- -

Name listing, that is, gives a list of all names registered on - the host

-
-
- -

To restrict access further, firewall software must be used.

-
-
- - diff --git a/erts/doc/src/epmd_cmd.xml b/erts/doc/src/epmd_cmd.xml new file mode 100644 index 0000000000..ee886bd68e --- /dev/null +++ b/erts/doc/src/epmd_cmd.xml @@ -0,0 +1,335 @@ + + + + +
+ + 19962016 + Ericsson AB. 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. + + + + epmd + Claes Wikström + + 1 + + + 1998-01-05 + A + epmd.xml +
+ + epmd + Erlang Port Mapper Daemon + + + + + + +

Starts the port mapper daemon.

+
+ + +

Communicates with a running port mapper daemon.

+
+
+ +

This daemon acts as a name server on all hosts involved in + distributed Erlang computations. When an Erlang node starts, + the node has a name and it obtains an address from the host + OS kernel. The name and address are sent to the + daemon running on the local host. + In a TCP/IP environment, the address consists + of the IP address and a port number. The node name is + an atom on the form of . + The job of the daemon is to keep track of which + node name listens on which address. Hence, maps + symbolic node names to machine addresses.

+ +

The TCP/IP epmd daemon only keeps track of + the Name (first) part of an Erlang node name. The Host + part (whatever is after the ) is implicit in the + node name where the epmd daemon was contacted, + as is the IP address where the Erlang node can be + reached. Consistent and correct TCP naming services are + therefore required for an Erlang network to function + correctly.

+ +

On Windows the maximum number of nodes allowed in one + epmd instance is 60. This is because of limitations in the current + implementation. If you need more nodes, you should look into using + and erlang based epmd implementation such as + Erlang EPMD.

+ + + Starting the port mapper daemon + +

The daemon is started automatically by command + erl(1) + if the node is to be distributed and no running + instance is present. If automatically launched + environment variables must be used to change the behavior + of the daemon; see section + Environment + Variables.

+

If argument -daemon is not specified, + runs as a normal program with the + controlling terminal of the shell in which it is + started. Normally, it is to be run as a daemon.

+

Regular startup options are described in section + Regular Options.

+

The DbgExtra options are described in section + DbgExtra Options.

+
+ Communicating with a running port mapper daemon + +

Communicating with the running epmd daemon by the + epmd program is done primarily for debugging purposes.

+

The different queries are described in section Interactive options.

+
+
+
+ +
+ + Regular Options +

These options are available when starting the name server. The name + server is normally started automatically by command + erl(1) (if not already available), + but it can also be started at system startup.

+ + + + +

Lets this instance of epmd listen only on the + comma-separated list of IP addresses and on the loopback address + (which is implicitly added to the list if it has not been + specified). This can also be set using environment variable + ; see section Environment Variables.

+
+ + +

Lets this instance of epmd listen to another TCP port than + default 4369. This can also be set using environment variable + ; see section Environment Variables.

+
+ + +

Enables debug output. The more -d flags specified, the more + debug output you will get (to a certain limit). This option is most + useful when the epmd daemon is not started as a daemon.

+
+ + +

Starts epmd detached from the controlling terminal. Logging + ends up in syslog when available and correctly configured. If the + epmd daemon is started at boot, this option is definitely + to be used. It is also used when command erl automatically + starts epmd.

+
+ + +

Starts the epmd program with relaxed command checking + (mostly for backward compatibility). This affects the following:

+ + +

With relaxed command checking, the epmd daemon can be + killed from the local host with, for example, command + epmd -kill even if active nodes are registered. Normally + only daemons with an empty node database can be killed with + epmd -kill.

+
+ +

Command epmd -stop (and the corresponding messages to + epmd, as can be specified using erl_interface:ei(3)) is + normally always ignored. This because it can cause a strange + situation where two nodes of the same name can be alive at the + same time. A node unregisters itself by only closing the + connection to epmd, which is why command stop + was only intended for use in debugging situations.

+

With relaxed command checking enabled, you can forcibly + unregister live nodes.

+
+
+

Relaxed command checking can also be enabled by setting environment + variable ERL_EPMD_RELAXED_COMMAND_CHECK before starting + epmd.

+

Use relaxed command checking only on systems with very limited + interactive usage.

+
+
+
+ +
+ + DbgExtra Options + +

These options are only for debugging and testing epmd clients. + They are not to be used in normal operation.

+
+ + + + +

Sets the number of seconds a connection can be + inactive before epmd times out and closes the + connection. Defaults to 60.

+
+ + +

To simulate a busy server, you can insert a delay between when + epmd gets notified that a new connection is requested and + when the connection gets accepted.

+
+ + +

Also a simulation of a busy server. Inserts + a delay before a reply is sent.

+
+
+
+ +
+ + Interactive Options +

These options make epmd run as an interactive command, + displaying the results of sending queries to an already running + instance of epmd. The epmd contacted is always on the + local node, but option -port can be used to select between + instances if several are running using different ports on the host.

+ + + + +

Contacts the epmd listening on the specified TCP port + number (default 4369). This can also be set using environment + variable ; see section Environment Variables.

+
+ + +

Lists names registered with the currently running epmd.

+
+ + +

Kills the currently running epmd.

+

Killing the running epmd is only allowed if + epmd -names shows an empty database or if + -relaxed_command_check was specified when the running + instance of epmd was started.

+

Notice that -relaxed_command_check is specified when + starting the daemon that is to accept killing when it has live + nodes registered. When running epmd interactively, + -relaxed_command_check has no effect. A daemon that is + started without relaxed command checking must be killed using, + for example, signals or some other OS-specific method if it has + active clients registered.

+
+ + +

Forcibly unregisters a live node from the epmd database.

+

This command can only be used when contacting epmd + instances started with flag -relaxed_command_check.

+

Notice that relaxed command checking must enabled for the + epmd daemon contacted. When running epmd + interactively, -relaxed_command_check has no effect.

+
+
+
+ +
+ + Environment Variables + + + +

Can be set to a comma-separated + list of IP addresses, in which case the epmd daemon + will listen only on the specified address(es) and on the + loopback address (which is implicitly added to the list if it + has not been specified). The default behavior is to listen on + all available IP addresses.

+
+ + +

Can contain the port number epmd will use. + The default port will work fine in most cases. A different port can + be specified to allow several instances of epmd, representing + independent clusters of nodes, to co-exist on the same host. + All nodes in a cluster must use the same epmd port number.

+
+ + +

If set before start, the epmd daemon behaves + as if option -relaxed_command_check was specified at + startup. Consequently, if this option is set before starting + the Erlang virtual machine, the automatically started + epmd accepts the -kill and -stop + commands without restrictions.

+
+
+
+ +
+ Logging +

On some operating systems syslog will be used for + error reporting when epmd runs as a daemon. To enable + the error logging, you must edit the /etc/syslog.conf file and + add an entry:

+ + /var/log/epmd.log +]]> + +

where <TABs> are at least one real tab character. + Spaces are silently ignored.

+
+ +
+ Access Restrictions +

The epmd daemon accepts messages from both the local host and + remote hosts. However, only the query commands are answered (and + acted upon) if the query comes from a remote host. It is always an + error to try to register a node name if the client is not a process + on the same host as the epmd instance is running on. Such + requests are considered hostile and the connection is closed + immediately.

+ +

The following queries are accepted from remote nodes:

+ + + +

Port queries, that is, on which port the node with a specified + name listens

+
+ +

Name listing, that is, gives a list of all names registered on + the host

+
+
+ +

To restrict access further, firewall software must be used.

+
+
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml deleted file mode 100644 index 28b375f2c6..0000000000 --- a/erts/doc/src/erl.xml +++ /dev/null @@ -1,1781 +0,0 @@ - - - - -
- - 19962018 - Ericsson AB. 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. - - - - erl - - - - - erl.xml -
- erl - The Erlang emulator. - -

The program starts an Erlang runtime system. - The exact details (for example, whether is a - script or a program and which other programs it calls) are - system-dependent.

- -

Windows users probably want to use the program - instead, which runs in its own window with scrollbars and supports - command-line editing. The program on Windows - provides no line editing in its shell, and on Windows 95 there is no way - to scroll back to text that has scrolled off the screen. The - program must be used, however, in pipelines or if - you want to redirect standard input or output.

- - -

As from ERTS 5.9 (Erlang/OTP R15B) the runtime system does by - default not bind schedulers to logical processors. - For more information, see system flag - +sbt.

-
-
- - - - erl <arguments> - Start an Erlang runtime system. - -

Starts an Erlang runtime system.

-

The arguments can be divided into emulator flags, - flags, and plain arguments:

- - -

Any argument starting with character is - interpreted as an - emulator flag.

-

As indicated by the name, emulator flags control - the behavior of the emulator.

-
- -

Any argument starting with character - (hyphen) is interpreted as a - flag, which is to - be passed to the Erlang part of the runtime system, more - specifically to the system process, see - init(3).

-

The process itself interprets some of - these flags, the init flags. It also stores any - remaining flags, the user flags. The latter can be - retrieved by calling .

-

A small number of "-" flags exist, which now actually are - emulator flags, see the description below.

-
- -

Plain arguments are not interpreted in any way. They are also - stored by the process and can be retrieved - by calling . - Plain arguments can occur before the first flag, or after a - flag. Also, the - flag causes everything that follows to become plain arguments.

-
-
-

Examples:

-
-% erl +W w -sname arnie +R 9 -s my_init -extra +bertie
-(arnie@host)1> init:get_argument(sname).
-{ok,[["arnie"]]}
-(arnie@host)2> init:get_plain_arguments().
-["+bertie"]
-

Here and are - emulator flags. is an init flag, - interpreted by . - is a user flag, stored by - . It is read by Kernel and causes the - Erlang runtime system to become distributed. Finally, everything after - (that is, ) is - considered as plain arguments.

-
-% erl -myflag 1
-1> init:get_argument(myflag).
-{ok,[["1"]]}
-2> init:get_plain_arguments().
-[]
-

Here the user flag is passed to and - stored by the process. It is a user-defined - flag, presumably used by some user-defined application.

-
-
-
- -
- - Flags -

In the following list, init flags are marked "(init flag)". - Unless otherwise specified, all other flags are user flags, for - which the values can be retrieved by calling - . Notice that the list of user - flags is not exhaustive, there can be more application-specific - flags that instead are described in the corresponding - application documentation.

- - (init flag) - -

Everything following up to the next flag - ( or ) is considered - plain arguments and can be retrieved using - .

-
- - -

Sets the application configuration parameter - to the value for the application - ; see - app(4) and - - application(3).

-
- - -

Command-line arguments are read from the file - . The arguments read from the file replace - flag '' on the resulting - command line.

-

The file is to be a plain text file and - can contain comments and command-line arguments. A comment begins - with a # character and continues until the next end of line - character. Backslash (\\) is used as quoting character. All - command-line arguments accepted by are allowed, - also flag . Be careful not to - cause circular dependencies between files containing flag - , though.

-

The flag is treated in special way. Its - scope ends at the end of the file. Arguments following an - flag are moved on the command line into the - section, that is, the end of the command - line following after an flag.

-
- - -

The initial Erlang shell does not read user input until - the system boot procedure has been completed (Erlang/OTP 5.4 and - later). This flag disables the start synchronization feature - and lets the shell start in parallel with the rest of - the system.

-
- - -

Specifies the name of the boot file, , - which is used to start the system; see - init(3). Unless - contains an absolute path, the system searches - for in the current and - directories.

-

Defaults to .

-
- - -

If the boot script contains a path variable - other than , this variable is expanded to - . Used when applications are installed in - another directory than ; see - - systools:make_script/1,2 in SASL.

-
- - -

Enables the code path cache of the code server; see - code(3).

-
- - -

Compiles the specified modules and then terminates (with - non-zero exit code if the compilation of some file did not - succeed). Implies .

-

Not recommended; use erlc - instead.

-
- - -

Specifies the name of one or more configuration files, - , which is used to configure - applications; see - app(4) and - - application(3).

-
- - -

If this flag is present, does not maintain - a fully connected network of distributed Erlang nodes, and then - global name registration cannot be used; see - global(3).

-
- - -

Obsolete flag without any effect and common misspelling for - . Use - instead.

-
- - -

Starts the Erlang runtime system detached from the system - console. Useful for running daemons and backgrounds processes. Implies - .

-
- - -

Useful for debugging. Prints the arguments sent to the emulator.

-
- - -

Start an emulator of a different type. For example, to start - the lock-counter emualator, use -emu_type lcnt. (The emulator - must already be built. Use the configure option - --enable-lock-counter to build the lock-counter emulator.)

-
- - -

Sets the host OS environment variable to - the value for the Erlang runtime system. - Example:

-
-% erl -env DISPLAY gin:0
-

In this example, an Erlang runtime system is started with - environment variable set to - .

-
- (init flag) - -

Configures the module responsible to communicate to - epmd. Defaults to erl_epmd.

-
- (init flag) - -

Makes evaluate the expression - ; see - init(3).

-
- (init flag) - -

Everything following is considered plain - arguments and can be retrieved using - .

-
- - -

Starts heartbeat monitoring of the Erlang runtime system; - see - heart(3).

-
- - -

Starts the Erlang runtime system as a hidden node, if it is - run as a distributed node. Hidden nodes always establish - hidden connections to all other nodes except for nodes in the - same global group. Hidden connections are not published on - any of the connected nodes, that is, none of the connected - nodes are part of the result from on the - other node. See also hidden global groups; - - global_group(3).

-
- - -

Specifies the IP addresses for the hosts on which Erlang boot servers - are running, see - erl_boot_server(3). This flag - is mandatory if flag is present.

-

The IP addresses must be specified in the standard form (four - decimal numbers separated by periods, for example, - . Hosts names are not acceptable, - but a broadcast address (preferably limited to the local network) - is.

-
- - -

Specifies the identity of the Erlang runtime system. If it is - run as a distributed node, must be identical to - the name supplied together with flag or - .

-
- - -

Makes write some debug information while - interpreting the boot script.

-
- (emulator flag) - -

Selects an instrumented Erlang runtime system (virtual - machine) to run, instead of the ordinary one. When running an - instrumented runtime system, some resource usage data can be - obtained and analyzed using the module. - Functionally, it behaves exactly like an ordinary Erlang - runtime system.

-
- - -

Specifies the method used by to - load Erlang modules into the system; see - erl_prim_loader(3). - Two methods are supported:

- - -

, which means use the local file system, - this is the default.

-
- -

, which means use a boot server on - another machine. The flags , - and must - also be specified.

-
-
-

If is something else, the user-supplied - port program is started.

-
- - -

Makes the Erlang runtime system invoke - in the current working directory and then terminate; see - make(3). Implies - .

-
- - -

Displays the manual page for the Erlang module - . Only supported on Unix.

-
- - -

Modules are auto loaded when they are first referenced if the - runtime system runs in mode, which is - the default. In mode modules are not auto - loaded. The latter is recommended when the boot script preloads all - modules, as conventionally happens in OTP releases. See - code(3)

. -
- - -

Makes the Erlang runtime system into a distributed node. - This flag invokes all network servers necessary for a node to - become distributed; see - net_kernel(3). It is also ensured that - runs on the current host before Erlang is - started; see epmd(1).and the - -start_epmd option.

-

The node name will be , where - is the fully qualified host name of the - current host. For short names, use flag - instead.

- -

- Starting a distributed node without also specifying - -proto_dist inet_tls - will expose the node to attacks that may give the attacker - complete access to the node and in extension the cluster. - When using un-secure distributed nodes, make sure that the - network is configured to keep potential attackers out. -

-
-
- - -

Ensures that the Erlang runtime system never tries to read - any input. Implies .

-
- - -

Starts an Erlang runtime system with no shell. This flag - makes it possible to have the Erlang runtime system as a - component in a series of Unix pipes.

-
- - -

Disables the sticky directory facility of the Erlang code - server; see - code(3).

-
- - -

Invokes the old Erlang shell from Erlang/OTP 3.3. The old shell - can still be used.

-
- - -

Adds the specified directories to the beginning of the code - path, similar to - . Note that the - order of the given directories will be reversed in the - resulting path.

-

As an alternative to -pa, if several directories are - to be prepended to the code path and the directories have a - common parent directory, that parent directory can be - specified in environment variable ERL_LIBS; see - code(3).

-
- - -

Adds the specified directories to the end of the code path, - similar to ; see - code(3).

-
- - -

Replaces the path specified in the boot script; see - script(4).

-
- - - -

Specifies a protocol for Erlang distribution:

- - inet_tcp - TCP over IPv4 (the default) - inet_tls - Distribution over TLS/SSL, See the - - Using SSL for Erlang Distribution User's Guide - for details on how to setup a secure distributed node. - - inet6_tcp - TCP over IPv6 - -

For example, to start up IPv6 distributed nodes:

-
-% erl -name test@ipv6node.example.com -proto_dist inet6_tcp
-
- - -

Starts Erlang with a remote shell connected to - . Requires either - or to be given. If - does not contain a hostname, one is automatically taken from - or

-
- - -

Specifies an alternative to for starting a - slave node on a remote host; see - slave(3).

-
- (init - flag) - -

Makes call the specified function. - defaults to . - If no arguments are provided, the function is assumed to be of - arity 0. Otherwise it is assumed to be of arity 1, taking the list - as argument. All arguments are - passed as strings. See - init(3).

-
- (init flag) - -

Makes call the specified function. - defaults to . - If no arguments are provided, the function is assumed to be of - arity 0. Otherwise it is assumed to be of arity 1, taking the list - as argument. All arguments are - passed as atoms. See - init(3).

-
- - -

Sets the magic cookie of the node to ; see - - erlang:set_cookie/2.

-
- - -

Specifies how long time (in milliseconds) the - process is allowed to spend shutting down the system. If - milliseconds have elapsed, all processes still - existing are killed. Defaults to .

-
- - -

Makes the Erlang runtime system into a distributed node, similar to - , but the host name portion of the node - name will be the short name, not fully - qualified.

-

This is sometimes the only way to run distributed Erlang if - the Domain Name System (DNS) is not running. No communication can - exist between nodes running with flag - and those running with flag , as node - names must be unique in distributed Erlang systems.

- -

- Starting a distributed node without also specifying - -proto_dist inet_tls - will expose the node to attacks that may give the attacker - complete access to the node and in extension the cluster. - When using un-secure distributed nodes, make sure that the - network is configured to keep potential attackers out. -

-
-
- -start_epmd true | false - - -

Specifies whether Erlang should start - epmd on startup. By default - this is true, but if you prefer to start epmd - manually, set this to false.

- -

This only applies if Erlang is started as a distributed node, - i.e. if -name or -sname is specified. Otherwise, - epmd is not started even if -start_epmd true is given.

- -

Note that a distributed node will fail to start if epmd is - not running.

-
- (emulator flag) - -

Makes the emulator print its version number. The same - as .

-
-
-
- -
- - Emulator Flags -

invokes the code for the Erlang emulator (virtual - machine), which supports the following flags:

- - - - -

Suggested stack size, in kilowords, for threads in the - async thread pool. Valid range is 16-8192 kilowords. The - default suggested stack size is 16 kilowords, that is, 64 - kilobyte on 32-bit architectures. This small default size - has been chosen because the number of async threads can - be large. The default size is enough for drivers - delivered with Erlang/OTP, but might not be large - enough for other dynamically linked-in drivers that use the - - driver_async() functionality. - Notice that the value passed is only a suggestion, - and it can even be ignored on some platforms.

-
- - -

Sets the number of threads in async thread pool. Valid range - is 1-1024. The async thread pool is used by linked-in drivers to - handle work that may take a very long time. Since OTP 21 there are - very few linked-in drivers in the default Erlang/OTP distribution - that uses the async thread pool. Most of them have been migrated to - dirty IO schedulers. Defaults to 1.

-
- - -

Option makes - interrupt the current shell instead of invoking the emulator break - handler. Option (same as specifying - without an extra option) disables the break - handler. Option makes the emulator ignore any - break signal.

-

If option is used with - on Unix, will - restart the shell process rather than interrupt it.

-

Notice that on Windows, this flag is only applicable for - , not - (). Notice also that - is used instead of - on Windows.

-
- - -

Enables or disables - time - correction:

- - true - Enables time correction. This is the default if - time correction is supported on the specific platform. - false - Disables time correction. - -

For backward compatibility, the boolean value can be omitted. - This is interpreted as +c false.

-
- - -

Sets time warp - mode:

- - no_time_warp - - No time warp mode (the default) - single_time_warp - - Single time warp mode - multi_time_warp - - Multi-time warp mode - -
- - -

If the emulator detects an internal error (or runs out of memory), - it, by default, generates both a crash dump and a core dump. - The core dump is, however, not very useful as the content - of process heaps is destroyed by the crash dump generation.

-

Option +d instructs the emulator to produce only a - core dump and no crash dump if an internal error is detected.

-

Calling - erlang:halt/1 with a string argument still - produces a crash dump. On Unix systems, sending an emulator process - a SIGUSR1 signal also forces a crash dump.

-
- - -

Limits the number of decentralized counter groups used by - decentralized counters optimized for update operations in the - Erlang runtime system. By default, the limit is 256.

-

When the number of schedulers is less than or equal to the - limit, each scheduler has its own group. When the - number of schedulers is larger than the groups limit, - schedulers share groups. Shared groups degrade - the performance for updating counters while many reader groups - degrade the performance for reading counters. So, the limit is a tradeoff - between performance for update operations and performance for - read operations. Each group consumes 64 bytes in each - counter.

-

Notice that a runtime system using decentralized - counter groups benefits from binding - schedulers to logical processors, as the groups are - distributed better between schedulers with this option.

-

This option only affects decentralized counters used for - the counters that are keeping track of the memory consumption - and the number of terms in ETS tables of type ordered_set with - the write_concurrency option activated.

-
- - -

Sets the maximum number of ETS tables. This limit is - partially obsolete. -

-
- - -

Forces option compressed on all ETS tables. - Only intended for test and evaluation.

-
- - - -

The virtual machine works with filenames as if they are encoded - using the ISO Latin-1 encoding, disallowing Unicode characters with - code points > 255.

-

For more information about Unicode filenames, see section - Unicode - Filenames in the STDLIB User's Guide. Notice that - this value also applies to command-line parameters and environment - variables (see section - Unicode in Environment and Parameters in the STDLIB - User's Guide).

-
- - -

The virtual machine works with filenames as if they are encoded - using UTF-8 (or some other system-specific Unicode encoding). This is - the default on operating systems that enforce Unicode encoding, that - is, Windows and MacOS X.

-

The +fnu switch can be followed by w, i, or - e to control how wrongly encoded filenames are to be - reported:

- - -

w means that a warning is sent to the error_logger - whenever a wrongly encoded filename is "skipped" in directory - listings. This is the default.

-
- -

i means that those wrongly encoded filenames are silently - ignored.

-
- -

e means that the API function returns an error whenever a - wrongly encoded filename (or directory name) is encountered.

-
-
-

Notice that - file:read_link/1 always returns an error if the link - points to an invalid filename.

-

For more information about Unicode filenames, see section - Unicode - Filenames in the STDLIB User's Guide. Notice that - this value also applies to command-line parameters and environment - variables (see section - Unicode in Environment and Parameters in the STDLIB - User's Guide).

-
- - -

Selection between +fnl and +fnu is done based - on the current locale settings in the OS. This means that if you - have set your terminal for UTF-8 encoding, the filesystem is - expected to use the same encoding for filenames. This is - default on all operating systems, except MacOS X and Windows.

-

The +fna switch can be followed by w, i, or - e. This has effect if the locale settings cause the behavior - of +fnu to be selected; see the description of +fnu - above. If the locale settings cause the behavior of +fnl to be - selected, then w, i, or e have no effect.

-

For more information about Unicode filenames, see section - Unicode - Filenames in the STDLIB User's Guide. Notice that - this value also applies to command-line parameters and environment - variables (see section - Unicode in Environment and Parameters in the STDLIB - User's Guide).

-
- - -

Sets the default heap size of processes to the size - .

-
- - -

Sets the default binary virtual heap size of processes to the size - .

-
- - -

Sets the default maximum heap size of processes to the size - . Defaults to 0, which means that no - maximum heap size is used. For more information, see - - process_flag(max_heap_size, MaxHeapSize).

-
- - -

Sets whether to send an error logger message or not for processes - reaching the maximum heap size. Defaults to true. - For more information, see - - process_flag(max_heap_size, MaxHeapSize).

-
- - -

Sets whether to kill processes reaching the maximum heap size or not. - Default to true. For more information, see - - process_flag(max_heap_size, MaxHeapSize).

-
- - -

Sets the initial process dictionary size of processes to the size - .

-
- +hmqd off_heap|on_heap - -

Sets the default value for process flag message_queue_data. - Defaults to on_heap. If +hmqd is not - passed, on_heap will be the default. For more information, see - - process_flag(message_queue_data, MQD).

-
- +IOp PollSets - -

Sets the number of IO pollsets to use when polling for I/O. - This option is only used on platforms that support concurrent - updates of a pollset, otherwise the same number of pollsets - are used as IO poll threads. - The default is 1. -

-
- +IOt PollThreads - -

Sets the number of IO poll threads to use when polling for I/O. - The maximum number of poll threads allowed is 1024. The default is 1. -

-

A good way to check if more IO poll threads are needed is to use - microstate accounting - and see what the load of the IO poll thread is. If it is high it could - be a good idea to add more threads.

-
- +IOPp PollSetsPercentage - -

Similar to +IOp but uses - percentages to set the number of IO pollsets to create, based on the - number of poll threads configured. If both +IOPp and +IOp - are used, +IOPp is ignored. -

-
- +IOPt PollThreadsPercentage - -

Similar to +IOt but uses - percentages to set the number of IO poll threads to create, based on - the number of schedulers configured. If both +IOPt and - +IOt are used, +IOPt is ignored. -

-
- - -

Enables autoload tracing, displaying information while loading - code.

-
- - -

Prevents loading information about source filenames and line - numbers. This saves some memory, but exceptions do not contain - information about the filenames and line numbers.

-
- - -

Memory allocator-specific flags. For more information, see - erts_alloc(3).

-
- - - -

Sets the range of characters that the system considers printable in - heuristic detection of strings. This typically affects the shell, - debugger, and io:format functions (when ~tp is used in - the format string).

-

Two values are supported for Range:

- - latin1 - The default. Only characters in the ISO Latin-1 range can be - considered printable. This means that a character with a code point - > 255 is never considered printable and that lists containing - such characters are displayed as lists of integers rather than text - strings by tools. - unicode - All printable Unicode characters are considered when - determining if a list of integers is to be displayed in - string syntax. This can give unexpected results if, for - example, your font does not cover all Unicode characters. - -

See also - io:printable_range/0 in STDLIB.

-
- - -

Sets the maximum number of simultaneously existing processes for this - system if a Number is passed as value. Valid range for - Number is [1024-134217727]

-

NOTE: The actual maximum chosen may be much larger than - the Number passed. Currently the runtime system often, - but not always, chooses a value that is a power of 2. This might, - however, be changed in the future. The actual value chosen can be - checked by calling - erlang:system_info(process_limit).

-

The default value is 262144

-
- - -

Sets the maximum number of simultaneously existing ports for this - system if a Number is passed as value. Valid range for Number - is [1024-134217727]

-

NOTE: The actual maximum chosen may be much larger than - the actual Number passed. Currently the runtime system often, - but not always, chooses a value that is a power of 2. This might, - however, be changed in the future. The actual value chosen can be - checked by calling - erlang:system_info(port_limit).

-

The default value used is normally 65536. However, if - the runtime system is able to determine maximum amount of file - descriptors that it is allowed to open and this value is larger - than 65536, the chosen value will increased to a value - larger or equal to the maximum amount of file descriptors that - can be opened.

-

On Windows the default value is set to 8196 because the - normal OS limitations are set higher than most machines can handle.

-
- - -

Sets the compatibility mode.

-

The distribution mechanism is not backward compatible by - default. This flag sets the emulator in compatibility mode - with an earlier Erlang/OTP release . - The release number must be in the range - -2..]]>. This - limits the emulator, making it possible for it to communicate - with Erlang nodes (as well as C- and Java nodes) running that - earlier release.

- -

Ensure that all nodes (Erlang-, C-, and Java nodes) of - a distributed Erlang system is of the same Erlang/OTP release, - or from two different Erlang/OTP releases X and Y, where - all Y nodes have compatibility mode X.

-
-
- - -

Forces ETS memory block to be moved on realloc.

-
- - -

Limits the number of reader groups used by read/write locks - optimized for read operations in the Erlang runtime system. By - default the reader groups limit is 64.

-

When the number of schedulers is less than or equal to the reader - groups limit, each scheduler has its own reader group. When the - number of schedulers is larger than the reader groups limit, - schedulers share reader groups. Shared reader groups degrade - read lock and read unlock performance while many - reader groups degrade write lock performance. So, the limit is a - tradeoff between performance for read operations and performance - for write operations. Each reader group consumes 64 byte - in each read/write lock.

-

Notice that a runtime system using shared reader groups benefits from - binding schedulers to logical - processors, as the reader groups are distributed better - between schedulers.

-
- - - -

Sets the number of scheduler threads to create and scheduler threads - to set online. The maximum for both values is 1024. If the Erlang - runtime system is able to determine the number of logical processors - configured and logical processors available, Schedulers - defaults to logical processors configured, and - SchedulersOnline defaults to logical processors available; - otherwise the default values are 1. If the emulator detects that it - is subject to a CPU - quota, the default value for SchedulersOnline will - be limited accordingly.

-

- Schedulers can be omitted if :SchedulerOnline is not - and conversely. The number of schedulers online can be changed at - runtime through - - erlang:system_flag(schedulers_online, - SchedulersOnline).

-

If Schedulers or SchedulersOnline is specified as a - negative number, the value is subtracted from the default number of - logical processors configured or logical processors available, - respectively.

-

Specifying value 0 for Schedulers or - SchedulersOnline resets the number of scheduler threads or - scheduler threads online, respectively, to its default value.

-
- - -

Similar to +S but uses - percentages to set the number of scheduler threads to create, based - on logical processors configured, and scheduler threads to set online, - based on logical processors available. - Specified values must be > 0. For example, - +SP 50:25 sets the number of scheduler threads to 50% of the - logical processors configured, and the number of scheduler threads - online to 25% of the logical processors available. - SchedulersPercentage can be omitted if - :SchedulersOnlinePercentage is not and conversely. The number - of schedulers online can be changed at runtime through - - erlang:system_flag(schedulers_online, - SchedulersOnline).

-

This option interacts with +S - settings. For example, on a system with 8 logical cores configured - and 8 logical cores available, the combination of the options - +S 4:4 +SP 50:25 (in either order) results in 2 scheduler - threads (50% of 4) and 1 scheduler thread online (25% of 4).

-
- - -

Sets the number of dirty CPU scheduler threads to create and dirty - CPU scheduler threads to set online. - The maximum for both values is 1024, and each value is - further limited by the settings for normal schedulers:

- - The number of dirty CPU scheduler threads created cannot exceed - the number of normal scheduler threads created. - The number of dirty CPU scheduler threads online cannot exceed - the number of normal scheduler threads online. - -

For details, see the +S and - +SP. By default, the number - of dirty CPU scheduler threads created equals the number of normal - scheduler threads created, and the number of dirty CPU scheduler - threads online equals the number of normal scheduler threads online. - DirtyCPUSchedulers can be omitted if - :DirtyCPUSchedulersOnline is not and conversely. The number of - dirty CPU schedulers online can be changed at runtime through - - erlang:system_flag(dirty_cpu_schedulers_online, - DirtyCPUSchedulersOnline).

-

The amount of dirty CPU schedulers is limited by the amount of - normal schedulers in order to limit the effect on processes - executing on ordinary schedulers. If the amount of dirty CPU - schedulers was allowed to be unlimited, dirty CPU bound jobs would - potentially starve normal jobs.

-

Typical users of the dirty CPU schedulers are large garbage collections, - json protocol encode/decoders written as nifs and matrix manipulation - libraries.

-

You can use msacc(3) - in order to see the current load of the dirty CPU schedulers threads - and adjust the number used accordingly.

-
- - -

Similar to +SDcpu but - uses percentages to set the number of dirty CPU scheduler threads to - create and the number of dirty CPU scheduler threads to set online. - Specified values must be - > 0. For example, +SDPcpu 50:25 sets the number of dirty - CPU scheduler threads to 50% of the logical processors configured - and the number of dirty CPU scheduler threads online to 25% of the - logical processors available. DirtyCPUSchedulersPercentage can - be omitted if :DirtyCPUSchedulersOnlinePercentage is not and - conversely. The number of dirty CPU schedulers online can be changed - at runtime through - - erlang:system_flag(dirty_cpu_schedulers_online, - DirtyCPUSchedulersOnline).

-

This option interacts with +SDcpu settings. For example, on a - system with 8 logical cores configured and 8 logical cores available, - the combination of the options +SDcpu 4:4 +SDPcpu 50:25 (in - either order) results in 2 dirty CPU scheduler threads (50% of 4) and - 1 dirty CPU scheduler thread online (25% of 4).

-
- - -

Sets the number of dirty I/O scheduler threads to create. - Valid range is 0-1024. By - default, the number of dirty I/O scheduler threads created is 10.

-

The amount of dirty IO schedulers is not limited by the amount of - normal schedulers like the amount of - dirty CPU schedulers. This since only I/O bound work is - expected to execute on dirty I/O schedulers. If the user should schedule CPU - bound jobs on dirty I/O schedulers, these jobs might starve ordinary - jobs executing on ordinary schedulers.

-

Typical users of the dirty IO schedulers are reading and writing to files.

-

You can use msacc(3) - in order to see the current load of the dirty IO schedulers threads - and adjust the number used accordingly.

-
- - -

Scheduling specific flags.

- - +sbt BindType - -

Sets scheduler bind type.

-

Schedulers can also be bound using flag - +stbt. The only - difference between these two flags is how the following errors - are handled:

- - Binding of schedulers is not supported on the specific - platform. - No available CPU topology. That is, the runtime system was - not able to detect the CPU topology automatically, and no - user-defined CPU topology - was set. - -

If any of these errors occur when +sbt has been passed, - the runtime system prints an error message, and refuses to - start. If any of these errors occur when +stbt has been - passed, the runtime system silently ignores the error, and - start up using unbound schedulers.

-

Valid BindTypes:

- - u - unbound - Schedulers are not bound to logical - processors, that is, the operating system decides where the - scheduler threads execute, and when to migrate them. This is - the default. - - ns - no_spread - Schedulers with close scheduler - identifiers are bound as close as possible in hardware. - - ts - thread_spread - Thread refers to hardware threads - (such as Intel's hyper-threads). Schedulers with low scheduler - identifiers, are bound to the first hardware thread of - each core, then schedulers with higher scheduler identifiers - are bound to the second hardware thread of each core,and so on. - - ps - processor_spread - Schedulers are spread like - thread_spread, but also over physical processor chips. - - s - spread - Schedulers are spread as much as possible. - - nnts - no_node_thread_spread - Like thread_spread, - but if multiple Non-Uniform Memory Access (NUMA) nodes exist, - schedulers are spread over one NUMA node at a time, - that is, all logical processors of one NUMA node are bound - to schedulers in sequence. - - nnps - no_node_processor_spread - Like - processor_spread, but if multiple NUMA nodes exist, - schedulers are spread over one NUMA node at a time, that is, - all logical processors of one NUMA node are bound to - schedulers in sequence. - - tnnps - thread_no_node_processor_spread - A combination of - thread_spread, and no_node_processor_spread. - Schedulers are spread over hardware threads across NUMA - nodes, but schedulers are only spread over processors - internally in one NUMA node at a time. - - db - default_bind - Binds schedulers the default way. - Defaults to thread_no_node_processor_spread - (which can change in the future). - - -

Binding of schedulers is only supported on newer - Linux, Solaris, FreeBSD, and Windows systems.

-

If no CPU topology is available when flag +sbt - is processed and BindType is any other type than - u, the runtime system fails to start. CPU - topology can be defined using flag - +sct. Notice - that flag +sct can have to be passed before flag - +sbt on the command line (if no CPU topology - has been automatically detected).

-

The runtime system does by default not bind schedulers - to logical processors.

- -

If the Erlang runtime system is the only operating system - process that binds threads to logical processors, this - improves the performance of the runtime system. However, - if other operating system processes (for example - another Erlang runtime system) also bind threads to - logical processors, there can be a performance penalty - instead. This performance penalty can sometimes be - severe. If so, you are advised not to - bind the schedulers.

-
-

How schedulers are bound matters. For example, in - situations when there are fewer running processes than - schedulers online, the runtime system tries to migrate - processes to schedulers with low scheduler identifiers. - The more the schedulers are spread over the hardware, - the more resources are available to the runtime - system in such situations.

- -

If a scheduler fails to bind, this is - often silently ignored, as it is not always - possible to verify valid logical processor identifiers. If - an error is reported, it is reported to the - error_logger. If you want to verify that the - schedulers have bound as requested, call - - erlang:system_info(scheduler_bindings).

-
-
- - +sbwt none|very_short|short|medium|long|very_long - -

Sets scheduler busy wait threshold. Defaults to medium. - The threshold determines how long schedulers are to busy - wait when running out of work before going to sleep.

- -

This flag can be removed or changed at any time - without prior notice.

-
-
- - +sbwtdcpu none|very_short|short|medium|long|very_long - -

As +sbwt but affects - dirty CPU schedulers. Defaults to short.

- -

This flag can be removed or changed at any time - without prior notice.

-
-
- - +sbwtdio none|very_short|short|medium|long|very_long - -

As +sbwt but affects - dirty IO schedulers. Defaults to short.

- -

This flag can be removed or changed at any time - without prior notice.

-
-
-+scl true|false - -

Enables or disables scheduler compaction of load. By default - scheduler compaction of load is enabled. When enabled, load - balancing strives for a load distribution, which causes - as many scheduler threads as possible to be fully loaded (that is, - not run out of work). This is accomplished by migrating load - (for example, runnable processes) into a smaller set of schedulers - when schedulers frequently run out of work. When disabled, - the frequency with which schedulers run out of work is - not taken into account by the load balancing logic.

-

+scl false is similar to - +sub true, but - +sub true also balances scheduler utilization - between schedulers.

-
- +sct CpuTopology - - - = integer(); when 0 =< =< 65535]]> - - = -]]> - = | ]]> - = , | - ]]> - = L]]> - = T | t]]> - - = C | c]]> - = P | p]]> - - = N | n]]> - = - | - ]]> - - : | - ]]> - -

Sets a user-defined CPU topology. The user-defined - CPU topology overrides any automatically detected - CPU topology. The CPU topology is used when - binding schedulers to logical - processors.

-

Uppercase letters signify real identifiers and lowercase - letters signify fake identifiers only used for description - of the topology. Identifiers passed as real identifiers can - be used by the runtime system when trying to access specific - hardware; if they are incorrect the behavior is - undefined. Faked logical CPU identifiers are not accepted, - as there is no point in defining the CPU topology without - real logical CPU identifiers. Thread, core, processor, and - node identifiers can be omitted. If omitted, the thread ID - defaults to t0, the core ID defaults to c0, - the processor ID defaults to p0, and the node ID is - left undefined. Either each logical processor must - belong to only one NUMA node, or no logical - processors must belong to any NUMA nodes.

-

Both increasing and decreasing ]]>s - are allowed.

-

NUMA node identifiers are system wide. That is, each NUMA - node on the system must have a unique identifier. Processor - identifiers are also system wide. Core identifiers are - processor wide. Thread identifiers are core wide.

-

The order of the identifier types implies the hierarchy of the - CPU topology. The valid orders are as follows:

- - -

]]>, - that is, thread is part of a core that is part of a processor, - which is part of a NUMA node.

-
- -

]]>, - that is, thread is part of a core that is part of a NUMA node, - which is part of a processor.

-
-
-

A CPU topology can consist of both processor external, and - processor internal NUMA nodes as long as each logical processor - belongs to only one NUMA node. If - ]]> is omitted, its default position - is before ]]>. That is, the default is - processor external NUMA nodes.

-

If a list of identifiers is used in an - ]]>:

- - ]]> must be a list - of identifiers. - At least one other identifier type besides - ]]> must also have a - list of identifiers. - All lists of identifiers must produce the - same number of identifiers. - -

A simple example. A single quad core processor can be - described as follows:

-
-% erl +sct L0-3c0-3
-1> erlang:system_info(cpu_topology).
-[{processor,[{core,{logical,0}},
-             {core,{logical,1}},
-             {core,{logical,2}},
-             {core,{logical,3}}]}]
-

A more complicated example with two quad core - processors, each processor in its own NUMA node. - The ordering of logical processors is a bit weird. - This to give a better example of identifier lists:

-
-% erl +sct L0-1,3-2c0-3p0N0:L7,4,6-5c0-3p1N1
-1> erlang:system_info(cpu_topology).
-[{node,[{processor,[{core,{logical,0}},
-                    {core,{logical,1}},
-                    {core,{logical,3}},
-                    {core,{logical,2}}]}]},
- {node,[{processor,[{core,{logical,7}},
-                    {core,{logical,4}},
-                    {core,{logical,6}},
-                    {core,{logical,5}}]}]}]
-

As long as real identifiers are correct, it is OK - to pass a CPU topology that is not a correct - description of the CPU topology. When used with - care this can be very useful. This - to trick the emulator to bind its schedulers - as you want. For example, if you want to run multiple - Erlang runtime systems on the same machine, you - want to reduce the number of schedulers used and - manipulate the CPU topology so that they bind to - different logical CPUs. An example, with two Erlang - runtime systems on a quad core machine:

-
-% erl +sct L0-3c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname one
-% erl +sct L3-0c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname two
-

In this example, each runtime system have two - schedulers each online, and all schedulers online - will run on different cores. If we change to one - scheduler online on one runtime system, and three - schedulers online on the other, all schedulers - online will still run on different cores.

-

Notice that a faked CPU topology that does not reflect - how the real CPU topology looks like is likely to - decrease the performance of the runtime system.

-

For more information, see - - erlang:system_info(cpu_topology).

-
- +sfwi Interval - -

Sets scheduler-forced wakeup interval. All run queues are - scanned each Interval milliseconds. While there are - sleeping schedulers in the system, one scheduler is woken - for each non-empty run queue found. Interval default - to 0, meaning this feature is disabled.

- -

This feature has been introduced as a temporary workaround - for long-executing native code, and native code that does not - bump reductions properly in OTP. When these bugs have be fixed, - this flag will be removed.

-
-
- +spp Bool - -

Sets default scheduler hint for port parallelism. If set to - true, the virtual machine schedules port tasks when it - improves parallelism in the system. If set to false, the - virtual machine tries to perform port tasks immediately, - improving latency at the expense of parallelism. Default to - false. The default used can be inspected in runtime by - calling - erlang:system_info(port_parallelism). - The default can be overridden on port creation by passing option - - parallelism to - - erlang:open_port/2

. -
- - - -

Suggested stack size, in kilowords, for scheduler threads. - Valid range is 20-8192 kilowords. The default suggested - stack size is 128 kilowords.

-
- - - -

Suggested stack size, in kilowords, for dirty CPU scheduler - threads. Valid range is 20-8192 kilowords. The default - suggested stack size is 40 kilowords.

-
- - - -

Suggested stack size, in kilowords, for dirty IO scheduler - threads. Valid range is 20-8192 kilowords. The default - suggested stack size is 40 kilowords.

-
- +stbt BindType - -

Tries to set the scheduler bind type. The same as flag - +sbt except - how some errors are handled. For more information, see - +sbt.

-
- +sub true|false - -

Enables or disables - - scheduler utilization balancing of load. By default - scheduler utilization balancing is disabled and instead scheduler - compaction of load is enabled, which strives for a load - distribution that causes as many scheduler threads as possible - to be fully loaded (that is, not run out of work). When scheduler - utilization balancing is enabled, the system instead tries to - balance scheduler utilization between schedulers. That is, - strive for equal scheduler utilization on all schedulers.

-

+sub true is only supported on systems where the runtime - system detects and uses a monotonically increasing high-resolution - clock. On other systems, the runtime system fails to start.

-

+sub true implies - +scl false. The difference between - +sub true and +scl false is that +scl false - does not try to balance the scheduler utilization.

-
- - +swct very_eager|eager|medium|lazy|very_lazy - -

Sets scheduler wake cleanup threshold. Defaults to medium. - Controls how eager schedulers are to be requesting - wakeup because of certain cleanup operations. When a lazy setting - is used, more outstanding cleanup operations can be left undone - while a scheduler is idling. When an eager setting is used, - schedulers are more frequently woken, potentially increasing - CPU-utilization.

- -

This flag can be removed or changed at any time without prior - notice.

-
-
- +sws default|legacy - -

Sets scheduler wakeup strategy. Default strategy changed in - ERTS 5.10 (Erlang/OTP R16A). This strategy was known as - proposal in Erlang/OTP R15. The legacy strategy - was used as default from R13 up to and including R15.

- -

This flag can be removed or changed at any time without prior - notice.

-
-
- - +swt very_low|low|medium|high|very_high - -

Sets scheduler wakeup threshold. Defaults to medium. - The threshold determines when to wake up sleeping schedulers - when more work than can be handled by currently awake schedulers - exists. A low threshold causes earlier wakeups, and a high - threshold causes later wakeups. Early wakeups distribute work - over multiple schedulers faster, but work does more easily bounce - between schedulers.

- -

This flag can be removed or changed at any time without prior - notice.

-
-
- - +swtdcpu very_low|low|medium|high|very_high - -

As +swt but - affects dirty CPU schedulers. Defaults to medium.

- -

This flag can be removed or changed at any time - without prior notice.

-
-
- - +swtdio very_low|low|medium|high|very_high - -

As +swt but affects - dirty IO schedulers. Defaults to medium.

- -

This flag can be removed or changed at any time - without prior notice.

-
-
-
-
- - -

Sets the maximum number of atoms the virtual machine can handle. - Defaults to 1,048,576.

-
- - -

Enables modified timing and sets the modified timing level. Valid - range is 0-9. The timing of the runtime system is changed. A high - level usually means a greater change than a low level. Changing the - timing can be very useful for finding timing-related bugs.

-

Modified timing affects the following:

- - Process spawning - A process calling , - , , - or is scheduled out immediately - after completing the call. When higher modified timing levels are - used, the caller also sleeps for a while after it is scheduled out. - - Context reductions - The number of reductions a process is allowed to use before it - is scheduled out is increased or reduced. - - Input reductions - The number of reductions performed before checking I/O is - increased or reduced. - - - -

Performance suffers when modified timing is enabled. This flag is - only intended for testing and debugging.

-

and - trace messages are lost when tracing on the spawn BIFs.

-

This flag can be removed or changed at any time without prior - notice.

-
-
- - -

Verbose.

-
- - -

Makes the emulator print its version number.

-
- - -

Sets the mapping of warning messages for - . Messages sent to the error logger - using one of the warning routines can be mapped to errors - (), warnings (), or - information reports (). Defaults to warnings. - The current mapping can be retrieved using - . For more information, - see - error_logger:warning_map/0 in Kernel.

-
- - -

Miscellaneous flags:

- - +zdbbl size - -

Sets the distribution buffer busy limit - ( - dist_buf_busy_limit) - in kilobytes. Valid range is 1-2097151. Defaults to 1024.

-

A larger buffer limit allows processes to buffer - more outgoing messages over the distribution. When the - buffer limit has been reached, sending processes will be - suspended until the buffer size has shrunk. The buffer - limit is per distribution channel. A higher limit - gives lower latency and higher throughput at the expense - of higher memory use.

-
- +zdntgc time - -

Sets the delayed node table garbage collection time - ( - delayed_node_table_gc) - in seconds. Valid values are either infinity or - an integer in the range 0-100000000. Defaults to 60.

-

Node table entries that are not referred linger - in the table for at least the amount of time that this - parameter determines. The lingering prevents repeated - deletions and insertions in the tables from occurring.

-
-
-
-
-
- -
- - Environment Variables - - - -

If the emulator needs to write a crash dump, the value of this - variable is the filename of the crash dump file. - If the variable is not set, the name of the crash dump file is - in the current directory.

-
- - -

Unix systems: If the emulator needs to write a crash dump, - it uses the value of this variable to set the nice value - for the process, thus lowering its priority. Valid range is - 1-39 (higher values are replaced with 39). The highest - value, 39, gives the process the lowest priority.

-
- - -

Unix systems: This variable gives the number of seconds - that the emulator is allowed to spend writing a crash dump. When the - given number of seconds have elapsed, the emulator is terminated.

- - - If the variable is set to 0 seconds, the runtime system does - not even attempt to write the crash dump file. It only terminates. - This is the default if option -heart is passed to erl - and ERL_CRASH_DUMP_SECONDS is not set. - - - If the variable is set to a positive value S, - wait for S seconds to complete the crash dump file and - then terminates the runtime system with a SIGALRM signal. - - - A negative value causes the termination of the runtime system - to wait indefinitely until the crash dump file has been completly - written. This is the default if option -heart is not - passed to erl and ERL_CRASH_DUMP_SECONDS is not set. - - -

See also heart(3).

-
- - -

This variable sets the maximum size of a crash dump file in bytes. - The crash dump will be truncated if this limit is exceeded. If the - variable is not set, no size limit is enforced by default. If the - variable is set to 0, the runtime system does not even attempt - to write a crash dump file.

-

Introduced in ERTS 8.1.2 (Erlang/OTP 19.2).

-
- - -

The content of this variable is added to the beginning of the - command line for .

-

Flag is treated in a special way. Its - scope ends at the end of the environment variable content. Arguments - following an flag are moved on the command - line into section , that is, the end of the - command line following an flag.

-
- and - - -

The content of these variables are added to the end of the command - line for .

-

Flag is treated in a special way. Its - scope ends at the end of the environment variable content. Arguments - following an flag are moved on the command - line into section , that is, the end of the - command line following an flag.

-
- - -

Contains a list of additional library directories that the code - server searches for applications and adds to the code path; see - code(3).

-
- - -

Can be set to a comma-separated list of IP addresses, in which case - the epmd daemon listens only - on the specified address(es) and on the loopback address (which is - implicitly added to the list if it has not been specified).

-
- - -

Can contain the port number to use when communicating with - epmd. The default port works - fine in most cases. A different port can be specified - to allow nodes of independent clusters to co-exist on the same host. - All nodes in a cluster must use the same epmd port number.

-
-
-
- -
- - Signals -

On Unix systems, the Erlang runtime will interpret two types of signals.

- - SIGUSR1 - -

A SIGUSR1 signal forces a crash dump.

-
- SIGTERM - -

A SIGTERM will produce a stop message to the init process. - This is equivalent to a init:stop/0 call.

-

Introduced in ERTS 8.3 (Erlang/OTP 19.3)

-
-
-

The signal SIGUSR2 is reserved for internal usage. No other signals are handled.

-
- -
- - Configuration -

The standard Erlang/OTP system can be reconfigured to change the default - behavior on startup.

- - The .erlang startup file - -

When Erlang/OTP is started, the system searches for a file named - .erlang in the user's home directory.

-

If an .erlang file is found, it is assumed to contain valid - Erlang expressions. These expressions are evaluated as if they were - input to the shell.

-

A typical .erlang file contains a set of search paths, for - example:

- -
- user_default and shell_default - -

Functions in the shell that are not prefixed by a module name are - assumed to be functional objects (funs), built-in functions (BIFs), - or belong to the module user_default or - shell_default.

-

To include private shell commands, define them in a module - user_default and add the following argument as the first line - in the .erlang file:

- -
- erl - -

If the contents of .erlang are changed and a private version - of user_default is defined, the Erlang/OTP environment can be - customized. More powerful changes can be made by supplying - command-line arguments in the startup script erl. For more - information, see init(3).

-
-
-
- -
- See Also -

epmd(1), - erl_prim_loader(3), - erts_alloc(3), - init(3), - - application(3), - auth(3), - code(3), - - erl_boot_server(3), - heart(3), - net_kernel(3), - make(3)

-
-
diff --git a/erts/doc/src/erl_cmd.xml b/erts/doc/src/erl_cmd.xml new file mode 100644 index 0000000000..e526080e3a --- /dev/null +++ b/erts/doc/src/erl_cmd.xml @@ -0,0 +1,1781 @@ + + + + +
+ + 19962018 + Ericsson AB. 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. + + + + erl + + + + + erl.xml +
+ erl + The Erlang emulator. + +

The program starts an Erlang runtime system. + The exact details (for example, whether is a + script or a program and which other programs it calls) are + system-dependent.

+ +

Windows users probably want to use the program + instead, which runs in its own window with scrollbars and supports + command-line editing. The program on Windows + provides no line editing in its shell, and on Windows 95 there is no way + to scroll back to text that has scrolled off the screen. The + program must be used, however, in pipelines or if + you want to redirect standard input or output.

+ + +

As from ERTS 5.9 (Erlang/OTP R15B) the runtime system does by + default not bind schedulers to logical processors. + For more information, see system flag + +sbt.

+
+
+ + + + erl <arguments> + Start an Erlang runtime system. + +

Starts an Erlang runtime system.

+

The arguments can be divided into emulator flags, + flags, and plain arguments:

+ + +

Any argument starting with character is + interpreted as an + emulator flag.

+

As indicated by the name, emulator flags control + the behavior of the emulator.

+
+ +

Any argument starting with character + (hyphen) is interpreted as a + flag, which is to + be passed to the Erlang part of the runtime system, more + specifically to the system process, see + init(3).

+

The process itself interprets some of + these flags, the init flags. It also stores any + remaining flags, the user flags. The latter can be + retrieved by calling .

+

A small number of "-" flags exist, which now actually are + emulator flags, see the description below.

+
+ +

Plain arguments are not interpreted in any way. They are also + stored by the process and can be retrieved + by calling . + Plain arguments can occur before the first flag, or after a + flag. Also, the + flag causes everything that follows to become plain arguments.

+
+
+

Examples:

+
+% erl +W w -sname arnie +R 9 -s my_init -extra +bertie
+(arnie@host)1> init:get_argument(sname).
+{ok,[["arnie"]]}
+(arnie@host)2> init:get_plain_arguments().
+["+bertie"]
+

Here and are + emulator flags. is an init flag, + interpreted by . + is a user flag, stored by + . It is read by Kernel and causes the + Erlang runtime system to become distributed. Finally, everything after + (that is, ) is + considered as plain arguments.

+
+% erl -myflag 1
+1> init:get_argument(myflag).
+{ok,[["1"]]}
+2> init:get_plain_arguments().
+[]
+

Here the user flag is passed to and + stored by the process. It is a user-defined + flag, presumably used by some user-defined application.

+
+
+
+ +
+ + Flags +

In the following list, init flags are marked "(init flag)". + Unless otherwise specified, all other flags are user flags, for + which the values can be retrieved by calling + . Notice that the list of user + flags is not exhaustive, there can be more application-specific + flags that instead are described in the corresponding + application documentation.

+ + (init flag) + +

Everything following up to the next flag + ( or ) is considered + plain arguments and can be retrieved using + .

+
+ + +

Sets the application configuration parameter + to the value for the application + ; see + app(4) and + + application(3).

+
+ + +

Command-line arguments are read from the file + . The arguments read from the file replace + flag '' on the resulting + command line.

+

The file is to be a plain text file and + can contain comments and command-line arguments. A comment begins + with a # character and continues until the next end of line + character. Backslash (\\) is used as quoting character. All + command-line arguments accepted by are allowed, + also flag . Be careful not to + cause circular dependencies between files containing flag + , though.

+

The flag is treated in special way. Its + scope ends at the end of the file. Arguments following an + flag are moved on the command line into the + section, that is, the end of the command + line following after an flag.

+
+ + +

The initial Erlang shell does not read user input until + the system boot procedure has been completed (Erlang/OTP 5.4 and + later). This flag disables the start synchronization feature + and lets the shell start in parallel with the rest of + the system.

+
+ + +

Specifies the name of the boot file, , + which is used to start the system; see + init(3). Unless + contains an absolute path, the system searches + for in the current and + directories.

+

Defaults to .

+
+ + +

If the boot script contains a path variable + other than , this variable is expanded to + . Used when applications are installed in + another directory than ; see + + systools:make_script/1,2 in SASL.

+
+ + +

Enables the code path cache of the code server; see + code(3).

+
+ + +

Compiles the specified modules and then terminates (with + non-zero exit code if the compilation of some file did not + succeed). Implies .

+

Not recommended; use erlc + instead.

+
+ + +

Specifies the name of one or more configuration files, + , which is used to configure + applications; see + app(4) and + + application(3).

+
+ + +

If this flag is present, does not maintain + a fully connected network of distributed Erlang nodes, and then + global name registration cannot be used; see + global(3).

+
+ + +

Obsolete flag without any effect and common misspelling for + . Use + instead.

+
+ + +

Starts the Erlang runtime system detached from the system + console. Useful for running daemons and backgrounds processes. Implies + .

+
+ + +

Useful for debugging. Prints the arguments sent to the emulator.

+
+ + +

Start an emulator of a different type. For example, to start + the lock-counter emualator, use -emu_type lcnt. (The emulator + must already be built. Use the configure option + --enable-lock-counter to build the lock-counter emulator.)

+
+ + +

Sets the host OS environment variable to + the value for the Erlang runtime system. + Example:

+
+% erl -env DISPLAY gin:0
+

In this example, an Erlang runtime system is started with + environment variable set to + .

+
+ (init flag) + +

Configures the module responsible to communicate to + epmd. Defaults to erl_epmd.

+
+ (init flag) + +

Makes evaluate the expression + ; see + init(3).

+
+ (init flag) + +

Everything following is considered plain + arguments and can be retrieved using + .

+
+ + +

Starts heartbeat monitoring of the Erlang runtime system; + see + heart(3).

+
+ + +

Starts the Erlang runtime system as a hidden node, if it is + run as a distributed node. Hidden nodes always establish + hidden connections to all other nodes except for nodes in the + same global group. Hidden connections are not published on + any of the connected nodes, that is, none of the connected + nodes are part of the result from on the + other node. See also hidden global groups; + + global_group(3).

+
+ + +

Specifies the IP addresses for the hosts on which Erlang boot servers + are running, see + erl_boot_server(3). This flag + is mandatory if flag is present.

+

The IP addresses must be specified in the standard form (four + decimal numbers separated by periods, for example, + . Hosts names are not acceptable, + but a broadcast address (preferably limited to the local network) + is.

+
+ + +

Specifies the identity of the Erlang runtime system. If it is + run as a distributed node, must be identical to + the name supplied together with flag or + .

+
+ + +

Makes write some debug information while + interpreting the boot script.

+
+ (emulator flag) + +

Selects an instrumented Erlang runtime system (virtual + machine) to run, instead of the ordinary one. When running an + instrumented runtime system, some resource usage data can be + obtained and analyzed using the module. + Functionally, it behaves exactly like an ordinary Erlang + runtime system.

+
+ + +

Specifies the method used by to + load Erlang modules into the system; see + erl_prim_loader(3). + Two methods are supported:

+ + +

, which means use the local file system, + this is the default.

+
+ +

, which means use a boot server on + another machine. The flags , + and must + also be specified.

+
+
+

If is something else, the user-supplied + port program is started.

+
+ + +

Makes the Erlang runtime system invoke + in the current working directory and then terminate; see + make(3). Implies + .

+
+ + +

Displays the manual page for the Erlang module + . Only supported on Unix.

+
+ + +

Modules are auto loaded when they are first referenced if the + runtime system runs in mode, which is + the default. In mode modules are not auto + loaded. The latter is recommended when the boot script preloads all + modules, as conventionally happens in OTP releases. See + code(3)

. +
+ + +

Makes the Erlang runtime system into a distributed node. + This flag invokes all network servers necessary for a node to + become distributed; see + net_kernel(3). It is also ensured that + runs on the current host before Erlang is + started; see epmd(1).and the + -start_epmd option.

+

The node name will be , where + is the fully qualified host name of the + current host. For short names, use flag + instead.

+ +

+ Starting a distributed node without also specifying + -proto_dist inet_tls + will expose the node to attacks that may give the attacker + complete access to the node and in extension the cluster. + When using un-secure distributed nodes, make sure that the + network is configured to keep potential attackers out. +

+
+
+ + +

Ensures that the Erlang runtime system never tries to read + any input. Implies .

+
+ + +

Starts an Erlang runtime system with no shell. This flag + makes it possible to have the Erlang runtime system as a + component in a series of Unix pipes.

+
+ + +

Disables the sticky directory facility of the Erlang code + server; see + code(3).

+
+ + +

Invokes the old Erlang shell from Erlang/OTP 3.3. The old shell + can still be used.

+
+ + +

Adds the specified directories to the beginning of the code + path, similar to + . Note that the + order of the given directories will be reversed in the + resulting path.

+

As an alternative to -pa, if several directories are + to be prepended to the code path and the directories have a + common parent directory, that parent directory can be + specified in environment variable ERL_LIBS; see + code(3).

+
+ + +

Adds the specified directories to the end of the code path, + similar to ; see + code(3).

+
+ + +

Replaces the path specified in the boot script; see + script(4).

+
+ + + +

Specifies a protocol for Erlang distribution:

+ + inet_tcp + TCP over IPv4 (the default) + inet_tls + Distribution over TLS/SSL, See the + + Using SSL for Erlang Distribution User's Guide + for details on how to setup a secure distributed node. + + inet6_tcp + TCP over IPv6 + +

For example, to start up IPv6 distributed nodes:

+
+% erl -name test@ipv6node.example.com -proto_dist inet6_tcp
+
+ + +

Starts Erlang with a remote shell connected to + . Requires either + or to be given. If + does not contain a hostname, one is automatically taken from + or

+
+ + +

Specifies an alternative to for starting a + slave node on a remote host; see + slave(3).

+
+ (init + flag) + +

Makes call the specified function. + defaults to . + If no arguments are provided, the function is assumed to be of + arity 0. Otherwise it is assumed to be of arity 1, taking the list + as argument. All arguments are + passed as strings. See + init(3).

+
+ (init flag) + +

Makes call the specified function. + defaults to . + If no arguments are provided, the function is assumed to be of + arity 0. Otherwise it is assumed to be of arity 1, taking the list + as argument. All arguments are + passed as atoms. See + init(3).

+
+ + +

Sets the magic cookie of the node to ; see + + erlang:set_cookie/2.

+
+ + +

Specifies how long time (in milliseconds) the + process is allowed to spend shutting down the system. If + milliseconds have elapsed, all processes still + existing are killed. Defaults to .

+
+ + +

Makes the Erlang runtime system into a distributed node, similar to + , but the host name portion of the node + name will be the short name, not fully + qualified.

+

This is sometimes the only way to run distributed Erlang if + the Domain Name System (DNS) is not running. No communication can + exist between nodes running with flag + and those running with flag , as node + names must be unique in distributed Erlang systems.

+ +

+ Starting a distributed node without also specifying + -proto_dist inet_tls + will expose the node to attacks that may give the attacker + complete access to the node and in extension the cluster. + When using un-secure distributed nodes, make sure that the + network is configured to keep potential attackers out. +

+
+
+ -start_epmd true | false + + +

Specifies whether Erlang should start + epmd on startup. By default + this is true, but if you prefer to start epmd + manually, set this to false.

+ +

This only applies if Erlang is started as a distributed node, + i.e. if -name or -sname is specified. Otherwise, + epmd is not started even if -start_epmd true is given.

+ +

Note that a distributed node will fail to start if epmd is + not running.

+
+ (emulator flag) + +

Makes the emulator print its version number. The same + as .

+
+
+
+ +
+ + Emulator Flags +

invokes the code for the Erlang emulator (virtual + machine), which supports the following flags:

+ + + + +

Suggested stack size, in kilowords, for threads in the + async thread pool. Valid range is 16-8192 kilowords. The + default suggested stack size is 16 kilowords, that is, 64 + kilobyte on 32-bit architectures. This small default size + has been chosen because the number of async threads can + be large. The default size is enough for drivers + delivered with Erlang/OTP, but might not be large + enough for other dynamically linked-in drivers that use the + + driver_async() functionality. + Notice that the value passed is only a suggestion, + and it can even be ignored on some platforms.

+
+ + +

Sets the number of threads in async thread pool. Valid range + is 1-1024. The async thread pool is used by linked-in drivers to + handle work that may take a very long time. Since OTP 21 there are + very few linked-in drivers in the default Erlang/OTP distribution + that uses the async thread pool. Most of them have been migrated to + dirty IO schedulers. Defaults to 1.

+
+ + +

Option makes + interrupt the current shell instead of invoking the emulator break + handler. Option (same as specifying + without an extra option) disables the break + handler. Option makes the emulator ignore any + break signal.

+

If option is used with + on Unix, will + restart the shell process rather than interrupt it.

+

Notice that on Windows, this flag is only applicable for + , not + (). Notice also that + is used instead of + on Windows.

+
+ + +

Enables or disables + time + correction:

+ + true + Enables time correction. This is the default if + time correction is supported on the specific platform. + false + Disables time correction. + +

For backward compatibility, the boolean value can be omitted. + This is interpreted as +c false.

+
+ + +

Sets time warp + mode:

+ + no_time_warp + + No time warp mode (the default) + single_time_warp + + Single time warp mode + multi_time_warp + + Multi-time warp mode + +
+ + +

If the emulator detects an internal error (or runs out of memory), + it, by default, generates both a crash dump and a core dump. + The core dump is, however, not very useful as the content + of process heaps is destroyed by the crash dump generation.

+

Option +d instructs the emulator to produce only a + core dump and no crash dump if an internal error is detected.

+

Calling + erlang:halt/1 with a string argument still + produces a crash dump. On Unix systems, sending an emulator process + a SIGUSR1 signal also forces a crash dump.

+
+ + +

Limits the number of decentralized counter groups used by + decentralized counters optimized for update operations in the + Erlang runtime system. By default, the limit is 256.

+

When the number of schedulers is less than or equal to the + limit, each scheduler has its own group. When the + number of schedulers is larger than the groups limit, + schedulers share groups. Shared groups degrade + the performance for updating counters while many reader groups + degrade the performance for reading counters. So, the limit is a tradeoff + between performance for update operations and performance for + read operations. Each group consumes 64 bytes in each + counter.

+

Notice that a runtime system using decentralized + counter groups benefits from binding + schedulers to logical processors, as the groups are + distributed better between schedulers with this option.

+

This option only affects decentralized counters used for + the counters that are keeping track of the memory consumption + and the number of terms in ETS tables of type ordered_set with + the write_concurrency option activated.

+
+ + +

Sets the maximum number of ETS tables. This limit is + partially obsolete. +

+
+ + +

Forces option compressed on all ETS tables. + Only intended for test and evaluation.

+
+ + + +

The virtual machine works with filenames as if they are encoded + using the ISO Latin-1 encoding, disallowing Unicode characters with + code points > 255.

+

For more information about Unicode filenames, see section + Unicode + Filenames in the STDLIB User's Guide. Notice that + this value also applies to command-line parameters and environment + variables (see section + Unicode in Environment and Parameters in the STDLIB + User's Guide).

+
+ + +

The virtual machine works with filenames as if they are encoded + using UTF-8 (or some other system-specific Unicode encoding). This is + the default on operating systems that enforce Unicode encoding, that + is, Windows and MacOS X.

+

The +fnu switch can be followed by w, i, or + e to control how wrongly encoded filenames are to be + reported:

+ + +

w means that a warning is sent to the error_logger + whenever a wrongly encoded filename is "skipped" in directory + listings. This is the default.

+
+ +

i means that those wrongly encoded filenames are silently + ignored.

+
+ +

e means that the API function returns an error whenever a + wrongly encoded filename (or directory name) is encountered.

+
+
+

Notice that + file:read_link/1 always returns an error if the link + points to an invalid filename.

+

For more information about Unicode filenames, see section + Unicode + Filenames in the STDLIB User's Guide. Notice that + this value also applies to command-line parameters and environment + variables (see section + Unicode in Environment and Parameters in the STDLIB + User's Guide).

+
+ + +

Selection between +fnl and +fnu is done based + on the current locale settings in the OS. This means that if you + have set your terminal for UTF-8 encoding, the filesystem is + expected to use the same encoding for filenames. This is + default on all operating systems, except MacOS X and Windows.

+

The +fna switch can be followed by w, i, or + e. This has effect if the locale settings cause the behavior + of +fnu to be selected; see the description of +fnu + above. If the locale settings cause the behavior of +fnl to be + selected, then w, i, or e have no effect.

+

For more information about Unicode filenames, see section + Unicode + Filenames in the STDLIB User's Guide. Notice that + this value also applies to command-line parameters and environment + variables (see section + Unicode in Environment and Parameters in the STDLIB + User's Guide).

+
+ + +

Sets the default heap size of processes to the size + .

+
+ + +

Sets the default binary virtual heap size of processes to the size + .

+
+ + +

Sets the default maximum heap size of processes to the size + . Defaults to 0, which means that no + maximum heap size is used. For more information, see + + process_flag(max_heap_size, MaxHeapSize).

+
+ + +

Sets whether to send an error logger message or not for processes + reaching the maximum heap size. Defaults to true. + For more information, see + + process_flag(max_heap_size, MaxHeapSize).

+
+ + +

Sets whether to kill processes reaching the maximum heap size or not. + Default to true. For more information, see + + process_flag(max_heap_size, MaxHeapSize).

+
+ + +

Sets the initial process dictionary size of processes to the size + .

+
+ +hmqd off_heap|on_heap + +

Sets the default value for process flag message_queue_data. + Defaults to on_heap. If +hmqd is not + passed, on_heap will be the default. For more information, see + + process_flag(message_queue_data, MQD).

+
+ +IOp PollSets + +

Sets the number of IO pollsets to use when polling for I/O. + This option is only used on platforms that support concurrent + updates of a pollset, otherwise the same number of pollsets + are used as IO poll threads. + The default is 1. +

+
+ +IOt PollThreads + +

Sets the number of IO poll threads to use when polling for I/O. + The maximum number of poll threads allowed is 1024. The default is 1. +

+

A good way to check if more IO poll threads are needed is to use + microstate accounting + and see what the load of the IO poll thread is. If it is high it could + be a good idea to add more threads.

+
+ +IOPp PollSetsPercentage + +

Similar to +IOp but uses + percentages to set the number of IO pollsets to create, based on the + number of poll threads configured. If both +IOPp and +IOp + are used, +IOPp is ignored. +

+
+ +IOPt PollThreadsPercentage + +

Similar to +IOt but uses + percentages to set the number of IO poll threads to create, based on + the number of schedulers configured. If both +IOPt and + +IOt are used, +IOPt is ignored. +

+
+ + +

Enables autoload tracing, displaying information while loading + code.

+
+ + +

Prevents loading information about source filenames and line + numbers. This saves some memory, but exceptions do not contain + information about the filenames and line numbers.

+
+ + +

Memory allocator-specific flags. For more information, see + erts_alloc(3).

+
+ + + +

Sets the range of characters that the system considers printable in + heuristic detection of strings. This typically affects the shell, + debugger, and io:format functions (when ~tp is used in + the format string).

+

Two values are supported for Range:

+ + latin1 + The default. Only characters in the ISO Latin-1 range can be + considered printable. This means that a character with a code point + > 255 is never considered printable and that lists containing + such characters are displayed as lists of integers rather than text + strings by tools. + unicode + All printable Unicode characters are considered when + determining if a list of integers is to be displayed in + string syntax. This can give unexpected results if, for + example, your font does not cover all Unicode characters. + +

See also + io:printable_range/0 in STDLIB.

+
+ + +

Sets the maximum number of simultaneously existing processes for this + system if a Number is passed as value. Valid range for + Number is [1024-134217727]

+

NOTE: The actual maximum chosen may be much larger than + the Number passed. Currently the runtime system often, + but not always, chooses a value that is a power of 2. This might, + however, be changed in the future. The actual value chosen can be + checked by calling + erlang:system_info(process_limit).

+

The default value is 262144

+
+ + +

Sets the maximum number of simultaneously existing ports for this + system if a Number is passed as value. Valid range for Number + is [1024-134217727]

+

NOTE: The actual maximum chosen may be much larger than + the actual Number passed. Currently the runtime system often, + but not always, chooses a value that is a power of 2. This might, + however, be changed in the future. The actual value chosen can be + checked by calling + erlang:system_info(port_limit).

+

The default value used is normally 65536. However, if + the runtime system is able to determine maximum amount of file + descriptors that it is allowed to open and this value is larger + than 65536, the chosen value will increased to a value + larger or equal to the maximum amount of file descriptors that + can be opened.

+

On Windows the default value is set to 8196 because the + normal OS limitations are set higher than most machines can handle.

+
+ + +

Sets the compatibility mode.

+

The distribution mechanism is not backward compatible by + default. This flag sets the emulator in compatibility mode + with an earlier Erlang/OTP release . + The release number must be in the range + -2..]]>. This + limits the emulator, making it possible for it to communicate + with Erlang nodes (as well as C- and Java nodes) running that + earlier release.

+ +

Ensure that all nodes (Erlang-, C-, and Java nodes) of + a distributed Erlang system is of the same Erlang/OTP release, + or from two different Erlang/OTP releases X and Y, where + all Y nodes have compatibility mode X.

+
+
+ + +

Forces ETS memory block to be moved on realloc.

+
+ + +

Limits the number of reader groups used by read/write locks + optimized for read operations in the Erlang runtime system. By + default the reader groups limit is 64.

+

When the number of schedulers is less than or equal to the reader + groups limit, each scheduler has its own reader group. When the + number of schedulers is larger than the reader groups limit, + schedulers share reader groups. Shared reader groups degrade + read lock and read unlock performance while many + reader groups degrade write lock performance. So, the limit is a + tradeoff between performance for read operations and performance + for write operations. Each reader group consumes 64 byte + in each read/write lock.

+

Notice that a runtime system using shared reader groups benefits from + binding schedulers to logical + processors, as the reader groups are distributed better + between schedulers.

+
+ + + +

Sets the number of scheduler threads to create and scheduler threads + to set online. The maximum for both values is 1024. If the Erlang + runtime system is able to determine the number of logical processors + configured and logical processors available, Schedulers + defaults to logical processors configured, and + SchedulersOnline defaults to logical processors available; + otherwise the default values are 1. If the emulator detects that it + is subject to a CPU + quota, the default value for SchedulersOnline will + be limited accordingly.

+

+ Schedulers can be omitted if :SchedulerOnline is not + and conversely. The number of schedulers online can be changed at + runtime through + + erlang:system_flag(schedulers_online, + SchedulersOnline).

+

If Schedulers or SchedulersOnline is specified as a + negative number, the value is subtracted from the default number of + logical processors configured or logical processors available, + respectively.

+

Specifying value 0 for Schedulers or + SchedulersOnline resets the number of scheduler threads or + scheduler threads online, respectively, to its default value.

+
+ + +

Similar to +S but uses + percentages to set the number of scheduler threads to create, based + on logical processors configured, and scheduler threads to set online, + based on logical processors available. + Specified values must be > 0. For example, + +SP 50:25 sets the number of scheduler threads to 50% of the + logical processors configured, and the number of scheduler threads + online to 25% of the logical processors available. + SchedulersPercentage can be omitted if + :SchedulersOnlinePercentage is not and conversely. The number + of schedulers online can be changed at runtime through + + erlang:system_flag(schedulers_online, + SchedulersOnline).

+

This option interacts with +S + settings. For example, on a system with 8 logical cores configured + and 8 logical cores available, the combination of the options + +S 4:4 +SP 50:25 (in either order) results in 2 scheduler + threads (50% of 4) and 1 scheduler thread online (25% of 4).

+
+ + +

Sets the number of dirty CPU scheduler threads to create and dirty + CPU scheduler threads to set online. + The maximum for both values is 1024, and each value is + further limited by the settings for normal schedulers:

+ + The number of dirty CPU scheduler threads created cannot exceed + the number of normal scheduler threads created. + The number of dirty CPU scheduler threads online cannot exceed + the number of normal scheduler threads online. + +

For details, see the +S and + +SP. By default, the number + of dirty CPU scheduler threads created equals the number of normal + scheduler threads created, and the number of dirty CPU scheduler + threads online equals the number of normal scheduler threads online. + DirtyCPUSchedulers can be omitted if + :DirtyCPUSchedulersOnline is not and conversely. The number of + dirty CPU schedulers online can be changed at runtime through + + erlang:system_flag(dirty_cpu_schedulers_online, + DirtyCPUSchedulersOnline).

+

The amount of dirty CPU schedulers is limited by the amount of + normal schedulers in order to limit the effect on processes + executing on ordinary schedulers. If the amount of dirty CPU + schedulers was allowed to be unlimited, dirty CPU bound jobs would + potentially starve normal jobs.

+

Typical users of the dirty CPU schedulers are large garbage collections, + json protocol encode/decoders written as nifs and matrix manipulation + libraries.

+

You can use msacc(3) + in order to see the current load of the dirty CPU schedulers threads + and adjust the number used accordingly.

+
+ + +

Similar to +SDcpu but + uses percentages to set the number of dirty CPU scheduler threads to + create and the number of dirty CPU scheduler threads to set online. + Specified values must be + > 0. For example, +SDPcpu 50:25 sets the number of dirty + CPU scheduler threads to 50% of the logical processors configured + and the number of dirty CPU scheduler threads online to 25% of the + logical processors available. DirtyCPUSchedulersPercentage can + be omitted if :DirtyCPUSchedulersOnlinePercentage is not and + conversely. The number of dirty CPU schedulers online can be changed + at runtime through + + erlang:system_flag(dirty_cpu_schedulers_online, + DirtyCPUSchedulersOnline).

+

This option interacts with +SDcpu settings. For example, on a + system with 8 logical cores configured and 8 logical cores available, + the combination of the options +SDcpu 4:4 +SDPcpu 50:25 (in + either order) results in 2 dirty CPU scheduler threads (50% of 4) and + 1 dirty CPU scheduler thread online (25% of 4).

+
+ + +

Sets the number of dirty I/O scheduler threads to create. + Valid range is 0-1024. By + default, the number of dirty I/O scheduler threads created is 10.

+

The amount of dirty IO schedulers is not limited by the amount of + normal schedulers like the amount of + dirty CPU schedulers. This since only I/O bound work is + expected to execute on dirty I/O schedulers. If the user should schedule CPU + bound jobs on dirty I/O schedulers, these jobs might starve ordinary + jobs executing on ordinary schedulers.

+

Typical users of the dirty IO schedulers are reading and writing to files.

+

You can use msacc(3) + in order to see the current load of the dirty IO schedulers threads + and adjust the number used accordingly.

+
+ + +

Scheduling specific flags.

+ + +sbt BindType + +

Sets scheduler bind type.

+

Schedulers can also be bound using flag + +stbt. The only + difference between these two flags is how the following errors + are handled:

+ + Binding of schedulers is not supported on the specific + platform. + No available CPU topology. That is, the runtime system was + not able to detect the CPU topology automatically, and no + user-defined CPU topology + was set. + +

If any of these errors occur when +sbt has been passed, + the runtime system prints an error message, and refuses to + start. If any of these errors occur when +stbt has been + passed, the runtime system silently ignores the error, and + start up using unbound schedulers.

+

Valid BindTypes:

+ + u + unbound - Schedulers are not bound to logical + processors, that is, the operating system decides where the + scheduler threads execute, and when to migrate them. This is + the default. + + ns + no_spread - Schedulers with close scheduler + identifiers are bound as close as possible in hardware. + + ts + thread_spread - Thread refers to hardware threads + (such as Intel's hyper-threads). Schedulers with low scheduler + identifiers, are bound to the first hardware thread of + each core, then schedulers with higher scheduler identifiers + are bound to the second hardware thread of each core,and so on. + + ps + processor_spread - Schedulers are spread like + thread_spread, but also over physical processor chips. + + s + spread - Schedulers are spread as much as possible. + + nnts + no_node_thread_spread - Like thread_spread, + but if multiple Non-Uniform Memory Access (NUMA) nodes exist, + schedulers are spread over one NUMA node at a time, + that is, all logical processors of one NUMA node are bound + to schedulers in sequence. + + nnps + no_node_processor_spread - Like + processor_spread, but if multiple NUMA nodes exist, + schedulers are spread over one NUMA node at a time, that is, + all logical processors of one NUMA node are bound to + schedulers in sequence. + + tnnps + thread_no_node_processor_spread - A combination of + thread_spread, and no_node_processor_spread. + Schedulers are spread over hardware threads across NUMA + nodes, but schedulers are only spread over processors + internally in one NUMA node at a time. + + db + default_bind - Binds schedulers the default way. + Defaults to thread_no_node_processor_spread + (which can change in the future). + + +

Binding of schedulers is only supported on newer + Linux, Solaris, FreeBSD, and Windows systems.

+

If no CPU topology is available when flag +sbt + is processed and BindType is any other type than + u, the runtime system fails to start. CPU + topology can be defined using flag + +sct. Notice + that flag +sct can have to be passed before flag + +sbt on the command line (if no CPU topology + has been automatically detected).

+

The runtime system does by default not bind schedulers + to logical processors.

+ +

If the Erlang runtime system is the only operating system + process that binds threads to logical processors, this + improves the performance of the runtime system. However, + if other operating system processes (for example + another Erlang runtime system) also bind threads to + logical processors, there can be a performance penalty + instead. This performance penalty can sometimes be + severe. If so, you are advised not to + bind the schedulers.

+
+

How schedulers are bound matters. For example, in + situations when there are fewer running processes than + schedulers online, the runtime system tries to migrate + processes to schedulers with low scheduler identifiers. + The more the schedulers are spread over the hardware, + the more resources are available to the runtime + system in such situations.

+ +

If a scheduler fails to bind, this is + often silently ignored, as it is not always + possible to verify valid logical processor identifiers. If + an error is reported, it is reported to the + error_logger. If you want to verify that the + schedulers have bound as requested, call + + erlang:system_info(scheduler_bindings).

+
+
+ + +sbwt none|very_short|short|medium|long|very_long + +

Sets scheduler busy wait threshold. Defaults to medium. + The threshold determines how long schedulers are to busy + wait when running out of work before going to sleep.

+ +

This flag can be removed or changed at any time + without prior notice.

+
+
+ + +sbwtdcpu none|very_short|short|medium|long|very_long + +

As +sbwt but affects + dirty CPU schedulers. Defaults to short.

+ +

This flag can be removed or changed at any time + without prior notice.

+
+
+ + +sbwtdio none|very_short|short|medium|long|very_long + +

As +sbwt but affects + dirty IO schedulers. Defaults to short.

+ +

This flag can be removed or changed at any time + without prior notice.

+
+
++scl true|false + +

Enables or disables scheduler compaction of load. By default + scheduler compaction of load is enabled. When enabled, load + balancing strives for a load distribution, which causes + as many scheduler threads as possible to be fully loaded (that is, + not run out of work). This is accomplished by migrating load + (for example, runnable processes) into a smaller set of schedulers + when schedulers frequently run out of work. When disabled, + the frequency with which schedulers run out of work is + not taken into account by the load balancing logic.

+

+scl false is similar to + +sub true, but + +sub true also balances scheduler utilization + between schedulers.

+
+ +sct CpuTopology + + + = integer(); when 0 =< =< 65535]]> + + = -]]> + = | ]]> + = , | + ]]> + = L]]> + = T | t]]> + + = C | c]]> + = P | p]]> + + = N | n]]> + = + | + ]]> + + : | + ]]> + +

Sets a user-defined CPU topology. The user-defined + CPU topology overrides any automatically detected + CPU topology. The CPU topology is used when + binding schedulers to logical + processors.

+

Uppercase letters signify real identifiers and lowercase + letters signify fake identifiers only used for description + of the topology. Identifiers passed as real identifiers can + be used by the runtime system when trying to access specific + hardware; if they are incorrect the behavior is + undefined. Faked logical CPU identifiers are not accepted, + as there is no point in defining the CPU topology without + real logical CPU identifiers. Thread, core, processor, and + node identifiers can be omitted. If omitted, the thread ID + defaults to t0, the core ID defaults to c0, + the processor ID defaults to p0, and the node ID is + left undefined. Either each logical processor must + belong to only one NUMA node, or no logical + processors must belong to any NUMA nodes.

+

Both increasing and decreasing ]]>s + are allowed.

+

NUMA node identifiers are system wide. That is, each NUMA + node on the system must have a unique identifier. Processor + identifiers are also system wide. Core identifiers are + processor wide. Thread identifiers are core wide.

+

The order of the identifier types implies the hierarchy of the + CPU topology. The valid orders are as follows:

+ + +

]]>, + that is, thread is part of a core that is part of a processor, + which is part of a NUMA node.

+
+ +

]]>, + that is, thread is part of a core that is part of a NUMA node, + which is part of a processor.

+
+
+

A CPU topology can consist of both processor external, and + processor internal NUMA nodes as long as each logical processor + belongs to only one NUMA node. If + ]]> is omitted, its default position + is before ]]>. That is, the default is + processor external NUMA nodes.

+

If a list of identifiers is used in an + ]]>:

+ + ]]> must be a list + of identifiers. + At least one other identifier type besides + ]]> must also have a + list of identifiers. + All lists of identifiers must produce the + same number of identifiers. + +

A simple example. A single quad core processor can be + described as follows:

+
+% erl +sct L0-3c0-3
+1> erlang:system_info(cpu_topology).
+[{processor,[{core,{logical,0}},
+             {core,{logical,1}},
+             {core,{logical,2}},
+             {core,{logical,3}}]}]
+

A more complicated example with two quad core + processors, each processor in its own NUMA node. + The ordering of logical processors is a bit weird. + This to give a better example of identifier lists:

+
+% erl +sct L0-1,3-2c0-3p0N0:L7,4,6-5c0-3p1N1
+1> erlang:system_info(cpu_topology).
+[{node,[{processor,[{core,{logical,0}},
+                    {core,{logical,1}},
+                    {core,{logical,3}},
+                    {core,{logical,2}}]}]},
+ {node,[{processor,[{core,{logical,7}},
+                    {core,{logical,4}},
+                    {core,{logical,6}},
+                    {core,{logical,5}}]}]}]
+

As long as real identifiers are correct, it is OK + to pass a CPU topology that is not a correct + description of the CPU topology. When used with + care this can be very useful. This + to trick the emulator to bind its schedulers + as you want. For example, if you want to run multiple + Erlang runtime systems on the same machine, you + want to reduce the number of schedulers used and + manipulate the CPU topology so that they bind to + different logical CPUs. An example, with two Erlang + runtime systems on a quad core machine:

+
+% erl +sct L0-3c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname one
+% erl +sct L3-0c0-3 +sbt db +S3:2 -detached -noinput -noshell -sname two
+

In this example, each runtime system have two + schedulers each online, and all schedulers online + will run on different cores. If we change to one + scheduler online on one runtime system, and three + schedulers online on the other, all schedulers + online will still run on different cores.

+

Notice that a faked CPU topology that does not reflect + how the real CPU topology looks like is likely to + decrease the performance of the runtime system.

+

For more information, see + + erlang:system_info(cpu_topology).

+
+ +sfwi Interval + +

Sets scheduler-forced wakeup interval. All run queues are + scanned each Interval milliseconds. While there are + sleeping schedulers in the system, one scheduler is woken + for each non-empty run queue found. Interval default + to 0, meaning this feature is disabled.

+ +

This feature has been introduced as a temporary workaround + for long-executing native code, and native code that does not + bump reductions properly in OTP. When these bugs have be fixed, + this flag will be removed.

+
+
+ +spp Bool + +

Sets default scheduler hint for port parallelism. If set to + true, the virtual machine schedules port tasks when it + improves parallelism in the system. If set to false, the + virtual machine tries to perform port tasks immediately, + improving latency at the expense of parallelism. Default to + false. The default used can be inspected in runtime by + calling + erlang:system_info(port_parallelism). + The default can be overridden on port creation by passing option + + parallelism to + + erlang:open_port/2

. +
+ + + +

Suggested stack size, in kilowords, for scheduler threads. + Valid range is 20-8192 kilowords. The default suggested + stack size is 128 kilowords.

+
+ + + +

Suggested stack size, in kilowords, for dirty CPU scheduler + threads. Valid range is 20-8192 kilowords. The default + suggested stack size is 40 kilowords.

+
+ + + +

Suggested stack size, in kilowords, for dirty IO scheduler + threads. Valid range is 20-8192 kilowords. The default + suggested stack size is 40 kilowords.

+
+ +stbt BindType + +

Tries to set the scheduler bind type. The same as flag + +sbt except + how some errors are handled. For more information, see + +sbt.

+
+ +sub true|false + +

Enables or disables + + scheduler utilization balancing of load. By default + scheduler utilization balancing is disabled and instead scheduler + compaction of load is enabled, which strives for a load + distribution that causes as many scheduler threads as possible + to be fully loaded (that is, not run out of work). When scheduler + utilization balancing is enabled, the system instead tries to + balance scheduler utilization between schedulers. That is, + strive for equal scheduler utilization on all schedulers.

+

+sub true is only supported on systems where the runtime + system detects and uses a monotonically increasing high-resolution + clock. On other systems, the runtime system fails to start.

+

+sub true implies + +scl false. The difference between + +sub true and +scl false is that +scl false + does not try to balance the scheduler utilization.

+
+ + +swct very_eager|eager|medium|lazy|very_lazy + +

Sets scheduler wake cleanup threshold. Defaults to medium. + Controls how eager schedulers are to be requesting + wakeup because of certain cleanup operations. When a lazy setting + is used, more outstanding cleanup operations can be left undone + while a scheduler is idling. When an eager setting is used, + schedulers are more frequently woken, potentially increasing + CPU-utilization.

+ +

This flag can be removed or changed at any time without prior + notice.

+
+
+ +sws default|legacy + +

Sets scheduler wakeup strategy. Default strategy changed in + ERTS 5.10 (Erlang/OTP R16A). This strategy was known as + proposal in Erlang/OTP R15. The legacy strategy + was used as default from R13 up to and including R15.

+ +

This flag can be removed or changed at any time without prior + notice.

+
+
+ + +swt very_low|low|medium|high|very_high + +

Sets scheduler wakeup threshold. Defaults to medium. + The threshold determines when to wake up sleeping schedulers + when more work than can be handled by currently awake schedulers + exists. A low threshold causes earlier wakeups, and a high + threshold causes later wakeups. Early wakeups distribute work + over multiple schedulers faster, but work does more easily bounce + between schedulers.

+ +

This flag can be removed or changed at any time without prior + notice.

+
+
+ + +swtdcpu very_low|low|medium|high|very_high + +

As +swt but + affects dirty CPU schedulers. Defaults to medium.

+ +

This flag can be removed or changed at any time + without prior notice.

+
+
+ + +swtdio very_low|low|medium|high|very_high + +

As +swt but affects + dirty IO schedulers. Defaults to medium.

+ +

This flag can be removed or changed at any time + without prior notice.

+
+
+
+
+ + +

Sets the maximum number of atoms the virtual machine can handle. + Defaults to 1,048,576.

+
+ + +

Enables modified timing and sets the modified timing level. Valid + range is 0-9. The timing of the runtime system is changed. A high + level usually means a greater change than a low level. Changing the + timing can be very useful for finding timing-related bugs.

+

Modified timing affects the following:

+ + Process spawning + A process calling , + , , + or is scheduled out immediately + after completing the call. When higher modified timing levels are + used, the caller also sleeps for a while after it is scheduled out. + + Context reductions + The number of reductions a process is allowed to use before it + is scheduled out is increased or reduced. + + Input reductions + The number of reductions performed before checking I/O is + increased or reduced. + + + +

Performance suffers when modified timing is enabled. This flag is + only intended for testing and debugging.

+

and + trace messages are lost when tracing on the spawn BIFs.

+

This flag can be removed or changed at any time without prior + notice.

+
+
+ + +

Verbose.

+
+ + +

Makes the emulator print its version number.

+
+ + +

Sets the mapping of warning messages for + . Messages sent to the error logger + using one of the warning routines can be mapped to errors + (), warnings (), or + information reports (). Defaults to warnings. + The current mapping can be retrieved using + . For more information, + see + error_logger:warning_map/0 in Kernel.

+
+ + +

Miscellaneous flags:

+ + +zdbbl size + +

Sets the distribution buffer busy limit + ( + dist_buf_busy_limit) + in kilobytes. Valid range is 1-2097151. Defaults to 1024.

+

A larger buffer limit allows processes to buffer + more outgoing messages over the distribution. When the + buffer limit has been reached, sending processes will be + suspended until the buffer size has shrunk. The buffer + limit is per distribution channel. A higher limit + gives lower latency and higher throughput at the expense + of higher memory use.

+
+ +zdntgc time + +

Sets the delayed node table garbage collection time + ( + delayed_node_table_gc) + in seconds. Valid values are either infinity or + an integer in the range 0-100000000. Defaults to 60.

+

Node table entries that are not referred linger + in the table for at least the amount of time that this + parameter determines. The lingering prevents repeated + deletions and insertions in the tables from occurring.

+
+
+
+
+
+ +
+ + Environment Variables + + + +

If the emulator needs to write a crash dump, the value of this + variable is the filename of the crash dump file. + If the variable is not set, the name of the crash dump file is + in the current directory.

+
+ + +

Unix systems: If the emulator needs to write a crash dump, + it uses the value of this variable to set the nice value + for the process, thus lowering its priority. Valid range is + 1-39 (higher values are replaced with 39). The highest + value, 39, gives the process the lowest priority.

+
+ + +

Unix systems: This variable gives the number of seconds + that the emulator is allowed to spend writing a crash dump. When the + given number of seconds have elapsed, the emulator is terminated.

+ + + If the variable is set to 0 seconds, the runtime system does + not even attempt to write the crash dump file. It only terminates. + This is the default if option -heart is passed to erl + and ERL_CRASH_DUMP_SECONDS is not set. + + + If the variable is set to a positive value S, + wait for S seconds to complete the crash dump file and + then terminates the runtime system with a SIGALRM signal. + + + A negative value causes the termination of the runtime system + to wait indefinitely until the crash dump file has been completly + written. This is the default if option -heart is not + passed to erl and ERL_CRASH_DUMP_SECONDS is not set. + + +

See also heart(3).

+
+ + +

This variable sets the maximum size of a crash dump file in bytes. + The crash dump will be truncated if this limit is exceeded. If the + variable is not set, no size limit is enforced by default. If the + variable is set to 0, the runtime system does not even attempt + to write a crash dump file.

+

Introduced in ERTS 8.1.2 (Erlang/OTP 19.2).

+
+ + +

The content of this variable is added to the beginning of the + command line for .

+

Flag is treated in a special way. Its + scope ends at the end of the environment variable content. Arguments + following an flag are moved on the command + line into section , that is, the end of the + command line following an flag.

+
+ and + + +

The content of these variables are added to the end of the command + line for .

+

Flag is treated in a special way. Its + scope ends at the end of the environment variable content. Arguments + following an flag are moved on the command + line into section , that is, the end of the + command line following an flag.

+
+ + +

Contains a list of additional library directories that the code + server searches for applications and adds to the code path; see + code(3).

+
+ + +

Can be set to a comma-separated list of IP addresses, in which case + the epmd daemon listens only + on the specified address(es) and on the loopback address (which is + implicitly added to the list if it has not been specified).

+
+ + +

Can contain the port number to use when communicating with + epmd. The default port works + fine in most cases. A different port can be specified + to allow nodes of independent clusters to co-exist on the same host. + All nodes in a cluster must use the same epmd port number.

+
+
+
+ +
+ + Signals +

On Unix systems, the Erlang runtime will interpret two types of signals.

+ + SIGUSR1 + +

A SIGUSR1 signal forces a crash dump.

+
+ SIGTERM + +

A SIGTERM will produce a stop message to the init process. + This is equivalent to a init:stop/0 call.

+

Introduced in ERTS 8.3 (Erlang/OTP 19.3)

+
+
+

The signal SIGUSR2 is reserved for internal usage. No other signals are handled.

+
+ +
+ + Configuration +

The standard Erlang/OTP system can be reconfigured to change the default + behavior on startup.

+ + The .erlang startup file + +

When Erlang/OTP is started, the system searches for a file named + .erlang in the user's home directory.

+

If an .erlang file is found, it is assumed to contain valid + Erlang expressions. These expressions are evaluated as if they were + input to the shell.

+

A typical .erlang file contains a set of search paths, for + example:

+ +
+ user_default and shell_default + +

Functions in the shell that are not prefixed by a module name are + assumed to be functional objects (funs), built-in functions (BIFs), + or belong to the module user_default or + shell_default.

+

To include private shell commands, define them in a module + user_default and add the following argument as the first line + in the .erlang file:

+ +
+ erl + +

If the contents of .erlang are changed and a private version + of user_default is defined, the Erlang/OTP environment can be + customized. More powerful changes can be made by supplying + command-line arguments in the startup script erl. For more + information, see init(3).

+
+
+
+ +
+ See Also +

epmd(1), + erl_prim_loader(3), + erts_alloc(3), + init(3), + + application(3), + auth(3), + code(3), + + erl_boot_server(3), + heart(3), + net_kernel(3), + make(3)

+
+
diff --git a/erts/doc/src/erlc.xml b/erts/doc/src/erlc.xml deleted file mode 100644 index f1f2c786da..0000000000 --- a/erts/doc/src/erlc.xml +++ /dev/null @@ -1,390 +0,0 @@ - - - - -
- - 19972018 - Ericsson AB. 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. - - - - erlc - Björn Gustavsson - Bjarne Däcker - 1 - Bjarne Däcker - - 1997-03-24 - A - erlc.xml -
- erlc - Compiler - -

The program provides a common way to run - all compilers in the Erlang system. - Depending on the extension of each input file, - invokes the appropriate compiler. - Regardless of which compiler is used, the same flags are used to provide - parameters, such as include paths and output directory.

-

The current working directory, ".", is not included - in the code path when running the compiler. This is to avoid loading - Beam files from the current working directory that could potentially - be in conflict with the compiler or the Erlang/OTP system used by the - compiler.

-
- - - - erlc flags file1.ext file2.ext... - Compile files. - -

Compiles one or more files. The files must include the extension, - for example, for Erlang source code, or - for Yecc source code. - uses the extension to invoke the correct - compiler.

-
-
-
- -
- Generally Useful Flags -

The following flags are supported:

- - -I <Directory> - -

Instructs the compiler to search for include files in - the Directory. When encountering an - or - directive, the compiler searches for header files in the following - directories:

- - -

, the current working directory of the - file server

-
- -

The base name of the compiled file

-
- -

The directories specified using option ; - the directory specified last is searched first

-
-
-
- -o <Directory> - -

The directory where the compiler is to place the output files. - Defaults to the current working directory.

-
- -D<Name> - -

Defines a macro.

-
- -D<Name>=<Value> - -

Defines a macro with the specified value. - The value can be any Erlang term. - Depending on the platform, the value may need to be - quoted if the shell itself interprets certain characters. - On Unix, terms containing tuples and lists - must be quoted. Terms containing spaces - must be quoted on all platforms.

-
- -W<Error> - -

Makes all warnings into errors.

-
- -W<Number> - -

Sets warning level to Number. Defaults to - . To turn off warnings, - use .

-
- -W - -

Same as . Default.

-
- -v - -

Enables verbose output.

-
- -b <Output_type> - -

Specifies the type of output file. - Output_type is the same as the file extension - of the output file, but without the period. - This option is ignored by compilers that have - a single output format.

-
- -smp - -

Compiles using the SMP emulator. This is mainly useful - for compiling native code, which must be compiled with the same - runtime system that it is to be run on.

-
- -no-server - -

Do not use the - compile server.

-
- -server - -

Use the - compile server.

-
- -M - -

Produces a Makefile rule to track header dependencies. The - rule is sent to stdout. No object file is produced.

-
- - -MMD - -

Generate dependencies as a side-effect. The object file - will be produced as normal. This option overrides the - option .

-
- - -MF <Makefile> - -

As option , except that the - Makefile is written to Makefile. No object - file is produced.

-
- -MD - -

Same as .Pbeam]]>.

-
- -MT <Target> - -

In conjunction with option or - , changes the name of the rule emitted - to Target.

-
- -MQ <Target> - -

As option , except that characters special to - make/1 are quoted.

-
- -MP - -

In conjunction with option or - , adds a phony target for each dependency.

-
- -MG - -

In conjunction with option or - , considers missing headers as generated - files and adds them to the dependencies.

-
- -- - -

Signals that no more options will follow. - The rest of the arguments is treated as filenames, - even if they start with hyphens.

-
- +<Term> - -

A flag starting with a plus (+) rather than a hyphen - is converted to an Erlang term and passed unchanged to - the compiler. - For example, option for the Erlang - compiler can be specified as follows:

-
-erlc +export_all file.erl
-

Depending on the platform, the value may need to be - quoted if the shell itself interprets certain characters. - On Unix, terms containing tuples and lists - must be quoted. Terms containing spaces - must be quoted on all platforms.

-
-
-
- -
- Special Flags -

The following flags are useful in special situations, - such as rebuilding the OTP system:

- - -pa <Directory> - -

Appends Directory to the front of the code path in - the invoked Erlang emulator. - This can be used to invoke another - compiler than the default one.

-
- -pz <Directory> - -

Appends Directory to the code path in - the invoked Erlang emulator.

-
-
-
- -
- Supported Compilers -

The following compilers are supported:

- - .erl - -

Erlang source code. It generates a file.

-

Options -P, -E, and -S are equivalent to - +'P', +'E', and +'S', except that it is not - necessary to include the single quotes to protect them from the - shell.

-

Supported options: -I, -o, -D, -v, - -W, -b.

-
- .S - -

Erlang assembler source code. It generates a - file.

-

Supported options: same as for .erl.

-
- .core - -

Erlang core source code. It generates a - file.

-

Supported options: same as for .erl.

-
- .yrl - -

Yecc source code. It generates an file.

-

Use option -I with the name of a file to use that file - as a customized prologue file (option - ).

-

Supported options: -o, -v, -I, -W.

-
- .mib - -

MIB for SNMP. It generates a file.

-

Supported options: -I, -o, -W.

-
- .bin - -

A compiled MIB for SNMP. It generates a - file.

-

Supported options: -o, -v.

-
- .rel - -

Script file. It generates a boot file.

-

Use option -I to name directories to be searched for - application files (equivalent to the in the - option list for ).

-

Supported option: -o.

-
- .asn1 - -

ASN1 file. It creates an , - , and file from - an file. Also compiles the - using the Erlang compiler unless option - is specified.

-

Supported options: -I, -o, -b, -W.

-
- .idl - -

IC file. It runs the IDL compiler.

-

Supported options: -I, -o.

-
-
-
- -
- - Compile Server -

The compile server can be used to potentially speed up the - build of multi-file projects by avoiding to start an Erlang system - for each file to compile. Whether it will speed up the build - depends on the nature of the project and the build machine.

- -

By default, the compile server is not used. It can be - enabled by giving erlc the option -server or by - setting the environment variable ERLC_USE_SERVER to - yes or true.

- -

When the compile server is enabled, erlc will - automatically use the server if it is started and start the server - if has not already started. The server will terminate itself when - it has been idle for some number of seconds.

- -

erlc and the compile server communicate using the - Erlang distribution. The compile server is started as a hidden - node, with a name that includes the current user. Thus, each user - on a computer has their own compile server.

- -

Using the compile server does not always speed up the build, as - the compile server sometimes must be restarted to ensure correctness. - Here are some examples of situtations that force a restart:

- - - erlc wants to use a different version of Erlang - than the compile server is using. - erlc wants to use different options for erl - than the compile server was started with. (A change to code path - using the option -pa could cause different parse - transforms to be loaded. To be safe, the compile server will be - restarted when any erl option is changed.) - If the current working directory for erlc is - different from the working directory active when the compile - server was started, and if the compile server - has active jobs, it will be restarted as soon as those jobs have - finished. (Build systems that build files randomly across multiple - directories in parallel will probably not benefit from the - compile server.) - -
- -
- - Environment Variables - - ERLC_EMULATOR - The command for starting the emulator. Defaults to erl - in the same directory as the erlc program itself, - or, if it does not exist, erl in any of the directories - specified in environment variable PATH. - ERLC_USE_SERVER - Allowed values are yes or true to use the - compile - server, and no or false to not use the - compile server. If other values are given, erlc will - print a warning message and continue. - - ERLC_SERVER_ID - Tells erlc to identify the - compile server by the given - name, allowing a single user to run multiple unrelated builds in - parallel without them affecting each other, which can be useful for - shared build machines and the like. The name must be alpha­numeric, - and it defaults to being empty. - - -
- -
- See Also -

erl(1), - compile(3), - yecc(3), - snmp(3)

-
-
- diff --git a/erts/doc/src/erlc_cmd.xml b/erts/doc/src/erlc_cmd.xml new file mode 100644 index 0000000000..55a4712b25 --- /dev/null +++ b/erts/doc/src/erlc_cmd.xml @@ -0,0 +1,389 @@ + + + + +
+ + 19972018 + Ericsson AB. 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. + + + + erlc + Björn Gustavsson + Bjarne Däcker + 1 + Bjarne Däcker + + 1997-03-24 + A + erlc.xml +
+ erlc + Compiler + +

The program provides a common way to run + all compilers in the Erlang system. + Depending on the extension of each input file, + invokes the appropriate compiler. + Regardless of which compiler is used, the same flags are used to provide + parameters, such as include paths and output directory.

+

The current working directory, ".", is not included + in the code path when running the compiler. This is to avoid loading + Beam files from the current working directory that could potentially + be in conflict with the compiler or the Erlang/OTP system used by the + compiler.

+
+ + + + erlc flags file1.ext file2.ext... + Compile files. + +

Compiles one or more files. The files must include the extension, + for example, for Erlang source code, or + for Yecc source code. + uses the extension to invoke the correct + compiler.

+
+
+
+ +
+ Generally Useful Flags +

The following flags are supported:

+ + -I <Directory> + +

Instructs the compiler to search for include files in + the Directory. When encountering an + or + directive, the compiler searches for header files in the following + directories:

+ + +

, the current working directory of the + file server

+
+ +

The base name of the compiled file

+
+ +

The directories specified using option ; + the directory specified last is searched first

+
+
+
+ -o <Directory> + +

The directory where the compiler is to place the output files. + Defaults to the current working directory.

+
+ -D<Name> + +

Defines a macro.

+
+ -D<Name>=<Value> + +

Defines a macro with the specified value. + The value can be any Erlang term. + Depending on the platform, the value may need to be + quoted if the shell itself interprets certain characters. + On Unix, terms containing tuples and lists + must be quoted. Terms containing spaces + must be quoted on all platforms.

+
+ -W<Error> + +

Makes all warnings into errors.

+
+ -W<Number> + +

Sets warning level to Number. Defaults to + . To turn off warnings, + use .

+
+ -W + +

Same as . Default.

+
+ -v + +

Enables verbose output.

+
+ -b <Output_type> + +

Specifies the type of output file. + Output_type is the same as the file extension + of the output file, but without the period. + This option is ignored by compilers that have + a single output format.

+
+ -smp + +

Compiles using the SMP emulator. This is mainly useful + for compiling native code, which must be compiled with the same + runtime system that it is to be run on.

+
+ -no-server + +

Do not use the + compile server.

+
+ -server + +

Use the + compile server.

+
+ -M + +

Produces a Makefile rule to track header dependencies. The + rule is sent to stdout. No object file is produced.

+
+ + -MMD + +

Generate dependencies as a side-effect. The object file + will be produced as normal. This option overrides the + option .

+
+ + -MF <Makefile> + +

As option , except that the + Makefile is written to Makefile. No object + file is produced.

+
+ -MD + +

Same as .Pbeam]]>.

+
+ -MT <Target> + +

In conjunction with option or + , changes the name of the rule emitted + to Target.

+
+ -MQ <Target> + +

As option , except that characters special to + make/1 are quoted.

+
+ -MP + +

In conjunction with option or + , adds a phony target for each dependency.

+
+ -MG + +

In conjunction with option or + , considers missing headers as generated + files and adds them to the dependencies.

+
+ -- + +

Signals that no more options will follow. + The rest of the arguments is treated as filenames, + even if they start with hyphens.

+
+ +<Term> + +

A flag starting with a plus (+) rather than a hyphen + is converted to an Erlang term and passed unchanged to + the compiler. + For example, option for the Erlang + compiler can be specified as follows:

+
+erlc +export_all file.erl
+

Depending on the platform, the value may need to be + quoted if the shell itself interprets certain characters. + On Unix, terms containing tuples and lists + must be quoted. Terms containing spaces + must be quoted on all platforms.

+
+
+
+ +
+ Special Flags +

The following flags are useful in special situations, + such as rebuilding the OTP system:

+ + -pa <Directory> + +

Appends Directory to the front of the code path in + the invoked Erlang emulator. + This can be used to invoke another + compiler than the default one.

+
+ -pz <Directory> + +

Appends Directory to the code path in + the invoked Erlang emulator.

+
+
+
+ +
+ Supported Compilers +

The following compilers are supported:

+ + .erl + +

Erlang source code. It generates a file.

+

Options -P, -E, and -S are equivalent to + +'P', +'E', and +'S', except that it is not + necessary to include the single quotes to protect them from the + shell.

+

Supported options: -I, -o, -D, -v, + -W, -b.

+
+ .S + +

Erlang assembler source code. It generates a + file.

+

Supported options: same as for .erl.

+
+ .core + +

Erlang core source code. It generates a + file.

+

Supported options: same as for .erl.

+
+ .yrl + +

Yecc source code. It generates an file.

+

Use option -I with the name of a file to use that file + as a customized prologue file (option + ).

+

Supported options: -o, -v, -I, -W.

+
+ .mib + +

MIB for SNMP. It generates a file.

+

Supported options: -I, -o, -W.

+
+ .bin + +

A compiled MIB for SNMP. It generates a + file.

+

Supported options: -o, -v.

+
+ .rel + +

Script file. It generates a boot file.

+

Use option -I to name directories to be searched for + application files (equivalent to the in the + option list for ).

+

Supported option: -o.

+
+ .asn1 + +

ASN1 file. It creates an , + , and file from + an file. Also compiles the + using the Erlang compiler unless option + is specified.

+

Supported options: -I, -o, -b, -W.

+
+ .idl + +

IC file. It runs the IDL compiler.

+

Supported options: -I, -o.

+
+
+
+ +
+ + Compile Server +

The compile server can be used to potentially speed up the + build of multi-file projects by avoiding to start an Erlang system + for each file to compile. Whether it will speed up the build + depends on the nature of the project and the build machine.

+ +

By default, the compile server is not used. It can be + enabled by giving erlc the option -server or by + setting the environment variable ERLC_USE_SERVER to + yes or true.

+ +

When the compile server is enabled, erlc will + automatically use the server if it is started and start the server + if has not already started. The server will terminate itself when + it has been idle for some number of seconds.

+ +

erlc and the compile server communicate using the + Erlang distribution. The compile server is started as a hidden + node, with a name that includes the current user. Thus, each user + on a computer has their own compile server.

+ +

Using the compile server does not always speed up the build, as + the compile server sometimes must be restarted to ensure correctness. + Here are some examples of situtations that force a restart:

+ + + erlc wants to use a different version of Erlang + than the compile server is using. + erlc wants to use different options for erl + than the compile server was started with. (A change to code path + using the option -pa could cause different parse + transforms to be loaded. To be safe, the compile server will be + restarted when any erl option is changed.) + If the current working directory for erlc is + different from the working directory active when the compile + server was started, and if the compile server + has active jobs, it will be restarted as soon as those jobs have + finished. (Build systems that build files randomly across multiple + directories in parallel will probably not benefit from the + compile server.) + +
+ +
+ + Environment Variables + + ERLC_EMULATOR + The command for starting the emulator. Defaults to erl + in the same directory as the erlc program itself, + or, if it does not exist, erl in any of the directories + specified in environment variable PATH. + ERLC_USE_SERVER + Allowed values are yes or true to use the + compile + server, and no or false to not use the + compile server. If other values are given, erlc will + print a warning message and continue. + + ERLC_SERVER_ID + Tells erlc to identify the + compile server by the given + name, allowing a single user to run multiple unrelated builds in + parallel without them affecting each other, which can be useful for + shared build machines and the like. The name must be alpha­numeric, + and it defaults to being empty. + + +
+ +
+ See Also +

erl(1), + compile(3), + yecc(3), + snmp(3)

+
+
diff --git a/erts/doc/src/erlsrv.xml b/erts/doc/src/erlsrv.xml deleted file mode 100644 index 6c08b25220..0000000000 --- a/erts/doc/src/erlsrv.xml +++ /dev/null @@ -1,533 +0,0 @@ - - - - -
- - 19982016 - Ericsson AB. 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. - - - - erlsrv - Patrik Nyblom - - - - - 1998-04-29 - - erlsrv.xml -
- erlsrv - Run the Erlang emulator as a service on Windows - -

This utility is specific to Windows NT/2000/XP (and later - versions of Windows). It allows Erlang - emulators to run as services on the Windows system, allowing embedded - systems to start without any user needing to log on. The - emulator started in this way can be manipulated through the - Windows services applet in a manner similar to other services.

- -

Notice that erlsrv is not a general service utility for Windows, - but designed for embedded Erlang systems.

- -

erlsrv also provides a command-line interface for registering, - changing, starting, and stopping services.

- -

To manipulate services, the logged on user is to have - administrator privileges on the machine. The Erlang machine - itself is (default) run as the local administrator. This can be - changed with the Services applet in Windows.

- -

The processes created by the service can, as opposed to normal - services, be "killed" with the task manager. Killing an emulator - that is started by a service triggers the "OnFail" action - specified for that service, which can be a reboot.

- -

The following parameters can be specified for each Erlang service:

- - - - -

Tells how to stop - the Erlang emulator. Default is to kill it (Win32 - TerminateProcess), but this action can specify any Erlang - shell command that will be executed in the emulator to make - it stop. The emulator is expected to stop within 30 seconds - after the command is issued in the shell. If the emulator is - not stopped, it reports a running state to the service - manager.

-
- - -

Can be one of the following:

- - - -

The Windows system is rebooted whenever the emulator stops - (a more simple form of watchdog). This can be useful for - less critical systems, otherwise use the heart functionality - to accomplish this.

-
- - -

Makes the Erlang emulator be - restarted (with whatever parameters are registered for the - service at the occasion) when it stops. If the emulator - stops again within 10 seconds, it is not restarted to avoid - an infinite loop, which could hang the Windows system.

-
- - -

Similar to , but does - not try to detect cyclic restarts; it is expected that - some other mechanism is present to avoid the problem.

-
- (the default) - -

Reports the service as stopped to the service manager - whenever it fails; it must be manually restarted.

-
-
-

On a system where release handling is used, - this is always to be set to . Use - to restart the service on failure - instead.

-
- - -

The location of the Erlang emulator. - The default is the located in the same - directory as erlsrv.exe. Do not specify - as this emulator, it will not work.

-

If the system uses release handling, this is to be set to a - program similar to .

-
- - -

Specifies an extra environment - for the emulator. The environment variables specified - here are added to the system-wide environment block that is - normally present when a service starts up. Variables present - in both the system-wide environment and in the service - environment specification will be set to the value specified - in the service.

-
- - -

The working directory for the Erlang emulator. - Must be on a local drive (no network drives are mounted when a - service starts). Default working directory for services is - . - Debug log files will be placed in this directory.

-
- - -

The process priority of the emulator. Can be one of the - following:

- - - -

Not recommended, as the machine will possibly be - inaccessible to interactive users.

-
- - -

Can be used if two Erlang nodes are to reside on one dedicated - system and one is to have precedence over the other.

-
- - -

Can be used if interactive performance is not to be affected - by the emulator process.

-
- (the default> - - -
-
- - -

Specifies the short or long - node name of the Erlang emulator. The Erlang services are - always distributed. Default is to use the service name as - (short) nodename.

-
- - -

Specifies that output from the Erlang shell is to be - sent to a "debug log". The log file is named - <servicename> or - <servicename><N>, - where <N> is an integer from 1 through 99. - The log file is placed in the working directory of the - service (as specified in WorkDir).

-

Can be one of the following:

- - - -

Uses a separate log file for every invocation of the service - (<servicename><N>).

-
- - -

Reuses the same log file - (<servicename>).

-
- - -

Opens an interactive Windows console window for the Erlang - shell of the service. Automatically disables the - . A service started with an - interactive console window does not survive logouts. - actions do not work with - debug consoles either.

-
- (the default) - -

The output of the Erlang shell is discarded.

-
-
- -

The option is not intended - for production. It is only a convenient way to debug - Erlang services during development.

-

The and options - might seem convenient in a production system, but consider that - the logs grow indefinitely during the system lifetime and cannot - be truncated, except if the service is restarted.

-

In short, the is - intended for debugging only. Logs during production are - better produced with the standard Erlang logging facilities.

-
-
- - -

Passes extra arguments to the emulator startup program - (or ). - Arguments that cannot be specified here are - (StopActions would not work), - , and (they are - specified in any way). The most common use is for specifying cookies - and flags to be passed to init:boot() - ().

-
- - -

Specifies the Windows-internal service name (not the display name, - which is the one erlsrv uses to identify the service).

-

This internal name cannot be changed, it is fixed even if the - service is renamed. erlsrv generates a unique internal name - when a service is created. It is recommended to keep to the default - if release handling is to be used for the application.

-

The internal service name can be seen in the Windows service - manager if viewing Properties for an Erlang service.

-
- - -

A textual comment describing the service. Not mandatory, but shows - up as the service description in the Windows service manager.

-
-
- -

- The naming of the service in a system that - uses release handling must follow the convention - NodeName_Release, where NodeName is - the first part of the Erlang node name (up to, but not including - the "@") and Release is the current release of the - application.

-
- - - - erlsrv {set | add} <service-name> [<service options>] - Add or modify an Erlang service. - -

The set and add commands modifies or adds an Erlang - service, respectively. The simplest form of an add command is - without any options in which case all default values - (described above) apply. The service name is mandatory.

-

Every option can be specified without parameters, the - default value is then applied. Values to the options are - supplied only when the default is not to be used. - For example, - sets the default priority and removes all arguments.

-

Service options:

- - -st[opaction] [<erlang shell command>] - -

Defines the , the command given - to the Erlang shell when the service is stopped. - Default is none.

-
- -on[fail] [{reboot | restart | restart_always}] - -

The action to take when the Erlang emulator - stops unexpectedly. Default is to ignore.

-
- -m[achine] [<erl-command>] - -

The complete path to the Erlang emulator. Never use the - werl program for this. Defaults to the - in the same directory as - . When release handling - is used, this is to be set to a program similar to - .

-
- -e[nv] [<variable>[=<value>]] ... - -

Edits the environment block for the service. Every - environment variable specified is added to the system - environment block. If a variable specified here has the same - name as a system-wide environment variable, the specified - value overrides the system-wide. Environment variables are - added to this list by specifying - <variable>=<value> and deleted from the list by - specifying <variable> alone. The environment block is - automatically sorted. Any number of - options can be specified in one command. Default is to use the - system environment block unmodified (except for two additions, - see section Environment - below).

-
- -w[orkdir] [<directory>] - -

The initial working directory of the Erlang - emulator. Defaults to the system directory.

-
- -p[riority] [{low|high|realtime}] - -

The priority of the Erlang emulator. Default to the - Windows default priority.

-
- {-sn[ame] | -n[ame]} [<node-name>] - -

The node name of the Erlang machine. Distribution is mandatory. - Defaults to ]]>.

-
- -d[ebugtype] [{new|reuse|console}] - -

Specifies where shell output is to be sent. - Default is that shell output is discarded. - To be used only for debugging.

-
- -ar[gs] [<limited erl arguments>] - -

Extra arguments to the Erlang emulator. Avoid - , , and - /. Default is - no extra arguments. Remember that the services cookie file is not - necessarily the same as the interactive users. The service - runs as the local administrator. Specify all arguments - together in one string, use double quotes (") to specify an - argument string containing spaces, and use quoted quotes (\") - to specify a quote within the argument string if necessary.

-
- -i[nternalservicename] [<internal name>] - -

Only allowed for add. Specifies a - Windows-internal service name for the service, which by - default is set to something unique (prefixed with the - original service name) by erlsrv when adding a new - service. Specifying this is a purely cosmethic action and is - not recommended if release handling is to be - performed. The internal service name cannot be changed once - the service is created. The internal name is not to - be confused with the ordinary service name, which is the name - used to identify a service to erlsrv.

-
- -c[omment] [<short description>] - -

Specifies a textual comment describing the - service. This comment shows up as the service description - in the Windows service manager.

-
-
-
-
- - - erlsrv {start | start_disabled | stop | disable | - enable} <service-name> - Manipulate the current service status. - -

These commands are only added for convenience, the normal - way to manipulate the state of a service is through the - control panels services applet.

-

The and - commands communicates - with the service manager for starting and stopping a - service. The commands wait until the service is - started or stopped. When disabling a service, it is not - stopped, the disabled state does not take effect until the - service is stopped. Enabling a service sets it in - automatic mode, which is started at boot. This command cannot - set the service to manual.

-

The start_disabled command operates on a service - regardless of if it is enabled/disabled or started/stopped. It - does this by first enabling it (regardless of if it is enabled - or not), then starting it (if not already started), and - then disabling it. The result is a disabled but started - service, regardless of its earlier state. This is useful for - starting services temporarily during a release upgrade. The - difference between using start_disabled and the - sequence enable, start, and disable is - that all other erlsrv commands are locked out during - the sequence of operations in start_disable, making the - operation atomic from an erlsrv user's point of view.

-
-
- - - erlsrv remove <service-name> - Remove the service. - -

Removes the service completely with all its registered - options. It is stopped before it is removed.

-
-
- - - erlsrv list [<service-name>] - List all Erlang services or all options for one service. - - -

If no service name is specified, a brief listing of all Erlang - services is presented. If a service name is supplied, all options - for that service are presented.

-
-
- - - erlsrv help - Display a brief help text. - -

Displays a brief help text.

-
-
-
- -
- Environment -

- The environment of an Erlang machine started - as a service contains two special variables:

- - - - The name of the service that started the machine. - - The full path to the , which can be - used to manipulate the service. This comes in handy when defining a - heart command for your service. - - -

A command file for restarting a service looks as follows:

- - - -

This command file is then set as heart command.

- -

The environment variables can also be used to detect that we - are running as a service and make port programs react correctly - to the control events generated on logout (see the next section).

-
- -
- Port Programs -

When a program runs in - the service context, it must handle the control events that are - sent to every program in the system when the interactive user - logs off. This is done in different ways for programs running in - the console subsystem and programs running as window - applications. An application running in the console subsystem - (normal for port programs) uses the win32 function - to register a control handler - that returns true in answer to the - - and events. Other applications - only forward and - to the default window procedure.

- -

A brief example in C of how to set the console control handler:

- - -/* -** 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; - if(ctrl == CTRL_SHUTDOWN_EVENT) - return TRUE; - return FALSE; -} - -void initialize_handler(void){ - char buffer[2]; - /* - * We assume we are running as a service if this - * environment variable is defined. - */ - if(GetEnvironmentVariable("ERLSRV_SERVICE_NAME",buffer, - (DWORD) 2)){ - /* - ** Actually set the control handler - */ - SetConsoleCtrlHandler(&service_aware_handler, TRUE); - } -} ]]> -
- -
- Notes -

Although the options are described in a Unix-like format, the case of - the options or commands is not relevant, and both character "/" and "-" - can be used for options.

- -

Notice that the program resides in the emulator's - directory, not in the directory directly under - the Erlang root. The reasons for this are the subtle problem of - upgrading the emulator on a running system, where a new version of - the runtime system should not need to overwrite existing (and probably - used) executables.

- -

To manipulate the Erlang services easily, put - the \erts-\bin]]> directory in - the path instead of \bin]]>. The - erlsrv program can be found from inside Erlang by using the - Erlang function.

- -

For release handling to work, use as the - Erlang machine. As stated above, - the service name is significant.

-
- -
- See Also -

start_erl(1), - - release_handler(3)

-
-
- diff --git a/erts/doc/src/erlsrv_cmd.xml b/erts/doc/src/erlsrv_cmd.xml new file mode 100644 index 0000000000..1db5fcd9db --- /dev/null +++ b/erts/doc/src/erlsrv_cmd.xml @@ -0,0 +1,532 @@ + + + + +
+ + 19982016 + Ericsson AB. 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. + + + + erlsrv + Patrik Nyblom + + + + + 1998-04-29 + + erlsrv.xml +
+ erlsrv + Run the Erlang emulator as a service on Windows + +

This utility is specific to Windows NT/2000/XP (and later + versions of Windows). It allows Erlang + emulators to run as services on the Windows system, allowing embedded + systems to start without any user needing to log on. The + emulator started in this way can be manipulated through the + Windows services applet in a manner similar to other services.

+ +

Notice that erlsrv is not a general service utility for Windows, + but designed for embedded Erlang systems.

+ +

erlsrv also provides a command-line interface for registering, + changing, starting, and stopping services.

+ +

To manipulate services, the logged on user is to have + administrator privileges on the machine. The Erlang machine + itself is (default) run as the local administrator. This can be + changed with the Services applet in Windows.

+ +

The processes created by the service can, as opposed to normal + services, be "killed" with the task manager. Killing an emulator + that is started by a service triggers the "OnFail" action + specified for that service, which can be a reboot.

+ +

The following parameters can be specified for each Erlang service:

+ + + + +

Tells how to stop + the Erlang emulator. Default is to kill it (Win32 + TerminateProcess), but this action can specify any Erlang + shell command that will be executed in the emulator to make + it stop. The emulator is expected to stop within 30 seconds + after the command is issued in the shell. If the emulator is + not stopped, it reports a running state to the service + manager.

+
+ + +

Can be one of the following:

+ + + +

The Windows system is rebooted whenever the emulator stops + (a more simple form of watchdog). This can be useful for + less critical systems, otherwise use the heart functionality + to accomplish this.

+
+ + +

Makes the Erlang emulator be + restarted (with whatever parameters are registered for the + service at the occasion) when it stops. If the emulator + stops again within 10 seconds, it is not restarted to avoid + an infinite loop, which could hang the Windows system.

+
+ + +

Similar to , but does + not try to detect cyclic restarts; it is expected that + some other mechanism is present to avoid the problem.

+
+ (the default) + +

Reports the service as stopped to the service manager + whenever it fails; it must be manually restarted.

+
+
+

On a system where release handling is used, + this is always to be set to . Use + to restart the service on failure + instead.

+
+ + +

The location of the Erlang emulator. + The default is the located in the same + directory as erlsrv.exe. Do not specify + as this emulator, it will not work.

+

If the system uses release handling, this is to be set to a + program similar to .

+
+ + +

Specifies an extra environment + for the emulator. The environment variables specified + here are added to the system-wide environment block that is + normally present when a service starts up. Variables present + in both the system-wide environment and in the service + environment specification will be set to the value specified + in the service.

+
+ + +

The working directory for the Erlang emulator. + Must be on a local drive (no network drives are mounted when a + service starts). Default working directory for services is + . + Debug log files will be placed in this directory.

+
+ + +

The process priority of the emulator. Can be one of the + following:

+ + + +

Not recommended, as the machine will possibly be + inaccessible to interactive users.

+
+ + +

Can be used if two Erlang nodes are to reside on one dedicated + system and one is to have precedence over the other.

+
+ + +

Can be used if interactive performance is not to be affected + by the emulator process.

+
+ (the default> + + +
+
+ + +

Specifies the short or long + node name of the Erlang emulator. The Erlang services are + always distributed. Default is to use the service name as + (short) nodename.

+
+ + +

Specifies that output from the Erlang shell is to be + sent to a "debug log". The log file is named + <servicename> or + <servicename><N>, + where <N> is an integer from 1 through 99. + The log file is placed in the working directory of the + service (as specified in WorkDir).

+

Can be one of the following:

+ + + +

Uses a separate log file for every invocation of the service + (<servicename><N>).

+
+ + +

Reuses the same log file + (<servicename>).

+
+ + +

Opens an interactive Windows console window for the Erlang + shell of the service. Automatically disables the + . A service started with an + interactive console window does not survive logouts. + actions do not work with + debug consoles either.

+
+ (the default) + +

The output of the Erlang shell is discarded.

+
+
+ +

The option is not intended + for production. It is only a convenient way to debug + Erlang services during development.

+

The and options + might seem convenient in a production system, but consider that + the logs grow indefinitely during the system lifetime and cannot + be truncated, except if the service is restarted.

+

In short, the is + intended for debugging only. Logs during production are + better produced with the standard Erlang logging facilities.

+
+
+ + +

Passes extra arguments to the emulator startup program + (or ). + Arguments that cannot be specified here are + (StopActions would not work), + , and (they are + specified in any way). The most common use is for specifying cookies + and flags to be passed to init:boot() + ().

+
+ + +

Specifies the Windows-internal service name (not the display name, + which is the one erlsrv uses to identify the service).

+

This internal name cannot be changed, it is fixed even if the + service is renamed. erlsrv generates a unique internal name + when a service is created. It is recommended to keep to the default + if release handling is to be used for the application.

+

The internal service name can be seen in the Windows service + manager if viewing Properties for an Erlang service.

+
+ + +

A textual comment describing the service. Not mandatory, but shows + up as the service description in the Windows service manager.

+
+
+ +

+ The naming of the service in a system that + uses release handling must follow the convention + NodeName_Release, where NodeName is + the first part of the Erlang node name (up to, but not including + the "@") and Release is the current release of the + application.

+
+ + + + erlsrv {set | add} <service-name> [<service options>] + Add or modify an Erlang service. + +

The set and add commands modifies or adds an Erlang + service, respectively. The simplest form of an add command is + without any options in which case all default values + (described above) apply. The service name is mandatory.

+

Every option can be specified without parameters, the + default value is then applied. Values to the options are + supplied only when the default is not to be used. + For example, + sets the default priority and removes all arguments.

+

Service options:

+ + -st[opaction] [<erlang shell command>] + +

Defines the , the command given + to the Erlang shell when the service is stopped. + Default is none.

+
+ -on[fail] [{reboot | restart | restart_always}] + +

The action to take when the Erlang emulator + stops unexpectedly. Default is to ignore.

+
+ -m[achine] [<erl-command>] + +

The complete path to the Erlang emulator. Never use the + werl program for this. Defaults to the + in the same directory as + . When release handling + is used, this is to be set to a program similar to + .

+
+ -e[nv] [<variable>[=<value>]] ... + +

Edits the environment block for the service. Every + environment variable specified is added to the system + environment block. If a variable specified here has the same + name as a system-wide environment variable, the specified + value overrides the system-wide. Environment variables are + added to this list by specifying + <variable>=<value> and deleted from the list by + specifying <variable> alone. The environment block is + automatically sorted. Any number of + options can be specified in one command. Default is to use the + system environment block unmodified (except for two additions, + see section Environment + below).

+
+ -w[orkdir] [<directory>] + +

The initial working directory of the Erlang + emulator. Defaults to the system directory.

+
+ -p[riority] [{low|high|realtime}] + +

The priority of the Erlang emulator. Default to the + Windows default priority.

+
+ {-sn[ame] | -n[ame]} [<node-name>] + +

The node name of the Erlang machine. Distribution is mandatory. + Defaults to ]]>.

+
+ -d[ebugtype] [{new|reuse|console}] + +

Specifies where shell output is to be sent. + Default is that shell output is discarded. + To be used only for debugging.

+
+ -ar[gs] [<limited erl arguments>] + +

Extra arguments to the Erlang emulator. Avoid + , , and + /. Default is + no extra arguments. Remember that the services cookie file is not + necessarily the same as the interactive users. The service + runs as the local administrator. Specify all arguments + together in one string, use double quotes (") to specify an + argument string containing spaces, and use quoted quotes (\") + to specify a quote within the argument string if necessary.

+
+ -i[nternalservicename] [<internal name>] + +

Only allowed for add. Specifies a + Windows-internal service name for the service, which by + default is set to something unique (prefixed with the + original service name) by erlsrv when adding a new + service. Specifying this is a purely cosmethic action and is + not recommended if release handling is to be + performed. The internal service name cannot be changed once + the service is created. The internal name is not to + be confused with the ordinary service name, which is the name + used to identify a service to erlsrv.

+
+ -c[omment] [<short description>] + +

Specifies a textual comment describing the + service. This comment shows up as the service description + in the Windows service manager.

+
+
+
+
+ + + erlsrv {start | start_disabled | stop | disable | + enable} <service-name> + Manipulate the current service status. + +

These commands are only added for convenience, the normal + way to manipulate the state of a service is through the + control panels services applet.

+

The and + commands communicates + with the service manager for starting and stopping a + service. The commands wait until the service is + started or stopped. When disabling a service, it is not + stopped, the disabled state does not take effect until the + service is stopped. Enabling a service sets it in + automatic mode, which is started at boot. This command cannot + set the service to manual.

+

The start_disabled command operates on a service + regardless of if it is enabled/disabled or started/stopped. It + does this by first enabling it (regardless of if it is enabled + or not), then starting it (if not already started), and + then disabling it. The result is a disabled but started + service, regardless of its earlier state. This is useful for + starting services temporarily during a release upgrade. The + difference between using start_disabled and the + sequence enable, start, and disable is + that all other erlsrv commands are locked out during + the sequence of operations in start_disable, making the + operation atomic from an erlsrv user's point of view.

+
+
+ + + erlsrv remove <service-name> + Remove the service. + +

Removes the service completely with all its registered + options. It is stopped before it is removed.

+
+
+ + + erlsrv list [<service-name>] + List all Erlang services or all options for one service. + + +

If no service name is specified, a brief listing of all Erlang + services is presented. If a service name is supplied, all options + for that service are presented.

+
+
+ + + erlsrv help + Display a brief help text. + +

Displays a brief help text.

+
+
+
+ +
+ Environment +

+ The environment of an Erlang machine started + as a service contains two special variables:

+ + + + The name of the service that started the machine. + + The full path to the , which can be + used to manipulate the service. This comes in handy when defining a + heart command for your service. + + +

A command file for restarting a service looks as follows:

+ + + +

This command file is then set as heart command.

+ +

The environment variables can also be used to detect that we + are running as a service and make port programs react correctly + to the control events generated on logout (see the next section).

+
+ +
+ Port Programs +

When a program runs in + the service context, it must handle the control events that are + sent to every program in the system when the interactive user + logs off. This is done in different ways for programs running in + the console subsystem and programs running as window + applications. An application running in the console subsystem + (normal for port programs) uses the win32 function + to register a control handler + that returns true in answer to the + + and events. Other applications + only forward and + to the default window procedure.

+ +

A brief example in C of how to set the console control handler:

+ + +/* +** 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; + if(ctrl == CTRL_SHUTDOWN_EVENT) + return TRUE; + return FALSE; +} + +void initialize_handler(void){ + char buffer[2]; + /* + * We assume we are running as a service if this + * environment variable is defined. + */ + if(GetEnvironmentVariable("ERLSRV_SERVICE_NAME",buffer, + (DWORD) 2)){ + /* + ** Actually set the control handler + */ + SetConsoleCtrlHandler(&service_aware_handler, TRUE); + } +} ]]> +
+ +
+ Notes +

Although the options are described in a Unix-like format, the case of + the options or commands is not relevant, and both character "/" and "-" + can be used for options.

+ +

Notice that the program resides in the emulator's + directory, not in the directory directly under + the Erlang root. The reasons for this are the subtle problem of + upgrading the emulator on a running system, where a new version of + the runtime system should not need to overwrite existing (and probably + used) executables.

+ +

To manipulate the Erlang services easily, put + the \erts-\bin]]> directory in + the path instead of \bin]]>. The + erlsrv program can be found from inside Erlang by using the + Erlang function.

+ +

For release handling to work, use as the + Erlang machine. As stated above, + the service name is significant.

+
+ +
+ See Also +

start_erl(1), + + release_handler(3)

+
+
diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml deleted file mode 100644 index be1664b39f..0000000000 --- a/erts/doc/src/escript.xml +++ /dev/null @@ -1,451 +0,0 @@ - - - - -
- - 20072018 - Ericsson AB. 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. - - - - escript - - - - - escript.xml -
- escript - Erlang scripting support - -

escript provides support for running short Erlang programs - without having to compile them first, and an easy way to retrieve the - command-line arguments.

- -

It is possible to bundle escript(s) with an Erlang - runtime system to make it self-sufficient and relocatable. In such - a standalone system, the escript(s) should be located in - the top bin directory of the standalone system and given - .escript as file extension. Further the (built-in) - escript program should be copied to the same directory and - given the scripts original name (without the .escript - extension). This will enable use of the bundled Erlang runtime - system.

- -

The (built-in) escript program first determines which - Erlang runtime system to use and then starts it to execute your - script. Usually the runtime system is located in the same Erlang - installation as the escript program itself. But for - standalone systems with one or more escripts it may be the case - that the escript program in your path actually starts the - runtime system bundled with the escript. This is intentional, and - typically happens when the standalone system bin directory is not - in the execution path (as it may cause its erl program to - override the desired one) and the escript(s) are referred to via - symbolic links from a bin directory in the path.

-
- - - - script-name script-arg1 script-arg2... - escript escript-flags script-name script-arg1 script-arg2... - Run a script written in Erlang. - -

escript runs a script written in Erlang.

-

Example:

-
-$ chmod u+x factorial
-$ cat factorial
-#!/usr/bin/env escript
-%% -*- erlang -*-
-%%! -smp enable -sname factorial -mnesia debug verbose
-main([String]) ->
-    try
-        N = list_to_integer(String),
-        F = fac(N),
-        io:format("factorial ~w = ~w\n", [N,F])
-    catch
-        _:_ ->
-            usage()
-    end;
-main(_) ->
-    usage().
-
-usage() ->
-    io:format("usage: factorial integer\n"),
-    halt(1).
-
-fac(0) -> 1;
-fac(N) -> N * fac(N-1).
-$ ./factorial 5
-factorial 5 = 120
-$ ./factorial
-usage: factorial integer
-$ ./factorial five
-usage: factorial integer
-

The header of the Erlang script in the example differs from - a normal Erlang module. The first line is intended to be the - interpreter line, which invokes escript.

-

However, if you invoke the escript as follows, - the contents of the first line does not matter, but it - cannot contain Erlang code as it will be ignored:

-
-$ escript factorial 5
-

The second line in the example contains an optional - directive to the Emacs editor, which causes it to - enter the major mode for editing Erlang source files. If the - directive is present, it must be located on the second - line.

-

If a comment selecting the encoding exists, it can be - located on the second line.

- -

The encoding specified by the above mentioned comment - applies to the script itself. The encoding of the - I/O-server, however, must be set explicitly as follows:

- -io:setopts([{encoding, unicode}]) -

The default encoding of the I/O-server for standard_io - is latin1, as the script runs in a non-interactive terminal - (see section - - Summary of Options) in the STDLIB User's Guide.

-
-

On the third line (or second line depending on the presence - of the Emacs directive), arguments can be specified to - the emulator, for example:

-
-%%! -smp enable -sname factorial -mnesia debug verbose
-

Such an argument line must start with %%! and the - remaining line is interpreted as arguments to the emulator.

-

If you know the location of the escript executable, the first - line can directly give the path to escript, for example:

-
-#!/usr/local/bin/escript
-

As any other type of scripts, Erlang scripts do not work on - Unix platforms if the execution bit for the script file is not set. - (To turn on the execution bit, use chmod +x script-name.)

-

The remaining Erlang script file can either contain - Erlang source code, an inlined beam file, or an - inlined archive file.

-

An Erlang script file must always contain the main/1 - function. When the script is run, the - main/1 function is called with a list - of strings representing the arguments specified to the script (not - changed or interpreted in any way).

-

If the main/1 function in the script returns successfully, - the exit status for the script is 0. If an exception is - generated during execution, a short message is printed and the script - terminates with exit status 127.

-

To return your own non-zero exit code, call halt(ExitCode), - for example:

-
-halt(1).
-

- To retrieve the pathname of the script, call - - escript:script_name() - - from your script - (the pathname is usually, but not always, absolute).

-

If the file contains source code (as in the example above), - it is processed by the - epp preprocessor. - This means that you, for example, can use predefined macros - (such as ?MODULE) and include directives like - the -include_lib directive. For example, use

-
--include_lib("kernel/include/file.hrl").
-

to include the record definitions for the records used by function - - file:read_link_info/1. You can also select - encoding by including an encoding comment here, but if - a valid encoding comment exists on the second line, it takes - precedence.

-

The script is checked for syntactic and semantic - correctness before it is run. If there are warnings (such as - unused variables), they are printed and the script will - still be run. If there are errors, they are printed and - the script will not be run and its exit status is - 127.

-

Both the module declaration and the export declaration of - the main/1 function are optional.

-

By default, the script will be interpreted. You can force - it to be compiled by including the following line somewhere - in the script file:

-
--mode(compile).
-

Execution of interpreted code is slower than compiled code. - If much of the execution takes place in interpreted code, it - can be worthwhile to compile it, although the compilation - itself takes a little while. Also, native can be supplied - instead of compile. This compiles the script - using the native flag and may or may not be worthwhile - depending on the escript characteristics.

-

As mentioned earlier, a script can - contains precompiled beam code. In a precompiled - script, the interpretation of the script header is - the same as in a script containing source code. This means - that you can make a beam file executable by - prepending the file with the lines starting with #! - and %%! mentioned above. In a precompiled script, the - main/1 function must be exported.

-

Another option is to have an entire - Erlang archive in the script. In an archive script, the - interpretation of the script header is the same as - in a script containing source code. This means that you can - make an archive file executable by prepending the file with - the lines starting with #! and %%! mentioned - above. In an archive script, the main/1 function must - be exported. By default the main/1 function in the - module with the same name as the basename of the - escript file is invoked. This behavior can be - overridden by setting flag -escript main Module - as one of the emulator flags. Module must be the - name of a module that has an exported main/1 - function. For more information about archives and code loading, see - code(3).

-

It is often very convenient to have a header in - the escript, especially on Unix platforms. However, the header - is optional, so you directly can "execute" - an Erlang module, Beam file, or archive file without adding - any header to them. But then you have to invoke the script - as follows:

-
-$ escript factorial.erl 5
-factorial 5 = 120
-$ escript factorial.beam 5
-factorial 5 = 120
-$ escript factorial.zip 5
-factorial 5 = 120
- -
-
- - - escript:create(FileOrBin, Sections) -> ok | {ok, binary()} | - {error, term()} - Create an escript. - - FileOrBin = filename() | 'binary' - Sections = [Header] Body | Body - Header = shebang | {shebang, Shebang} -    | comment | {comment, Comment} -    | {emu_args, EmuArgs} - Shebang = string() | 'default' | 'undefined' - Comment = string() | 'default' | 'undefined' - EmuArgs = string() | 'undefined' - Body = {source, SourceCode} | {beam, BeamCode} -    | {archive, ZipArchive} -    | {archive, ZipFiles, ZipOptions} - SourceCode = BeamCode = file:filename() | binary() - ZipArchive = - zip:filename() | binary() - ZipFiles = [ZipFile] - ZipFile = file:filename() -    | {file:filename(), binary()} -    | {file:filename(), binary(), file:file_info()} - ZipOptions = [ - zip:create_option()] - - -

- Creates an escript from a list of sections. The - sections can be specified in any order. An escript begins with an - optional Header followed by a mandatory Body. If - the header is present, it does always begin with a - shebang, possibly followed by a comment and - emu_args. The shebang defaults to - "/usr/bin/env escript". The comment defaults to - "This is an -*- erlang -*- file". The created escript - can either be returned as a binary or written to file.

-

As an example of how the function can be used, we create an - interpreted escript that uses emu_args to set some emulator - flag. In this case, it happens to disable the smp_support. We - also extract the different sections from the newly created script:

-
-> Source = "%% Demo\nmain(_Args) ->\n    io:format(erlang:system_info(smp_support)).\n".
-"%% Demo\nmain(_Args) ->\n    io:format(erlang:system_info(smp_support)).\n"
-> io:format("~s\n", [Source]).
-%% Demo
-main(_Args) ->
-    io:format(erlang:system_info(smp_support)).
-
-ok
-> {ok, Bin} = escript:create(binary, [shebang, comment, {emu_args, "-smp disable"},
-                                      {source, list_to_binary(Source)}]).
-{ok,<<"#!/usr/bin/env escript\n%% This is an -*- erlang -*- file\n%%!-smp disabl"...>>}
-> file:write_file("demo.escript", Bin).
-ok
-> os:cmd("escript demo.escript").
-"false"
-> escript:extract("demo.escript", []).
-{ok,[{shebang,default}, {comment,default}, {emu_args,"-smp disable"},
-     {source,<<"%% Demo\nmain(_Args) ->\n    io:format(erlang:system_info(smp_su"...>>}]}
-

An escript without header can be created as follows:

-
-> file:write_file("demo.erl",
-                  ["%% demo.erl\n-module(demo).\n-export([main/1]).\n\n", Source]).
-ok
-> {ok, _, BeamCode} = compile:file("demo.erl", [binary, debug_info]).
-{ok,demo,
-    <<70,79,82,49,0,0,2,208,66,69,65,77,65,116,111,109,0,0,0,
-      79,0,0,0,9,4,100,...>>}
-> escript:create("demo.beam", [{beam, BeamCode}]).
-ok
-> escript:extract("demo.beam", []).
-{ok,[{shebang,undefined}, {comment,undefined}, {emu_args,undefined},
-     {beam,<<70,79,82,49,0,0,3,68,66,69,65,77,65,116,
-             111,109,0,0,0,83,0,0,0,9,...>>}]}
-> os:cmd("escript demo.beam").
-"true"
-

Here we create an archive script containing both Erlang - code and Beam code, then we iterate over all files in - the archive and collect their contents and some information about - them:

-
-> {ok, SourceCode} = file:read_file("demo.erl").
-{ok,<<"%% demo.erl\n-module(demo).\n-export([main/1]).\n\n%% Demo\nmain(_Arg"...>>}
-> escript:create("demo.escript",
-                 [shebang,
-                  {archive, [{"demo.erl", SourceCode},
-                             {"demo.beam", BeamCode}], []}]).
-ok
-> {ok, [{shebang,default}, {comment,undefined}, {emu_args,undefined},
-     {archive, ArchiveBin}]} = escript:extract("demo.escript", []).
-{ok,[{shebang,default}, {comment,undefined}, {emu_args,undefined},
-     {{archive,<<80,75,3,4,20,0,0,0,8,0,118,7,98,60,105,
-                152,61,93,107,0,0,0,118,0,...>>}]}
-> file:write_file("demo.zip", ArchiveBin).
-ok
-> zip:foldl(fun(N, I, B, A) -> [{N, I(), B()} | A] end, [], "demo.zip").
-{ok,[{"demo.beam",
-      {file_info,748,regular,read_write,
-                 {{2010,3,2},{0,59,22}},
-                 {{2010,3,2},{0,59,22}},
-                 {{2010,3,2},{0,59,22}},
-                 54,1,0,0,0,0,0},
-      <<70,79,82,49,0,0,2,228,66,69,65,77,65,116,111,109,0,0,0,
-        83,0,0,...>>},
-     {"demo.erl",
-      {file_info,118,regular,read_write,
-                 {{2010,3,2},{0,59,22}},
-                 {{2010,3,2},{0,59,22}},
-                 {{2010,3,2},{0,59,22}},
-                 54,1,0,0,0,0,0},
-      <<"%% demo.erl\n-module(demo).\n-export([main/1]).\n\n%% Demo\nmain(_Arg"...>>}]}
- -
-
- - - escript:extract(File, Options) -> {ok, Sections} | - {error, term()} - Parse an escript and extract its sections. - - File = filename() - Options = [] | [compile_source] - Sections = Headers Body - Headers = {shebang, Shebang} - {comment, Comment} - {emu_args, EmuArgs} - Shebang = string() | 'default' | 'undefined' - Comment = string() | 'default' | 'undefined' - EmuArgs = string() | 'undefined' - Body = {source, SourceCode} -    | {source, BeamCode} -    | {beam, BeamCode} -    | {archive, ZipArchive} - SourceCode = BeamCode = ZipArchive = binary() - - -

- Parses an escript and extracts its sections. - This is the reverse of - create/2. -

-

All sections are returned even if they do not exist in the - escript. If a particular section happens to have the same - value as the default value, the extracted value is set to the - atom default. If a section is missing, the extracted - value is set to the atom undefined.

-

Option compile_source only affects the result if - the escript contains source code. In this case the - Erlang code is automatically compiled and {source, - BeamCode} is returned instead of {source, - SourceCode}.

-

Example:

-
-> escript:create("demo.escript",
-                 [shebang, {archive, [{"demo.erl", SourceCode},
-                                      {"demo.beam", BeamCode}], []}]).
-ok
-> {ok, [{shebang,default}, {comment,undefined}, {emu_args,undefined},
-     {archive, ArchiveBin}]} =
-              escript:extract("demo.escript", []).
-{ok,[{{archive,<<80,75,3,4,20,0,0,0,8,0,118,7,98,60,105,
-                152,61,93,107,0,0,0,118,0,...>>}
-     {emu_args,undefined}]}
- -
-
- - - escript:script_name() -> File - Return the name of an escript. - - File = filename() - - -

- Returns the name of the escript that is executed. - If the function is invoked outside the context - of an escript, the behavior is undefined.

-
-
-
- -
- Options Accepted By escript - - -c - Compiles the escript regardless of the value of the mode attribute. - - -d - Debugs the escript. Starts the debugger, loads the module - containing the main/1 function into the debugger, sets a - breakpoint in main/1, and invokes main/1. If the - module is precompiled, it must be explicitly compiled with option - debug_info. - - -i - Interprets the escript regardless of the value of the mode - attribute. - - -s - Performs a syntactic and semantic check of the script file. - Warnings and errors (if any) are written to the standard output, but - the script will not be run. The exit status is 0 if any errors - are found, otherwise 127. - - -n - Compiles the escript using flag +native. - - -
-
- diff --git a/erts/doc/src/escript_cmd.xml b/erts/doc/src/escript_cmd.xml new file mode 100644 index 0000000000..4ca7e46e6e --- /dev/null +++ b/erts/doc/src/escript_cmd.xml @@ -0,0 +1,450 @@ + + + + +
+ + 20072018 + Ericsson AB. 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. + + + + escript + + + + + escript.xml +
+ escript + Erlang scripting support + +

escript provides support for running short Erlang programs + without having to compile them first, and an easy way to retrieve the + command-line arguments.

+ +

It is possible to bundle escript(s) with an Erlang + runtime system to make it self-sufficient and relocatable. In such + a standalone system, the escript(s) should be located in + the top bin directory of the standalone system and given + .escript as file extension. Further the (built-in) + escript program should be copied to the same directory and + given the scripts original name (without the .escript + extension). This will enable use of the bundled Erlang runtime + system.

+ +

The (built-in) escript program first determines which + Erlang runtime system to use and then starts it to execute your + script. Usually the runtime system is located in the same Erlang + installation as the escript program itself. But for + standalone systems with one or more escripts it may be the case + that the escript program in your path actually starts the + runtime system bundled with the escript. This is intentional, and + typically happens when the standalone system bin directory is not + in the execution path (as it may cause its erl program to + override the desired one) and the escript(s) are referred to via + symbolic links from a bin directory in the path.

+
+ + + + script-name script-arg1 script-arg2... + escript escript-flags script-name script-arg1 script-arg2... + Run a script written in Erlang. + +

escript runs a script written in Erlang.

+

Example:

+
+$ chmod u+x factorial
+$ cat factorial
+#!/usr/bin/env escript
+%% -*- erlang -*-
+%%! -smp enable -sname factorial -mnesia debug verbose
+main([String]) ->
+    try
+        N = list_to_integer(String),
+        F = fac(N),
+        io:format("factorial ~w = ~w\n", [N,F])
+    catch
+        _:_ ->
+            usage()
+    end;
+main(_) ->
+    usage().
+
+usage() ->
+    io:format("usage: factorial integer\n"),
+    halt(1).
+
+fac(0) -> 1;
+fac(N) -> N * fac(N-1).
+$ ./factorial 5
+factorial 5 = 120
+$ ./factorial
+usage: factorial integer
+$ ./factorial five
+usage: factorial integer
+

The header of the Erlang script in the example differs from + a normal Erlang module. The first line is intended to be the + interpreter line, which invokes escript.

+

However, if you invoke the escript as follows, + the contents of the first line does not matter, but it + cannot contain Erlang code as it will be ignored:

+
+$ escript factorial 5
+

The second line in the example contains an optional + directive to the Emacs editor, which causes it to + enter the major mode for editing Erlang source files. If the + directive is present, it must be located on the second + line.

+

If a comment selecting the encoding exists, it can be + located on the second line.

+ +

The encoding specified by the above mentioned comment + applies to the script itself. The encoding of the + I/O-server, however, must be set explicitly as follows:

+ +io:setopts([{encoding, unicode}]) +

The default encoding of the I/O-server for standard_io + is latin1, as the script runs in a non-interactive terminal + (see section + + Summary of Options) in the STDLIB User's Guide.

+
+

On the third line (or second line depending on the presence + of the Emacs directive), arguments can be specified to + the emulator, for example:

+
+%%! -smp enable -sname factorial -mnesia debug verbose
+

Such an argument line must start with %%! and the + remaining line is interpreted as arguments to the emulator.

+

If you know the location of the escript executable, the first + line can directly give the path to escript, for example:

+
+#!/usr/local/bin/escript
+

As any other type of scripts, Erlang scripts do not work on + Unix platforms if the execution bit for the script file is not set. + (To turn on the execution bit, use chmod +x script-name.)

+

The remaining Erlang script file can either contain + Erlang source code, an inlined beam file, or an + inlined archive file.

+

An Erlang script file must always contain the main/1 + function. When the script is run, the + main/1 function is called with a list + of strings representing the arguments specified to the script (not + changed or interpreted in any way).

+

If the main/1 function in the script returns successfully, + the exit status for the script is 0. If an exception is + generated during execution, a short message is printed and the script + terminates with exit status 127.

+

To return your own non-zero exit code, call halt(ExitCode), + for example:

+
+halt(1).
+

+ To retrieve the pathname of the script, call + + escript:script_name() + + from your script + (the pathname is usually, but not always, absolute).

+

If the file contains source code (as in the example above), + it is processed by the + epp preprocessor. + This means that you, for example, can use predefined macros + (such as ?MODULE) and include directives like + the -include_lib directive. For example, use

+
+-include_lib("kernel/include/file.hrl").
+

to include the record definitions for the records used by function + + file:read_link_info/1. You can also select + encoding by including an encoding comment here, but if + a valid encoding comment exists on the second line, it takes + precedence.

+

The script is checked for syntactic and semantic + correctness before it is run. If there are warnings (such as + unused variables), they are printed and the script will + still be run. If there are errors, they are printed and + the script will not be run and its exit status is + 127.

+

Both the module declaration and the export declaration of + the main/1 function are optional.

+

By default, the script will be interpreted. You can force + it to be compiled by including the following line somewhere + in the script file:

+
+-mode(compile).
+

Execution of interpreted code is slower than compiled code. + If much of the execution takes place in interpreted code, it + can be worthwhile to compile it, although the compilation + itself takes a little while. Also, native can be supplied + instead of compile. This compiles the script + using the native flag and may or may not be worthwhile + depending on the escript characteristics.

+

As mentioned earlier, a script can + contains precompiled beam code. In a precompiled + script, the interpretation of the script header is + the same as in a script containing source code. This means + that you can make a beam file executable by + prepending the file with the lines starting with #! + and %%! mentioned above. In a precompiled script, the + main/1 function must be exported.

+

Another option is to have an entire + Erlang archive in the script. In an archive script, the + interpretation of the script header is the same as + in a script containing source code. This means that you can + make an archive file executable by prepending the file with + the lines starting with #! and %%! mentioned + above. In an archive script, the main/1 function must + be exported. By default the main/1 function in the + module with the same name as the basename of the + escript file is invoked. This behavior can be + overridden by setting flag -escript main Module + as one of the emulator flags. Module must be the + name of a module that has an exported main/1 + function. For more information about archives and code loading, see + code(3).

+

It is often very convenient to have a header in + the escript, especially on Unix platforms. However, the header + is optional, so you directly can "execute" + an Erlang module, Beam file, or archive file without adding + any header to them. But then you have to invoke the script + as follows:

+
+$ escript factorial.erl 5
+factorial 5 = 120
+$ escript factorial.beam 5
+factorial 5 = 120
+$ escript factorial.zip 5
+factorial 5 = 120
+ +
+
+ + + escript:create(FileOrBin, Sections) -> ok | {ok, binary()} | + {error, term()} + Create an escript. + + FileOrBin = filename() | 'binary' + Sections = [Header] Body | Body + Header = shebang | {shebang, Shebang} +    | comment | {comment, Comment} +    | {emu_args, EmuArgs} + Shebang = string() | 'default' | 'undefined' + Comment = string() | 'default' | 'undefined' + EmuArgs = string() | 'undefined' + Body = {source, SourceCode} | {beam, BeamCode} +    | {archive, ZipArchive} +    | {archive, ZipFiles, ZipOptions} + SourceCode = BeamCode = file:filename() | binary() + ZipArchive = + zip:filename() | binary() + ZipFiles = [ZipFile] + ZipFile = file:filename() +    | {file:filename(), binary()} +    | {file:filename(), binary(), file:file_info()} + ZipOptions = [ + zip:create_option()] + + +

+ Creates an escript from a list of sections. The + sections can be specified in any order. An escript begins with an + optional Header followed by a mandatory Body. If + the header is present, it does always begin with a + shebang, possibly followed by a comment and + emu_args. The shebang defaults to + "/usr/bin/env escript". The comment defaults to + "This is an -*- erlang -*- file". The created escript + can either be returned as a binary or written to file.

+

As an example of how the function can be used, we create an + interpreted escript that uses emu_args to set some emulator + flag. In this case, it happens to disable the smp_support. We + also extract the different sections from the newly created script:

+
+> Source = "%% Demo\nmain(_Args) ->\n    io:format(erlang:system_info(smp_support)).\n".
+"%% Demo\nmain(_Args) ->\n    io:format(erlang:system_info(smp_support)).\n"
+> io:format("~s\n", [Source]).
+%% Demo
+main(_Args) ->
+    io:format(erlang:system_info(smp_support)).
+
+ok
+> {ok, Bin} = escript:create(binary, [shebang, comment, {emu_args, "-smp disable"},
+                                      {source, list_to_binary(Source)}]).
+{ok,<<"#!/usr/bin/env escript\n%% This is an -*- erlang -*- file\n%%!-smp disabl"...>>}
+> file:write_file("demo.escript", Bin).
+ok
+> os:cmd("escript demo.escript").
+"false"
+> escript:extract("demo.escript", []).
+{ok,[{shebang,default}, {comment,default}, {emu_args,"-smp disable"},
+     {source,<<"%% Demo\nmain(_Args) ->\n    io:format(erlang:system_info(smp_su"...>>}]}
+

An escript without header can be created as follows:

+
+> file:write_file("demo.erl",
+                  ["%% demo.erl\n-module(demo).\n-export([main/1]).\n\n", Source]).
+ok
+> {ok, _, BeamCode} = compile:file("demo.erl", [binary, debug_info]).
+{ok,demo,
+    <<70,79,82,49,0,0,2,208,66,69,65,77,65,116,111,109,0,0,0,
+      79,0,0,0,9,4,100,...>>}
+> escript:create("demo.beam", [{beam, BeamCode}]).
+ok
+> escript:extract("demo.beam", []).
+{ok,[{shebang,undefined}, {comment,undefined}, {emu_args,undefined},
+     {beam,<<70,79,82,49,0,0,3,68,66,69,65,77,65,116,
+             111,109,0,0,0,83,0,0,0,9,...>>}]}
+> os:cmd("escript demo.beam").
+"true"
+

Here we create an archive script containing both Erlang + code and Beam code, then we iterate over all files in + the archive and collect their contents and some information about + them:

+
+> {ok, SourceCode} = file:read_file("demo.erl").
+{ok,<<"%% demo.erl\n-module(demo).\n-export([main/1]).\n\n%% Demo\nmain(_Arg"...>>}
+> escript:create("demo.escript",
+                 [shebang,
+                  {archive, [{"demo.erl", SourceCode},
+                             {"demo.beam", BeamCode}], []}]).
+ok
+> {ok, [{shebang,default}, {comment,undefined}, {emu_args,undefined},
+     {archive, ArchiveBin}]} = escript:extract("demo.escript", []).
+{ok,[{shebang,default}, {comment,undefined}, {emu_args,undefined},
+     {{archive,<<80,75,3,4,20,0,0,0,8,0,118,7,98,60,105,
+                152,61,93,107,0,0,0,118,0,...>>}]}
+> file:write_file("demo.zip", ArchiveBin).
+ok
+> zip:foldl(fun(N, I, B, A) -> [{N, I(), B()} | A] end, [], "demo.zip").
+{ok,[{"demo.beam",
+      {file_info,748,regular,read_write,
+                 {{2010,3,2},{0,59,22}},
+                 {{2010,3,2},{0,59,22}},
+                 {{2010,3,2},{0,59,22}},
+                 54,1,0,0,0,0,0},
+      <<70,79,82,49,0,0,2,228,66,69,65,77,65,116,111,109,0,0,0,
+        83,0,0,...>>},
+     {"demo.erl",
+      {file_info,118,regular,read_write,
+                 {{2010,3,2},{0,59,22}},
+                 {{2010,3,2},{0,59,22}},
+                 {{2010,3,2},{0,59,22}},
+                 54,1,0,0,0,0,0},
+      <<"%% demo.erl\n-module(demo).\n-export([main/1]).\n\n%% Demo\nmain(_Arg"...>>}]}
+ +
+
+ + + escript:extract(File, Options) -> {ok, Sections} | + {error, term()} + Parse an escript and extract its sections. + + File = filename() + Options = [] | [compile_source] + Sections = Headers Body + Headers = {shebang, Shebang} + {comment, Comment} + {emu_args, EmuArgs} + Shebang = string() | 'default' | 'undefined' + Comment = string() | 'default' | 'undefined' + EmuArgs = string() | 'undefined' + Body = {source, SourceCode} +    | {source, BeamCode} +    | {beam, BeamCode} +    | {archive, ZipArchive} + SourceCode = BeamCode = ZipArchive = binary() + + +

+ Parses an escript and extracts its sections. + This is the reverse of + create/2. +

+

All sections are returned even if they do not exist in the + escript. If a particular section happens to have the same + value as the default value, the extracted value is set to the + atom default. If a section is missing, the extracted + value is set to the atom undefined.

+

Option compile_source only affects the result if + the escript contains source code. In this case the + Erlang code is automatically compiled and {source, + BeamCode} is returned instead of {source, + SourceCode}.

+

Example:

+
+> escript:create("demo.escript",
+                 [shebang, {archive, [{"demo.erl", SourceCode},
+                                      {"demo.beam", BeamCode}], []}]).
+ok
+> {ok, [{shebang,default}, {comment,undefined}, {emu_args,undefined},
+     {archive, ArchiveBin}]} =
+              escript:extract("demo.escript", []).
+{ok,[{{archive,<<80,75,3,4,20,0,0,0,8,0,118,7,98,60,105,
+                152,61,93,107,0,0,0,118,0,...>>}
+     {emu_args,undefined}]}
+ +
+
+ + + escript:script_name() -> File + Return the name of an escript. + + File = filename() + + +

+ Returns the name of the escript that is executed. + If the function is invoked outside the context + of an escript, the behavior is undefined.

+
+
+
+ +
+ Options Accepted By escript + + -c + Compiles the escript regardless of the value of the mode attribute. + + -d + Debugs the escript. Starts the debugger, loads the module + containing the main/1 function into the debugger, sets a + breakpoint in main/1, and invokes main/1. If the + module is precompiled, it must be explicitly compiled with option + debug_info. + + -i + Interprets the escript regardless of the value of the mode + attribute. + + -s + Performs a syntactic and semantic check of the script file. + Warnings and errors (if any) are written to the standard output, but + the script will not be run. The exit status is 0 if any errors + are found, otherwise 127. + + -n + Compiles the escript using flag +native. + + +
+
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 @@ - - + + - + - + - + - + %ESOCK_USE_SOCKET_XML% - - - + + + diff --git a/erts/doc/src/run_erl.xml b/erts/doc/src/run_erl.xml deleted file mode 100644 index fa36457489..0000000000 --- a/erts/doc/src/run_erl.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - -
- - 19992018 - Ericsson AB. 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. - - - - run_erl - Kent Boortz - - - - - 1999-12-15 - - run_erl.xml -
- run_erl - Redirect Erlang input and output streams on Unix systems. - -

The program is specific to Unix systems. - This program redirects the standard input and standard - output streams so that all output can be logged. It also lets the - program connect to the Erlang console, making - it possible to monitor and debug an embedded system remotely.

- -

For more information about the use, see the - - Embedded System User's Guide in System Documentation.

-
- - - - run_erl [-daemon] pipe_dir/ log_dir "exec command - arg1 arg2 ..." - Start the Erlang emulator without attached terminal. - -

Arguments:

- - -daemon - -

This option is highly recommended. It makes run_erl run - in the background completely detached from any controlling - terminal and the command returns to the caller immediately. - Without this option, run_erl must be started using several - tricks in the shell to detach it completely from the - terminal in use when starting it. The option must be the - first argument to run_erl on the command line.

-
- pipe_dir - -

The named pipe, usually . It must be - suffixed by a (slash), that is, - , not - .

-
- log_dir - -

The log files, that is:

- - -

One log file, , which logs - progress and warnings from the - program itself.

-
- -

Up to five log files at maximum 100 KB each with the content - of the standard streams from and to the command. (Both the - number of logs and sizes can be changed by environment - variables, see section Environment Variables - below.)

-

When the logs are full, deletes - and reuses the oldest log file.

-
-
-
- "exec command arg1 arg2 ..." - -

A space-separated string specifying the program to be executed. - The second field is typically a command name such as erl.

-
-
-
-
-
- -
- Notes concerning the Log Files -

While running, run_erl sends all output, - uninterpreted, to a log file. The file is named - , where N is an integer. When the - log is "full" (default log size is 100 KB), run_erl starts to log - in file , until N reaches a - certain number (default 5), whereupon N starts at 1 again and - the oldest files start getting overwritten.

- -

If no output comes from the Erlang shell, but - the Erlang machine still seems to be alive, an "ALIVE" message is - written to the log; it is a time stamp and is written, by default, - after 15 minutes of inactivity. Also, if output from Erlang is - logged, but more than 5 minutes (default) has passed since last time - we got anything from Erlang, a time stamp is written in the - log. The "ALIVE" messages look as follows:

- - ]]> - -

The other time stamps look as follows:

- - ]]> - -

is the date and time the message is - written, default in local time (can be changed to UTC if needed). - It is formatted with the ANSI-C function - using the format string , which - produces messages like - ; this can - be changed, see the next section.

-
- -
- - Environment Variables -

The following environment variables are recognized by run_erl - and change the logging behavior. For more information, see the previous - section.

- - - RUN_ERL_LOG_ALIVE_MINUTES - -

How long to wait for output (in minutes) before writing an - "ALIVE" message to the log. Defaults to 15, minimum is 1.

-
- RUN_ERL_LOG_ACTIVITY_MINUTES - -

How long Erlang needs to be inactive before output is - preceded with a time stamp. Defaults to - RUN_ERL_LOG_ALIVE_MINUTES div 3, minimum is 1.

-
- RUN_ERL_LOG_ALIVE_FORMAT - -

Specifies another format string to be used in the strftime - C library call. That is, specifying this to - gives - log messages with time stamps like - . For more information, - see the documentation for the C library function strftime. - Defaults to .

-
- RUN_ERL_LOG_ALIVE_IN_UTC - -

If set to anything else than 0, it makes all - times displayed by run_erl to be in UTC (GMT, CET, MET, - without Daylight Saving Time), rather than in local time. - This does not affect data coming from Erlang, - only the logs output directly by run_erl. Application - SASL can be modified accordingly by setting the Erlang - application variable to - .

-
- RUN_ERL_LOG_GENERATIONS - -

Controls the number of log files written before older - files are reused. Defaults to 5, minimum is 2, maximum is 1000.

-

Note that, as a way to indicate the newest file, run_erl will - delete the oldest log file to maintain a "hole" in the file - sequences. For example, if log files #1, #2, #4 and #5 exists, that - means #2 is the latest and #4 is the oldest. You will therefore at most - get one less log file than the value set by - RUN_ERL_LOG_GENERATIONS.

-
- RUN_ERL_LOG_MAXSIZE - -

The size, in bytes, of a log file before switching to a - new log file. Defaults to 100000, minimum is 1000, maximum is - about 2^30.

-
- RUN_ERL_DISABLE_FLOWCNTRL - -

If defined, disables input and output flow control for the pty - opend by run_erl. Useful if you want to remove any risk of - accidentally blocking the flow control by using Ctrl-S (instead of - Ctrl-D to detach), which can result in blocking of the entire Beam - process, and in the case of running heart as supervisor even the - heart process becomes blocked when writing log message to terminal, - leaving the heart process unable to do its work.

-
-
-
- -
- See Also -

start(1), - start_erl(1)

-
-
- diff --git a/erts/doc/src/run_erl_cmd.xml b/erts/doc/src/run_erl_cmd.xml new file mode 100644 index 0000000000..9f1984f784 --- /dev/null +++ b/erts/doc/src/run_erl_cmd.xml @@ -0,0 +1,215 @@ + + + + +
+ + 19992018 + Ericsson AB. 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. + + + + run_erl + Kent Boortz + + + + + 1999-12-15 + + run_erl.xml +
+ run_erl + Redirect Erlang input and output streams on Unix systems. + +

The program is specific to Unix systems. + This program redirects the standard input and standard + output streams so that all output can be logged. It also lets the + program connect to the Erlang console, making + it possible to monitor and debug an embedded system remotely.

+ +

For more information about the use, see the + + Embedded System User's Guide in System Documentation.

+
+ + + + run_erl [-daemon] pipe_dir/ log_dir "exec command + arg1 arg2 ..." + Start the Erlang emulator without attached terminal. + +

Arguments:

+ + -daemon + +

This option is highly recommended. It makes run_erl run + in the background completely detached from any controlling + terminal and the command returns to the caller immediately. + Without this option, run_erl must be started using several + tricks in the shell to detach it completely from the + terminal in use when starting it. The option must be the + first argument to run_erl on the command line.

+
+ pipe_dir + +

The named pipe, usually . It must be + suffixed by a (slash), that is, + , not + .

+
+ log_dir + +

The log files, that is:

+ + +

One log file, , which logs + progress and warnings from the + program itself.

+
+ +

Up to five log files at maximum 100 KB each with the content + of the standard streams from and to the command. (Both the + number of logs and sizes can be changed by environment + variables, see section Environment Variables + below.)

+

When the logs are full, deletes + and reuses the oldest log file.

+
+
+
+ "exec command arg1 arg2 ..." + +

A space-separated string specifying the program to be executed. + The second field is typically a command name such as erl.

+
+
+
+
+
+ +
+ Notes concerning the Log Files +

While running, run_erl sends all output, + uninterpreted, to a log file. The file is named + , where N is an integer. When the + log is "full" (default log size is 100 KB), run_erl starts to log + in file , until N reaches a + certain number (default 5), whereupon N starts at 1 again and + the oldest files start getting overwritten.

+ +

If no output comes from the Erlang shell, but + the Erlang machine still seems to be alive, an "ALIVE" message is + written to the log; it is a time stamp and is written, by default, + after 15 minutes of inactivity. Also, if output from Erlang is + logged, but more than 5 minutes (default) has passed since last time + we got anything from Erlang, a time stamp is written in the + log. The "ALIVE" messages look as follows:

+ + ]]> + +

The other time stamps look as follows:

+ + ]]> + +

is the date and time the message is + written, default in local time (can be changed to UTC if needed). + It is formatted with the ANSI-C function + using the format string , which + produces messages like + ; this can + be changed, see the next section.

+
+ +
+ + Environment Variables +

The following environment variables are recognized by run_erl + and change the logging behavior. For more information, see the previous + section.

+ + + RUN_ERL_LOG_ALIVE_MINUTES + +

How long to wait for output (in minutes) before writing an + "ALIVE" message to the log. Defaults to 15, minimum is 1.

+
+ RUN_ERL_LOG_ACTIVITY_MINUTES + +

How long Erlang needs to be inactive before output is + preceded with a time stamp. Defaults to + RUN_ERL_LOG_ALIVE_MINUTES div 3, minimum is 1.

+
+ RUN_ERL_LOG_ALIVE_FORMAT + +

Specifies another format string to be used in the strftime + C library call. That is, specifying this to + gives + log messages with time stamps like + . For more information, + see the documentation for the C library function strftime. + Defaults to .

+
+ RUN_ERL_LOG_ALIVE_IN_UTC + +

If set to anything else than 0, it makes all + times displayed by run_erl to be in UTC (GMT, CET, MET, + without Daylight Saving Time), rather than in local time. + This does not affect data coming from Erlang, + only the logs output directly by run_erl. Application + SASL can be modified accordingly by setting the Erlang + application variable to + .

+
+ RUN_ERL_LOG_GENERATIONS + +

Controls the number of log files written before older + files are reused. Defaults to 5, minimum is 2, maximum is 1000.

+

Note that, as a way to indicate the newest file, run_erl will + delete the oldest log file to maintain a "hole" in the file + sequences. For example, if log files #1, #2, #4 and #5 exists, that + means #2 is the latest and #4 is the oldest. You will therefore at most + get one less log file than the value set by + RUN_ERL_LOG_GENERATIONS.

+
+ RUN_ERL_LOG_MAXSIZE + +

The size, in bytes, of a log file before switching to a + new log file. Defaults to 100000, minimum is 1000, maximum is + about 2^30.

+
+ RUN_ERL_DISABLE_FLOWCNTRL + +

If defined, disables input and output flow control for the pty + opend by run_erl. Useful if you want to remove any risk of + accidentally blocking the flow control by using Ctrl-S (instead of + Ctrl-D to detach), which can result in blocking of the entire Beam + process, and in the case of running heart as supervisor even the + heart process becomes blocked when writing log message to terminal, + leaving the heart process unable to do its work.

+
+
+
+ +
+ See Also +

start(1), + start_erl(1)

+
+
diff --git a/erts/doc/src/start.xml b/erts/doc/src/start.xml deleted file mode 100644 index 6eac47fe94..0000000000 --- a/erts/doc/src/start.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - -
- - 19992016 - Ericsson AB. 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. - - - - start - Kent Boortz - - - - - 1999-12-15 - - start.xml -
- start - OTP start script example for Unix. - -

The script is an example script on - how to start up the Erlang system in embedded mode on Unix.

- -

For more information about the use, see the - - Embedded System User's Guide in System Documentation.

-
- - - - start [ data_file ] - Example script on how to start up the Erlang system in embedded - mode on Unix. - -

Argument:

- - data_file - -

Optional. Specifies what file - to use.

-
-
-

Environment variable can - be set before calling this example, which sets the directory - where to find the release files.

-
-
-
- -
- See Also -

run_erl(1), - start_erl(1)

-
-
- diff --git a/erts/doc/src/start_cmd.xml b/erts/doc/src/start_cmd.xml new file mode 100644 index 0000000000..9f208d43bb --- /dev/null +++ b/erts/doc/src/start_cmd.xml @@ -0,0 +1,72 @@ + + + + +
+ + 19992016 + Ericsson AB. 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. + + + + start + Kent Boortz + + + + + 1999-12-15 + + start.xml +
+ start + OTP start script example for Unix. + +

The script is an example script on + how to start up the Erlang system in embedded mode on Unix.

+ +

For more information about the use, see the + + Embedded System User's Guide in System Documentation.

+
+ + + + start [ data_file ] + Example script on how to start up the Erlang system in embedded + mode on Unix. + +

Argument:

+ + data_file + +

Optional. Specifies what file + to use.

+
+
+

Environment variable can + be set before calling this example, which sets the directory + where to find the release files.

+
+
+
+ +
+ See Also +

run_erl(1), + start_erl(1)

+
+
diff --git a/erts/doc/src/start_erl.xml b/erts/doc/src/start_erl.xml deleted file mode 100644 index 4887d4606e..0000000000 --- a/erts/doc/src/start_erl.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - - -
- - 19982016 - Ericsson AB. 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. - - - - start_erl - Patrik Nyblom - - - - - 1998-08-05 - - start_erl.xml -
- start_erl - Start Erlang for embedded systems on Windows systems. - -

The program is specific to - Windows NT/2000/XP (and later versions of Windows). - Although there are programs with the same name on other - platforms, their functionality is different.

- -

This program is distributed both in compiled - form (under <Erlang root>\\erts-<version>\\bin) and - in source form (under <Erlang root>\\erts-<version>\\src). - The purpose of the source code is to ease customization of the - program for local needs, such as cyclic restart - detection. There is also a "make"-file, written for the - program distributed with Microsoft Visual - C++. This program can, however, be compiled with - any Win32 C compiler (possibly with minor modifications).

- -

This program aids release handling on Windows systems. - The program is to be called by the - program, read up the release data file - start_erl.data, and start Erlang. Some options to - start_erl are added and removed by the release handler - during upgrade with emulator restart (more specifically option - ).

-
- - - - start_erl [<erl options>] ++ [<start_erl options>] - Start the Erlang emulator with the correct release data. - - -

The program in its original form - recognizes the following options:

- - ++ - -

Mandatory. Delimits start_erl options from normal Erlang - options. Everything on the command line before - is interpreted as options to be sent to the - program. Everything after - is interpreted as options to - itself.

-
- -reldir <release root> - -

Mandatory if environment variable - is not specified and no - -rootdir option is specified. Tells start_erl where - the root of the release tree is located in the file system - (typically <Erlang root>\\releases). The - file is expected to be - located in this directory (unless otherwise specified). If - only option -rootdir is specified, the directory is - assumed to be <Erlang root>\\releases.

-
- -rootdir <Erlang root directory> - -

Mandatory if -reldir is not specified and no - exists in the environment. This - specifies the Erlang installation root directory (under - which the lib, releases, and - erts-<Version> directories are located). If only - -reldir (or environment variable ) - is specified, the Erlang root is assumed to - be the directory exactly one level above the release - directory.

-
- -data <data file name> - -

Optional. Specifies another data file than start_erl.data - in the <release root>. It is specified relative to the - <release root> or absolute (including drive letter, and so - on). This option is used by the release handler during - upgrade and is not to be used during normal - operation. Normally the release data file is not to be - named differently.

-
- -bootflags <boot flags file name> - -

Optional. Specifies a file name relative to the release - directory (that is, the subdirectory of <release root> - where the file and others are located). - The contents of this file is appended to the command line - when Erlang is started. This makes it easy to start the - emulator with different options for different releases.

-
-
-
-
-
- -
- Notes - - -

As the source code is distributed, it can easily be modified to - accept other options. The program must still accept option - with the semantics described above for the - release handler to work correctly.

-
- -

The Erlang emulator is found by examining the registry keys for - the emulator version specified in the release data file. The new - emulator must be properly installed before the upgrade for - this to work.

-
- -

Although the program is located together with files specific to the - emulator version, it is not expected to be specific to the - emulator version. The release handler does not change option - to during - emulator restart. Locate the (possibly customized) - program so that it is not overwritten - during upgrade.

-
- -

The default options of the program are not - sufficient for release handling. The machine started by - is be specified as the - program and the arguments are to contain - followed by the desired options.

-
-
-
- -
- See Also -

erlsrv(1), - - release_handler(3)

-
-
- diff --git a/erts/doc/src/start_erl_cmd.xml b/erts/doc/src/start_erl_cmd.xml new file mode 100644 index 0000000000..e9cb248da4 --- /dev/null +++ b/erts/doc/src/start_erl_cmd.xml @@ -0,0 +1,168 @@ + + + + +
+ + 19982016 + Ericsson AB. 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. + + + + start_erl + Patrik Nyblom + + + + + 1998-08-05 + + start_erl.xml +
+ start_erl + Start Erlang for embedded systems on Windows systems. + +

The program is specific to + Windows NT/2000/XP (and later versions of Windows). + Although there are programs with the same name on other + platforms, their functionality is different.

+ +

This program is distributed both in compiled + form (under <Erlang root>\\erts-<version>\\bin) and + in source form (under <Erlang root>\\erts-<version>\\src). + The purpose of the source code is to ease customization of the + program for local needs, such as cyclic restart + detection. There is also a "make"-file, written for the + program distributed with Microsoft Visual + C++. This program can, however, be compiled with + any Win32 C compiler (possibly with minor modifications).

+ +

This program aids release handling on Windows systems. + The program is to be called by the + program, read up the release data file + start_erl.data, and start Erlang. Some options to + start_erl are added and removed by the release handler + during upgrade with emulator restart (more specifically option + ).

+
+ + + + start_erl [<erl options>] ++ [<start_erl options>] + Start the Erlang emulator with the correct release data. + + +

The program in its original form + recognizes the following options:

+ + ++ + +

Mandatory. Delimits start_erl options from normal Erlang + options. Everything on the command line before + is interpreted as options to be sent to the + program. Everything after + is interpreted as options to + itself.

+
+ -reldir <release root> + +

Mandatory if environment variable + is not specified and no + -rootdir option is specified. Tells start_erl where + the root of the release tree is located in the file system + (typically <Erlang root>\\releases). The + file is expected to be + located in this directory (unless otherwise specified). If + only option -rootdir is specified, the directory is + assumed to be <Erlang root>\\releases.

+
+ -rootdir <Erlang root directory> + +

Mandatory if -reldir is not specified and no + exists in the environment. This + specifies the Erlang installation root directory (under + which the lib, releases, and + erts-<Version> directories are located). If only + -reldir (or environment variable ) + is specified, the Erlang root is assumed to + be the directory exactly one level above the release + directory.

+
+ -data <data file name> + +

Optional. Specifies another data file than start_erl.data + in the <release root>. It is specified relative to the + <release root> or absolute (including drive letter, and so + on). This option is used by the release handler during + upgrade and is not to be used during normal + operation. Normally the release data file is not to be + named differently.

+
+ -bootflags <boot flags file name> + +

Optional. Specifies a file name relative to the release + directory (that is, the subdirectory of <release root> + where the file and others are located). + The contents of this file is appended to the command line + when Erlang is started. This makes it easy to start the + emulator with different options for different releases.

+
+
+
+
+
+ +
+ Notes + + +

As the source code is distributed, it can easily be modified to + accept other options. The program must still accept option + with the semantics described above for the + release handler to work correctly.

+
+ +

The Erlang emulator is found by examining the registry keys for + the emulator version specified in the release data file. The new + emulator must be properly installed before the upgrade for + this to work.

+
+ +

Although the program is located together with files specific to the + emulator version, it is not expected to be specific to the + emulator version. The release handler does not change option + to during + emulator restart. Locate the (possibly customized) + program so that it is not overwritten + during upgrade.

+
+ +

The default options of the program are not + sufficient for release handling. The machine started by + is be specified as the + program and the arguments are to contain + followed by the desired options.

+
+
+
+ +
+ See Also +

erlsrv(1), + + release_handler(3)

+
+
diff --git a/erts/doc/src/werl.xml b/erts/doc/src/werl.xml deleted file mode 100644 index 792fe204e8..0000000000 --- a/erts/doc/src/werl.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - -
- - 19982016 - Ericsson AB. 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. - - - - werl - Björn Gustavsson - Bjarne Däcker - 1 - Bjarne Däcker - - 1998-01-26 - A - werl.xml -
- werl - The Erlang Emulator - -

On Windows, the preferred way to start the Erlang system for interactive - use is as follows:

- -

]]>

- -

This starts Erlang in its own window, with fully - functioning command-line editing and scrollbars. All flags - except work as they do for - erl(1).

- - - -

To copy text to the clipboard, use Ctrl-C.

-
- -

To paste text, use Ctrl-V.

-
- -

To interrupt the runtime system or the shell process (depending - on what has been specified with system flag +B), use - Ctrl-Break.

-
-
- -

In cases where you want to redirect standard input and/or - standard output or use Erlang in a pipeline, werl is - not suitable, and the erl program is to be used instead.

- -

The werl window is in many ways modeled after the xterm - window present on other platforms, as the xterm model - fits well with line-oriented command-based interaction. This - means that selecting text is line-oriented rather than - rectangle-oriented.

- - - -

To select text in the werl window, press and hold - the left mouse button and drag the mouse over the text you want - to select. If the selection crosses line boundaries, the - selected text consists of complete lines where applicable - (just like in a word processor).

-
- -

To select more text than fits - in the window, start by selecting a small part in the - beginning of the text you want, then use the scrollbar - to view the end of the desired selection, point to it, and press - the right mouse button. The whole area between your - first selection and the point where you right-clicked is - included in the selection.

-
- -

To copy the selected text to the clipboard, either - use Ctrl-C, use the menu, or press the copy - button in the toolbar.

-
-
- -

Pasted text is inserted at the current prompt position - and is interpreted by Erlang as usual keyboard input.

- - - -

To retrieve previous command lines, press the Up arrow or - use Ctrl-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 - command.

- - - -

To stop the Erlang emulator, close the werl window.

-
-
-
-
- diff --git a/erts/doc/src/werl_cmd.xml b/erts/doc/src/werl_cmd.xml new file mode 100644 index 0000000000..4f25565c64 --- /dev/null +++ b/erts/doc/src/werl_cmd.xml @@ -0,0 +1,117 @@ + + + + +
+ + 19982016 + Ericsson AB. 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. + + + + werl + Björn Gustavsson + Bjarne Däcker + 1 + Bjarne Däcker + + 1998-01-26 + A + werl.xml +
+ werl + The Erlang Emulator + +

On Windows, the preferred way to start the Erlang system for interactive + use is as follows:

+ +

]]>

+ +

This starts Erlang in its own window, with fully + functioning command-line editing and scrollbars. All flags + except work as they do for + erl(1).

+ + + +

To copy text to the clipboard, use Ctrl-C.

+
+ +

To paste text, use Ctrl-V.

+
+ +

To interrupt the runtime system or the shell process (depending + on what has been specified with system flag +B), use + Ctrl-Break.

+
+
+ +

In cases where you want to redirect standard input and/or + standard output or use Erlang in a pipeline, werl is + not suitable, and the erl program is to be used instead.

+ +

The werl window is in many ways modeled after the xterm + window present on other platforms, as the xterm model + fits well with line-oriented command-based interaction. This + means that selecting text is line-oriented rather than + rectangle-oriented.

+ + + +

To select text in the werl window, press and hold + the left mouse button and drag the mouse over the text you want + to select. If the selection crosses line boundaries, the + selected text consists of complete lines where applicable + (just like in a word processor).

+
+ +

To select more text than fits + in the window, start by selecting a small part in the + beginning of the text you want, then use the scrollbar + to view the end of the desired selection, point to it, and press + the right mouse button. The whole area between your + first selection and the point where you right-clicked is + included in the selection.

+
+ +

To copy the selected text to the clipboard, either + use Ctrl-C, use the menu, or press the copy + button in the toolbar.

+
+
+ +

Pasted text is inserted at the current prompt position + and is interpreted by Erlang as usual keyboard input.

+ + + +

To retrieve previous command lines, press the Up arrow or + use Ctrl-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 + command.

+ + + +

To stop the Erlang emulator, close the werl window.

+
+
+
+
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 # ---------------------------------------------------- @@ -28,11 +29,6 @@ include ../../vsn.mk VSN=$(ASN1_VSN) APPLICATION=asn1 -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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/common_test/doc/src/Makefile b/lib/common_test/doc/src/Makefile index ae06572752..55ab5e5cc1 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,16 @@ 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) - - -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.xml deleted file mode 100644 index 5b962ed5c7..0000000000 --- a/lib/common_test/doc/src/ct_run.xml +++ /dev/null @@ -1,229 +0,0 @@ - - - - -
- - 20072017 - Ericsson AB. 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. - - - - The ct_run program - Peter Andersson - Peter Andersson - - - - 2010-04-01 - PA2 - ct_run.xml -
- ct_run - Program used for starting Common Test from the - OS command line. - - -

The ct_run program is automatically installed with Erlang/OTP - and the Common Test application (for more information, see - section Installation - in the User's Guide). The program accepts different start flags. - Some flags trigger ct_run to start Common Test and - pass on data to it. Some flags start an Erlang node prepared for - running Common Test in a particular mode.

- -

The interface function - ct:run_test/1, - corresponding to the ct_run program, is used for starting - Common Test from the Erlang shell (or an Erlang program). - For details, see the ct - manual page.

- -

ct_run also accepts Erlang emulator flags. These are used - when ct_run calls erl to start the Erlang node (this - makes it possible to add directories to the code server path, - change the cookie on the node, start more applications, and so on).

- -

With the optional flag -erl_args, options on the ct_run - command line can be divided into two groups:

- - - One group that Common Test is to process (those - preceding -erl_args). - One group that Common Test is to ignore and pass on - directly to the emulator (those following -erl_args). - - -

Options preceding -erl_args that Common Test - does not recognize are also passed on to the emulator untouched. - By -erl_args the user can specify flags with the same name, but - with different destinations, on the ct_run command line.

- -

If flags -pa or -pz are specified in the - Common Test group of options (preceding -erl_args), - relative directories are converted to absolute and reinserted into - the code path by Common Test. This is to avoid problems - loading user modules when Common Test changes working directory - during test runs. However, Common Test ignores flags -pa - and -pz following -erl_args on the command line. These - directories are added to the code path normally (that is, on specified - form).

- -

Exit status is set before the program ends. Value 0 indicates - a successful test result, 1 indicates one or more failed or - auto-skipped test cases, and 2 indicates test execution failure.

- -

If ct_run is called with option -help, it prints all - valid start flags to stdout.

-
- -
- - Run Tests from Command Line -
- ct_run -dir TestDir1 TestDir2 .. TestDirN |
-  [-dir TestDir] -suite Suite1 Suite2 .. SuiteN
-  [-group Groups1 Groups2 .. GroupsN] [-case Case1 Case2 .. CaseN]
-  [-step [config | keep_inactive]]
-  [-config ConfigFile1 ConfigFile2 .. ConfigFileN]
-  [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
-   ConfigString2 and .. CallbackModuleN ConfigStringN]
-  [-decrypt_key Key] | [-decrypt_file KeyFile]
-  [-label Label]
-  [-logdir LogDir]
-  [-logopts LogOpts]
-  [-verbosity GenVLevel | [Category1 VLevel1 and
-   Category2 VLevel2 and .. CategoryN VLevelN]]
-  [-silent_connections [ConnType1 ConnType2 .. ConnTypeN]]
-  [-stylesheet CSSFile]
-  [-cover CoverCfgFile]
-  [-cover_stop Bool]
-  [-event_handler EvHandler1 EvHandler2 .. EvHandlerN] |
-  [-event_handler_init EvHandler1 InitArg1 and
-   EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
-  [-include InclDir1 InclDir2 .. InclDirN]
-  [-no_auto_compile]
-  [-abort_if_missing_suites]
-  [-muliply_timetraps Multiplier]
-  [-scale_timetraps]
-  [-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
-  [-repeat N] |
-  [-duration HHMMSS [-force_stop [skip_rest]]] |
-  [-until [YYMoMoDD]HHMMSS [-force_stop [skip_rest]]]
-  [-basic_html]
-  [-no_esc_chars]
-  [-keep_logs all | NLogs]
-  [-ct_hooks CTHModule1 CTHOpts1 and CTHModule2 CTHOpts2 and ..
-   CTHModuleN CTHOptsN]
-  [-exit_status ignore_config]
-  [-help]
-
- -
- Run Tests using Test Specification -
- ct_run -spec TestSpec1 TestSpec2 .. TestSpecN
-  [-join_specs]
-  [-config ConfigFile1 ConfigFile2 .. ConfigFileN]
-  [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
-   ConfigString2 and .. and CallbackModuleN ConfigStringN]
-  [-decrypt_key Key] | [-decrypt_file KeyFile]
-  [-label Label]
-  [-logdir LogDir]
-  [-logopts LogOpts]
-  [-verbosity GenVLevel | [Category1 VLevel1 and
-   Category2 VLevel2 and .. CategoryN VLevelN]]
-  [-allow_user_terms]
-  [-silent_connections [ConnType1 ConnType2 .. ConnTypeN]]
-  [-stylesheet CSSFile]
-  [-cover CoverCfgFile]
-  [-cover_stop Bool]
-  [-event_handler EvHandler1 EvHandler2 .. EvHandlerN] |
-  [-event_handler_init EvHandler1 InitArg1 and
-   EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
-  [-include InclDir1 InclDir2 .. InclDirN]
-  [-no_auto_compile]
-  [-abort_if_missing_suites]
-  [-muliply_timetraps Multiplier]
-  [-scale_timetraps]
-  [-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
-  [-repeat N] |
-  [-duration HHMMSS [-force_stop [skip_rest]]] |
-  [-until [YYMoMoDD]HHMMSS [-force_stop [skip_rest]]]
-  [-basic_html]
-  [-no_esc_chars]
-  [-keep_logs all | NLogs]
-  [-ct_hooks CTHModule1 CTHOpts1 and CTHModule2 CTHOpts2 and ..
-   CTHModuleN CTHOptsN]
-  [-exit_status ignore_config]
-
- -
- Run Tests in Web-Based GUI -
- ct_run -vts [-browser Browser]
-  [-dir TestDir1 TestDir2 .. TestDirN] |
-  [[dir TestDir] -suite Suite [[-group Group] [-case Case]]]
-  [-config ConfigFile1 ConfigFile2 .. ConfigFileN]
-  [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
-    ConfigString2 and .. and CallbackModuleN ConfigStringN]
-  [-logopts LogOpts]
-  [-verbosity GenVLevel | [Category1 VLevel1 and
-   Category2 VLevel2 and .. CategoryN VLevelN]]
-  [-decrypt_key Key] | [-decrypt_file KeyFile]
-  [-include InclDir1 InclDir2 .. InclDirN]
-  [-no_auto_compile]
-  [-abort_if_missing_suites]
-  [-muliply_timetraps Multiplier]
-  [-scale_timetraps]
-  [-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
-  [-basic_html]
-  [-no_esc_chars]
-  [-keep_logs all | NLogs]
-
- -
- Refresh HTML Index Files -
- ct_run -refresh_logs [-logdir LogDir] [-basic_html]
-  [-keep_logs all | NLogs]
-
- -
- Run Common Test in Interactive Mode -
- ct_run -shell
-  [-config ConfigFile1 ConfigFile2 ... ConfigFileN]
-  [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
-   ConfigString2 and .. and CallbackModuleN ConfigStringN]
-  [-decrypt_key Key] | [-decrypt_file KeyFile]
-
- -
- Start a Common Test Master Node -
- ct_run -ctmaster
-
- -
- See Also -

For information about the start flags, see section - Running Tests and Analyzing - Results in the User's Guide.

-
- -
- diff --git a/lib/common_test/doc/src/ct_run_cmd.xml b/lib/common_test/doc/src/ct_run_cmd.xml new file mode 100644 index 0000000000..3a9b8bbc03 --- /dev/null +++ b/lib/common_test/doc/src/ct_run_cmd.xml @@ -0,0 +1,228 @@ + + + + +
+ + 20072017 + Ericsson AB. 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. + + + + The ct_run program + Peter Andersson + Peter Andersson + + + + 2010-04-01 + PA2 + ct_run.xml +
+ ct_run + Program used for starting Common Test from the + OS command line. + + +

The ct_run program is automatically installed with Erlang/OTP + and the Common Test application (for more information, see + section Installation + in the User's Guide). The program accepts different start flags. + Some flags trigger ct_run to start Common Test and + pass on data to it. Some flags start an Erlang node prepared for + running Common Test in a particular mode.

+ +

The interface function + ct:run_test/1, + corresponding to the ct_run program, is used for starting + Common Test from the Erlang shell (or an Erlang program). + For details, see the ct + manual page.

+ +

ct_run also accepts Erlang emulator flags. These are used + when ct_run calls erl to start the Erlang node (this + makes it possible to add directories to the code server path, + change the cookie on the node, start more applications, and so on).

+ +

With the optional flag -erl_args, options on the ct_run + command line can be divided into two groups:

+ + + One group that Common Test is to process (those + preceding -erl_args). + One group that Common Test is to ignore and pass on + directly to the emulator (those following -erl_args). + + +

Options preceding -erl_args that Common Test + does not recognize are also passed on to the emulator untouched. + By -erl_args the user can specify flags with the same name, but + with different destinations, on the ct_run command line.

+ +

If flags -pa or -pz are specified in the + Common Test group of options (preceding -erl_args), + relative directories are converted to absolute and reinserted into + the code path by Common Test. This is to avoid problems + loading user modules when Common Test changes working directory + during test runs. However, Common Test ignores flags -pa + and -pz following -erl_args on the command line. These + directories are added to the code path normally (that is, on specified + form).

+ +

Exit status is set before the program ends. Value 0 indicates + a successful test result, 1 indicates one or more failed or + auto-skipped test cases, and 2 indicates test execution failure.

+ +

If ct_run is called with option -help, it prints all + valid start flags to stdout.

+
+ +
+ + Run Tests from Command Line +
+ ct_run -dir TestDir1 TestDir2 .. TestDirN |
+  [-dir TestDir] -suite Suite1 Suite2 .. SuiteN
+  [-group Groups1 Groups2 .. GroupsN] [-case Case1 Case2 .. CaseN]
+  [-step [config | keep_inactive]]
+  [-config ConfigFile1 ConfigFile2 .. ConfigFileN]
+  [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
+   ConfigString2 and .. CallbackModuleN ConfigStringN]
+  [-decrypt_key Key] | [-decrypt_file KeyFile]
+  [-label Label]
+  [-logdir LogDir]
+  [-logopts LogOpts]
+  [-verbosity GenVLevel | [Category1 VLevel1 and
+   Category2 VLevel2 and .. CategoryN VLevelN]]
+  [-silent_connections [ConnType1 ConnType2 .. ConnTypeN]]
+  [-stylesheet CSSFile]
+  [-cover CoverCfgFile]
+  [-cover_stop Bool]
+  [-event_handler EvHandler1 EvHandler2 .. EvHandlerN] |
+  [-event_handler_init EvHandler1 InitArg1 and
+   EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
+  [-include InclDir1 InclDir2 .. InclDirN]
+  [-no_auto_compile]
+  [-abort_if_missing_suites]
+  [-muliply_timetraps Multiplier]
+  [-scale_timetraps]
+  [-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
+  [-repeat N] |
+  [-duration HHMMSS [-force_stop [skip_rest]]] |
+  [-until [YYMoMoDD]HHMMSS [-force_stop [skip_rest]]]
+  [-basic_html]
+  [-no_esc_chars]
+  [-keep_logs all | NLogs]
+  [-ct_hooks CTHModule1 CTHOpts1 and CTHModule2 CTHOpts2 and ..
+   CTHModuleN CTHOptsN]
+  [-exit_status ignore_config]
+  [-help]
+
+ +
+ Run Tests using Test Specification +
+ ct_run -spec TestSpec1 TestSpec2 .. TestSpecN
+  [-join_specs]
+  [-config ConfigFile1 ConfigFile2 .. ConfigFileN]
+  [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
+   ConfigString2 and .. and CallbackModuleN ConfigStringN]
+  [-decrypt_key Key] | [-decrypt_file KeyFile]
+  [-label Label]
+  [-logdir LogDir]
+  [-logopts LogOpts]
+  [-verbosity GenVLevel | [Category1 VLevel1 and
+   Category2 VLevel2 and .. CategoryN VLevelN]]
+  [-allow_user_terms]
+  [-silent_connections [ConnType1 ConnType2 .. ConnTypeN]]
+  [-stylesheet CSSFile]
+  [-cover CoverCfgFile]
+  [-cover_stop Bool]
+  [-event_handler EvHandler1 EvHandler2 .. EvHandlerN] |
+  [-event_handler_init EvHandler1 InitArg1 and
+   EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
+  [-include InclDir1 InclDir2 .. InclDirN]
+  [-no_auto_compile]
+  [-abort_if_missing_suites]
+  [-muliply_timetraps Multiplier]
+  [-scale_timetraps]
+  [-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
+  [-repeat N] |
+  [-duration HHMMSS [-force_stop [skip_rest]]] |
+  [-until [YYMoMoDD]HHMMSS [-force_stop [skip_rest]]]
+  [-basic_html]
+  [-no_esc_chars]
+  [-keep_logs all | NLogs]
+  [-ct_hooks CTHModule1 CTHOpts1 and CTHModule2 CTHOpts2 and ..
+   CTHModuleN CTHOptsN]
+  [-exit_status ignore_config]
+
+ +
+ Run Tests in Web-Based GUI +
+ ct_run -vts [-browser Browser]
+  [-dir TestDir1 TestDir2 .. TestDirN] |
+  [[dir TestDir] -suite Suite [[-group Group] [-case Case]]]
+  [-config ConfigFile1 ConfigFile2 .. ConfigFileN]
+  [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
+    ConfigString2 and .. and CallbackModuleN ConfigStringN]
+  [-logopts LogOpts]
+  [-verbosity GenVLevel | [Category1 VLevel1 and
+   Category2 VLevel2 and .. CategoryN VLevelN]]
+  [-decrypt_key Key] | [-decrypt_file KeyFile]
+  [-include InclDir1 InclDir2 .. InclDirN]
+  [-no_auto_compile]
+  [-abort_if_missing_suites]
+  [-muliply_timetraps Multiplier]
+  [-scale_timetraps]
+  [-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
+  [-basic_html]
+  [-no_esc_chars]
+  [-keep_logs all | NLogs]
+
+ +
+ Refresh HTML Index Files +
+ ct_run -refresh_logs [-logdir LogDir] [-basic_html]
+  [-keep_logs all | NLogs]
+
+ +
+ Run Common Test in Interactive Mode +
+ ct_run -shell
+  [-config ConfigFile1 ConfigFile2 ... ConfigFileN]
+  [-userconfig CallbackModule1 ConfigString1 and CallbackModule2
+   ConfigString2 and .. and CallbackModuleN ConfigStringN]
+  [-decrypt_key Key] | [-decrypt_file KeyFile]
+
+ +
+ Start a Common Test Master Node +
+ ct_run -ctmaster
+
+ +
+ See Also +

For information about the start flags, see section + Running Tests and Analyzing + Results in the User's Guide.

+
+ +
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 @@ - + 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 @@ -27,95 +27,20 @@ include ../../vsn.mk 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 @@ -26,11 +26,6 @@ include ../../vsn.mk VSN=$(CRYPTO_VSN) APPLICATION=crypto -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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/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 @@ -29,11 +29,6 @@ include ../../vsn.mk VSN=$(DEBUGGER_VSN) APPLICATION=debugger -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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/attach.jpg b/lib/debugger/doc/src/attach.jpg new file mode 100644 index 0000000000..95f227d21b Binary files /dev/null and b/lib/debugger/doc/src/attach.jpg differ diff --git a/lib/debugger/doc/src/cond_break_dialog.jpg b/lib/debugger/doc/src/cond_break_dialog.jpg new file mode 100644 index 0000000000..40bcb299a9 Binary files /dev/null and b/lib/debugger/doc/src/cond_break_dialog.jpg 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 @@

A line breakpoint is created at a certain line in a module.

- + Line Break Dialog Window @@ -185,7 +185,7 @@ int:get_binding(Variable,Bindings). The function returns unbound or {value,Value}.

- + Conditional Break Dialog Window @@ -225,7 +225,7 @@ c_break(Bindings) ->

A function breakpoint is a set of line breakpoints, one at the first line of each clause in the specified function.

- + Function Break Dialog Window @@ -307,7 +307,7 @@ c_break(Bindings) -> modules

- + Monitor Window @@ -593,7 +593,7 @@ c_break(Bindings) ->
 4> c(module, debug_info).
- + Interpret Modules Window @@ -624,7 +624,7 @@ c_break(Bindings) -> been attached to. Notice that when attaching to a process, its execution is automatically stopped.

- + Attach Process Window @@ -819,7 +819,7 @@ c_break(Bindings) ->

The View Module window displays the contents of an interpreted module and makes it possible to set breakpoints.

- + View Module Window diff --git a/lib/debugger/doc/src/function_break_dialog.jpg b/lib/debugger/doc/src/function_break_dialog.jpg new file mode 100644 index 0000000000..db56d5a096 Binary files /dev/null and b/lib/debugger/doc/src/function_break_dialog.jpg differ diff --git a/lib/debugger/doc/src/images/attach.jpg b/lib/debugger/doc/src/images/attach.jpg deleted file mode 100644 index 95f227d21b..0000000000 Binary files a/lib/debugger/doc/src/images/attach.jpg and /dev/null differ diff --git a/lib/debugger/doc/src/images/cond_break_dialog.jpg b/lib/debugger/doc/src/images/cond_break_dialog.jpg deleted file mode 100644 index 40bcb299a9..0000000000 Binary files a/lib/debugger/doc/src/images/cond_break_dialog.jpg and /dev/null differ diff --git a/lib/debugger/doc/src/images/function_break_dialog.jpg b/lib/debugger/doc/src/images/function_break_dialog.jpg deleted file mode 100644 index db56d5a096..0000000000 Binary files a/lib/debugger/doc/src/images/function_break_dialog.jpg and /dev/null differ diff --git a/lib/debugger/doc/src/images/interpret.jpg b/lib/debugger/doc/src/images/interpret.jpg deleted file mode 100644 index 030c06fa23..0000000000 Binary files a/lib/debugger/doc/src/images/interpret.jpg and /dev/null differ diff --git a/lib/debugger/doc/src/images/line_break_dialog.jpg b/lib/debugger/doc/src/images/line_break_dialog.jpg deleted file mode 100644 index 18ac6a9f81..0000000000 Binary files a/lib/debugger/doc/src/images/line_break_dialog.jpg and /dev/null differ diff --git a/lib/debugger/doc/src/images/monitor.jpg b/lib/debugger/doc/src/images/monitor.jpg deleted file mode 100644 index 32f210cbf2..0000000000 Binary files a/lib/debugger/doc/src/images/monitor.jpg and /dev/null differ diff --git a/lib/debugger/doc/src/images/view.jpg b/lib/debugger/doc/src/images/view.jpg deleted file mode 100644 index 7ffd511eff..0000000000 Binary files a/lib/debugger/doc/src/images/view.jpg and /dev/null differ diff --git a/lib/debugger/doc/src/interpret.jpg b/lib/debugger/doc/src/interpret.jpg new file mode 100644 index 0000000000..030c06fa23 Binary files /dev/null and b/lib/debugger/doc/src/interpret.jpg differ diff --git a/lib/debugger/doc/src/line_break_dialog.jpg b/lib/debugger/doc/src/line_break_dialog.jpg new file mode 100644 index 0000000000..18ac6a9f81 Binary files /dev/null and b/lib/debugger/doc/src/line_break_dialog.jpg differ diff --git a/lib/debugger/doc/src/monitor.jpg b/lib/debugger/doc/src/monitor.jpg new file mode 100644 index 0000000000..32f210cbf2 Binary files /dev/null and b/lib/debugger/doc/src/monitor.jpg differ diff --git a/lib/debugger/doc/src/view.jpg b/lib/debugger/doc/src/view.jpg new file mode 100644 index 0000000000..7ffd511eff Binary files /dev/null and b/lib/debugger/doc/src/view.jpg differ diff --git a/lib/dialyzer/doc/src/Makefile b/lib/dialyzer/doc/src/Makefile index 3ce777392b..fc54ff8222 100644 --- a/lib/dialyzer/doc/src/Makefile +++ b/lib/dialyzer/doc/src/Makefile @@ -25,11 +25,6 @@ include ../../vsn.mk VSN=$(DIALYZER_VSN) APPLICATION=dialyzer -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -48,67 +43,4 @@ XML_FILES = \ # ---------------------------------------------------- -TEXT_FILES = \ - ../about.txt \ - ../manual.txt \ - ../warnings.txt - -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/diameter/doc/src/Makefile b/lib/diameter/doc/src/Makefile index 7c7fbeafef..4485a2a74b 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,27 @@ 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 - -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_PART_FILES) $(XML_CHAPTER_FILES) -PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf +XML_GEN_FILES = $(XMLDIR)/seehere.ent $(patsubst %.ent,$(XMLDIR)/%.ent,$(XML_EXTRA_FILES)) -STANDARD_DIR = ../standard +EXTRA_FILES=depend.mk $(XMLDIR)/seehere.ent # ---------------------------------------------------- # 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 + 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 $(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 +61,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.xml deleted file mode 100644 index 8f1c660989..0000000000 --- a/lib/diameter/doc/src/diameterc.xml +++ /dev/null @@ -1,149 +0,0 @@ - -dictionary file'> - - - %also; - %here; -]> - - -
- -20112016 -Ericsson AB. All Rights Reserved. - - - -The program may be used and/or copied only with the written permission -from Ericsson AB, or in accordance with the terms and conditions -stipulated in the agreement/contract under which the program has been -supplied. - - - -diameterc(1) - - - - - -diameterc.xml -
- -diameterc -] ]]> - - - -

-The diameterc utility is used to compile a diameter -&dictionary; into Erlang source. -The resulting source implements the interface diameter required -to encode and decode the dictionary's messages and AVPs.

- -

-The module &man_make; provides an alternate compilation interface.

- -
- -
-USAGE - - - -] ]]> - -

-Compile a single dictionary file to Erlang source. -Valid options are as follows.

- - -]]> - -

-Prepend the specified directory to the code path. -Use to point at beam files compiled from inherited dictionaries, -&dict_inherits; in a dictionary file creating a beam -dependency, not an erl/hrl dependency.

- -

-Multiple -i options can be specified.

-
- -]]> - -

-Write generated source to the specified directory. -Defaults to the current working directory.

-
- - - - -

-Suppress erl and hrl generation, respectively.

-
- -]]> -]]> - -

-Transform the input dictionary before compilation, setting -&dict_name; or &dict_prefix; to the specified -string.

-
- -]]> - -

-Transform the input dictionary before compilation, appending -&dict_inherits; of the specified string.

- -

-Two forms of --inherits have special meaning:

- -
---inherits -
---inherits Prev/Mod
-
- -

-The first has the effect of clearing any previous inherits, the second -of replacing a previous inherits of Prev to one of Mod. -This allows the semantics of the input dictionary to be changed without -modifying the file itself.

- -

-Multiple --inherits options can be specified.

-
- -
- -
-
- -
- - - -
-EXIT STATUS - -

-Returns 0 on success, non-zero on failure.

- -
- - - -
-SEE ALSO - -

-&man_make;, &man_dict;

- -
- -
diff --git a/lib/diameter/doc/src/diameterc_cmd.xml b/lib/diameter/doc/src/diameterc_cmd.xml new file mode 100644 index 0000000000..8f1c660989 --- /dev/null +++ b/lib/diameter/doc/src/diameterc_cmd.xml @@ -0,0 +1,149 @@ + +dictionary file'> + + + %also; + %here; +]> + + +
+ +20112016 +Ericsson AB. All Rights Reserved. + + + +The program may be used and/or copied only with the written permission +from Ericsson AB, or in accordance with the terms and conditions +stipulated in the agreement/contract under which the program has been +supplied. + + + +diameterc(1) + + + + + +diameterc.xml +
+ +diameterc +] ]]> + + + +

+The diameterc utility is used to compile a diameter +&dictionary; into Erlang source. +The resulting source implements the interface diameter required +to encode and decode the dictionary's messages and AVPs.

+ +

+The module &man_make; provides an alternate compilation interface.

+ +
+ +
+USAGE + + + +] ]]> + +

+Compile a single dictionary file to Erlang source. +Valid options are as follows.

+ + +]]> + +

+Prepend the specified directory to the code path. +Use to point at beam files compiled from inherited dictionaries, +&dict_inherits; in a dictionary file creating a beam +dependency, not an erl/hrl dependency.

+ +

+Multiple -i options can be specified.

+
+ +]]> + +

+Write generated source to the specified directory. +Defaults to the current working directory.

+
+ + + + +

+Suppress erl and hrl generation, respectively.

+
+ +]]> +]]> + +

+Transform the input dictionary before compilation, setting +&dict_name; or &dict_prefix; to the specified +string.

+
+ +]]> + +

+Transform the input dictionary before compilation, appending +&dict_inherits; of the specified string.

+ +

+Two forms of --inherits have special meaning:

+ +
+--inherits -
+--inherits Prev/Mod
+
+ +

+The first has the effect of clearing any previous inherits, the second +of replacing a previous inherits of Prev to one of Mod. +This allows the semantics of the input dictionary to be changed without +modifying the file itself.

+ +

+Multiple --inherits options can be specified.

+
+ +
+ +
+
+ +
+ + + +
+EXIT STATUS + +

+Returns 0 on success, non-zero on failure.

+ +
+ + + +
+SEE ALSO + +

+&man_make;, &man_dict;

+ +
+ +
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.

- + 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 @@ -24,23 +24,11 @@ include ../../vsn.mk 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 @@ -26,11 +26,6 @@ include ../../vsn.mk VSN=$(ELDAP_VSN) APPLICATION=eldap -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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..12402edb21 100644 --- a/lib/erl_docgen/doc/src/Makefile +++ b/lib/erl_docgen/doc/src/Makefile @@ -28,11 +28,6 @@ include ../../vsn.mk VSN=$(ERL_DOCGEN_VSN) APPLICATION=erl_docgen -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -64,75 +59,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/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_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.xml deleted file mode 100644 index 91cb9dbd32..0000000000 --- a/lib/erl_interface/doc/src/erl_call.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - -
- - 19962017 - Ericsson AB. 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. - - - - erl_call - Torbjörn Törnkvist - Torbjörn Törnkvist - - Bjarne Däcker - Torbjörn Törnkvist - 1997-05-16 - B - erl_call.xml -
- erl_call - Call/start a distributed Erlang node. - -

erl_call makes it possible to start and/or - communicate with a distributed Erlang node. It is built upon the - Erl_Interface library as an example application. - Its purpose is to use a Unix shell script to interact with a distributed - Erlang node. It performs all communication with the Erlang - rex server, using the standard Erlang RPC facility. It does not - require any special software to be run at the Erlang target node.

- -

The main use is to either start a distributed Erlang node - or to make an ordinary function call. However, it is also - possible to pipe an Erlang module to erl_call and have - it compiled, or to pipe a sequence of Erlang expressions to be evaluated - (similar to the Erlang shell).

- -

Options, which cause stdin to be read, can be used - with advantage, - as scripts from within (Unix) shell scripts. Another nice use - of erl_call could be from (HTTP) CGI-bin scripts.

-
- - - - erl_call <options> - Start/call Erlang. - -

Starts/calls Erlang.

-

Each option flag is described below with its name, type, and - meaning.

- - -a [Mod [Fun [Args]]]] - -

(Optional.) Applies the specified function - and returns the result. Mod must be specified. - However, start and [] are assumed for unspecified - Fun and Args, respectively. - Args is to be in the same format as for - - erlang:apply/3 in ERTS.

-

Notice that this flag takes exactly one argument, so quoting - can be necessary to group Mod, - Fun, and Args in a manner - dependent on the behavior of your command shell.

-
- -address [Hostname:]Port - -

(One of -n, -name, -sname or - -address is required.) Hostname is the - hostname of the machine that is running the node that - erl_call shall communicate with. The default - hostname is the hostname of the local machine. Port - is the port number of the node that erl_call shall - communicate with. The -address flag cannot be - combined with any of the flags -n, -name, - -sname or -s.

-

The -address flag is typically useful when one - wants to call a node that is running on machine without an - accessible epmd - instance.

-
- -c Cookie - -

(Optional.) Use this option to specify a certain cookie. - If no cookie is specified, the ~/.erlang.cookie - file is read and its content is used as cookie. The Erlang node - we want to communicate with must have the same cookie.

-
- -d - -

(Optional.) Debug mode. This causes all I/O to be output - to the ~/.erl_call.out.Nodename file, where - Nodename - is the node name of the Erlang node in question.

-
- -e - -

(Optional.) Reads a sequence of Erlang expressions, - separated by comma (,) and ended with a full stop (.), from - stdin until EOF (Control-D). Evaluates the - expressions and returns the result from the last expression. - Returns {ok,Result} on success.

-
- -h HiddenName - -

(Optional.) Specifies the name of the hidden node - that erl_call represents.

-
- -m - -

(Optional.) Reads an Erlang module from - stdin and compiles it.

-
- -n Node - -

(One of -n, -name, -sname or - -address is required.) - Has the same meaning as -name and can still be - used for backward compatibility reasons.

-
- -name Node - -

(One of -n, -name, -sname or - -address is required.) - Node is the name of the node to be - started or communicated with. It is assumed that - Node is started with - erl -name, which means that fully - qualified long node names are used. If option - -s is specified, an Erlang node will (if - necessary) be started with erl -name.

-
- -q - -

(Optional.) Halts the Erlang node specified - with switch -n. This switch overrides switch -s.

-
- -r - -

(Optional.) Generates a random name of the hidden node - that erl_call represents.

-
- -s - -

(Optional.) Starts a distributed Erlang node if - necessary. This means that in a sequence of calls, where - '-s' and '-n Node' are - constant, only the first call starts the Erlang node. This makes - the rest of the communication very fast. This flag is currently - only available on Unix-like platforms (Linux, Mac OS X, Solaris, - and so on).

-
- -sname Node - -

(One of -n, -name, -sname or - -address is required.) - Node is the name of the node to be started - or communicated with. It is assumed that Node - is started with erl -sname, which means that - short node names are used. If option -s is - specified, an Erlang node is started (if necessary) with - erl -sname.

-
- -v - -

(Optional.) Prints a lot of verbose - information. This is only useful for the developer and maintainer - of erl_call.

-
- -x ErlScript - -

(Optional.) Specifies another name of the Erlang - startup script to be used. If not specified, the standard - erl startup script is used.

-
-
-
-
-
- -
- Examples -

To start an Erlang node and call erlang:time/0:

- - - -

To terminate an Erlang node by calling - erlang:halt/0:

- - - -

To apply with many arguments:

- - - -

To evaluate some expressions - (the input ends with EOF (Control-D)):

- - - -

To compile a module and run it (again, the input ends with EOF - (Control-D)):

-

(In the example, the output has been formatted afterwards.)

- - - P = processes(), - F = fun(X) -> {X,process_info(X,registered_name)} end, - lists:map(F,[],P). -^D -[{, - {registered_name,init}}, - {, - {registered_name,erl_prim_loader}}, - {, - {registered_name,error_logger}}, - {, - {registered_name,application_controller}}, - {, - {registered_name,kernel}}, - {, - []}, - {, - {registered_name,kernel_sup}}, - {, - {registered_name,net_sup}}, - {, - {registered_name,net_kernel}}, - {, - []}, - {, - {registered_name,global_name_server}}, - {, - {registered_name,auth}}, - {, - {registered_name,rex}}, - {, - []}, - {, - {registered_name,file_server}}, - {, - {registered_name,code_server}}, - {, - {registered_name,user}}, - {, - []}] - ]]> -
-
diff --git a/lib/erl_interface/doc/src/erl_call_cmd.xml b/lib/erl_interface/doc/src/erl_call_cmd.xml new file mode 100644 index 0000000000..91cb9dbd32 --- /dev/null +++ b/lib/erl_interface/doc/src/erl_call_cmd.xml @@ -0,0 +1,283 @@ + + + + +
+ + 19962017 + Ericsson AB. 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. + + + + erl_call + Torbjörn Törnkvist + Torbjörn Törnkvist + + Bjarne Däcker + Torbjörn Törnkvist + 1997-05-16 + B + erl_call.xml +
+ erl_call + Call/start a distributed Erlang node. + +

erl_call makes it possible to start and/or + communicate with a distributed Erlang node. It is built upon the + Erl_Interface library as an example application. + Its purpose is to use a Unix shell script to interact with a distributed + Erlang node. It performs all communication with the Erlang + rex server, using the standard Erlang RPC facility. It does not + require any special software to be run at the Erlang target node.

+ +

The main use is to either start a distributed Erlang node + or to make an ordinary function call. However, it is also + possible to pipe an Erlang module to erl_call and have + it compiled, or to pipe a sequence of Erlang expressions to be evaluated + (similar to the Erlang shell).

+ +

Options, which cause stdin to be read, can be used + with advantage, + as scripts from within (Unix) shell scripts. Another nice use + of erl_call could be from (HTTP) CGI-bin scripts.

+
+ + + + erl_call <options> + Start/call Erlang. + +

Starts/calls Erlang.

+

Each option flag is described below with its name, type, and + meaning.

+ + -a [Mod [Fun [Args]]]] + +

(Optional.) Applies the specified function + and returns the result. Mod must be specified. + However, start and [] are assumed for unspecified + Fun and Args, respectively. + Args is to be in the same format as for + + erlang:apply/3 in ERTS.

+

Notice that this flag takes exactly one argument, so quoting + can be necessary to group Mod, + Fun, and Args in a manner + dependent on the behavior of your command shell.

+
+ -address [Hostname:]Port + +

(One of -n, -name, -sname or + -address is required.) Hostname is the + hostname of the machine that is running the node that + erl_call shall communicate with. The default + hostname is the hostname of the local machine. Port + is the port number of the node that erl_call shall + communicate with. The -address flag cannot be + combined with any of the flags -n, -name, + -sname or -s.

+

The -address flag is typically useful when one + wants to call a node that is running on machine without an + accessible epmd + instance.

+
+ -c Cookie + +

(Optional.) Use this option to specify a certain cookie. + If no cookie is specified, the ~/.erlang.cookie + file is read and its content is used as cookie. The Erlang node + we want to communicate with must have the same cookie.

+
+ -d + +

(Optional.) Debug mode. This causes all I/O to be output + to the ~/.erl_call.out.Nodename file, where + Nodename + is the node name of the Erlang node in question.

+
+ -e + +

(Optional.) Reads a sequence of Erlang expressions, + separated by comma (,) and ended with a full stop (.), from + stdin until EOF (Control-D). Evaluates the + expressions and returns the result from the last expression. + Returns {ok,Result} on success.

+
+ -h HiddenName + +

(Optional.) Specifies the name of the hidden node + that erl_call represents.

+
+ -m + +

(Optional.) Reads an Erlang module from + stdin and compiles it.

+
+ -n Node + +

(One of -n, -name, -sname or + -address is required.) + Has the same meaning as -name and can still be + used for backward compatibility reasons.

+
+ -name Node + +

(One of -n, -name, -sname or + -address is required.) + Node is the name of the node to be + started or communicated with. It is assumed that + Node is started with + erl -name, which means that fully + qualified long node names are used. If option + -s is specified, an Erlang node will (if + necessary) be started with erl -name.

+
+ -q + +

(Optional.) Halts the Erlang node specified + with switch -n. This switch overrides switch -s.

+
+ -r + +

(Optional.) Generates a random name of the hidden node + that erl_call represents.

+
+ -s + +

(Optional.) Starts a distributed Erlang node if + necessary. This means that in a sequence of calls, where + '-s' and '-n Node' are + constant, only the first call starts the Erlang node. This makes + the rest of the communication very fast. This flag is currently + only available on Unix-like platforms (Linux, Mac OS X, Solaris, + and so on).

+
+ -sname Node + +

(One of -n, -name, -sname or + -address is required.) + Node is the name of the node to be started + or communicated with. It is assumed that Node + is started with erl -sname, which means that + short node names are used. If option -s is + specified, an Erlang node is started (if necessary) with + erl -sname.

+
+ -v + +

(Optional.) Prints a lot of verbose + information. This is only useful for the developer and maintainer + of erl_call.

+
+ -x ErlScript + +

(Optional.) Specifies another name of the Erlang + startup script to be used. If not specified, the standard + erl startup script is used.

+
+
+
+
+
+ +
+ Examples +

To start an Erlang node and call erlang:time/0:

+ + + +

To terminate an Erlang node by calling + erlang:halt/0:

+ + + +

To apply with many arguments:

+ + + +

To evaluate some expressions + (the input ends with EOF (Control-D)):

+ + + +

To compile a module and run it (again, the input ends with EOF + (Control-D)):

+

(In the example, the output has been formatted afterwards.)

+ + + P = processes(), + F = fun(X) -> {X,process_info(X,registered_name)} end, + lists:map(F,[],P). +^D +[{, + {registered_name,init}}, + {, + {registered_name,erl_prim_loader}}, + {, + {registered_name,error_logger}}, + {, + {registered_name,application_controller}}, + {, + {registered_name,kernel}}, + {, + []}, + {, + {registered_name,kernel_sup}}, + {, + {registered_name,net_sup}}, + {, + {registered_name,net_kernel}}, + {, + []}, + {, + {registered_name,global_name_server}}, + {, + {registered_name,auth}}, + {, + {registered_name,rex}}, + {, + []}, + {, + {registered_name,file_server}}, + {, + {registered_name,code_server}}, + {, + {registered_name,user}}, + {, + []}] + ]]> +
+
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 @@ - + 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/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/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 @@ -28,44 +28,23 @@ include ../../vsn.mk 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 @@ -27,11 +27,6 @@ include ../../vsn.mk VSN=$(HIPE_VSN) APPLICATION=hipe -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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..e7d7b52174 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,9 @@ XML_FILES = \ $(XML_REF3_FILES) \ $(XML_APPLICATION_FILES) -# GIF_FILES = inets.gif +# IMAGE_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)/%) - -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/jinterface/doc/src/Makefile b/lib/jinterface/doc/src/Makefile index f5cba9d074..21fe3f91d5 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,22 @@ 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 +NO_CHUNKS=yes # ---------------------------------------------------- -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..8b6de0e7dd 100644 --- a/lib/kernel/doc/src/Makefile +++ b/lib/kernel/doc/src/Makefile @@ -27,11 +27,6 @@ include ../../vsn.mk VSN=$(KERNEL_VSN) APPLICATION=kernel -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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,15 @@ $(SPECDIR)/specs_zlib_stub.xml: $(gen_verbose)escript $(SPECS_EXTRACTOR) $(SPECS_FLAGS) \ -o$(dir $@) -module zlib_stub - # ---------------------------------------------------- -# 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/megaco/doc/src/Makefile b/lib/megaco/doc/src/Makefile index 5e085b60b0..99f9d4ab2d 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,18 @@ 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" - -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/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/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 @@ -29,11 +29,6 @@ include ../../vsn.mk VSN=$(MNESIA_VSN) APPLICATION=mnesia -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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/observer/doc/src/Makefile b/lib/observer/doc/src/Makefile index e843772f0b..ded5212461 100644 --- a/lib/observer/doc/src/Makefile +++ b/lib/observer/doc/src/Makefile @@ -26,17 +26,12 @@ include ../../vsn.mk 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,14 @@ 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 -# ---------------------------------------------------- - -$(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.xml deleted file mode 100644 index df1032780a..0000000000 --- a/lib/observer/doc/src/cdv.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - -
- - 20032016 - Ericsson AB. 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. - - - - The cdv program - Siri Hansen - Siri Hansen - - - - 2013-10-015 - PA1 - cdv.xml -
- cdv - Script to start the Crashdump Viewer from the - OS command line. - - - -

The cdv shell script is located in directory priv - of the Observer application. The script is used - for starting the Crashdump Viewer tool from the OS command - line.

-

For Windows users, cdv.bat is found in the same - location.

-
- - - - cdv [file] - Start the Crashdump Viewer and load the given file. - -

Argument file is optional. If not specified, a file - dialog is displayed, allowing you to select a crashdump - from the file system.

-
-
-
- -
diff --git a/lib/observer/doc/src/cdv_cmd.xml b/lib/observer/doc/src/cdv_cmd.xml new file mode 100644 index 0000000000..32f8f392cd --- /dev/null +++ b/lib/observer/doc/src/cdv_cmd.xml @@ -0,0 +1,61 @@ + + + + +
+ + 20032016 + Ericsson AB. 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. + + + + The cdv program + Siri Hansen + Siri Hansen + + + + 2013-10-015 + PA1 + cdv.xml +
+ cdv + Script to start the Crashdump Viewer from the + OS command line. + + + +

The cdv shell script is located in directory priv + of the Observer application. The script is used + for starting the Crashdump Viewer tool from the OS command + line.

+

For Windows users, cdv.bat is found in the same + location.

+
+ + + + cdv [file] + Start the Crashdump Viewer and load the given file. + +

Argument file is optional. If not specified, a file + dialog is displayed, allowing you to select a crashdump + from the file system.

+
+
+
+ +
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 @@ - + 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 @@ -29,11 +29,6 @@ include ../../vsn.mk VSN=$(ODBC_VSN) APPLICATION=odbc -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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 @@ -27,11 +27,6 @@ include ../../vsn.mk VSN=$(OS_MON_VSN) APPLICATION=os_mon -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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 @@ -28,11 +28,6 @@ include ../../vsn.mk VSN=$(PARSETOOLS_VSN) APPLICATION=parsetools -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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/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 @@ -29,10 +29,6 @@ include ../../vsn.mk VSN=$(PUBLIC_KEY_VSN) APPLICATION=public_key -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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 @@ -27,85 +27,10 @@ include ../../vsn.mk 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/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 @@ -32,11 +32,6 @@ include ../../vsn.mk VSN=$(RUNTIME_TOOLS_VSN) APPLICATION=runtime_tools -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -64,36 +59,10 @@ 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 # ---------------------------------------------------- @@ -101,46 +70,6 @@ SPECS_FLAGS = -I../../include -I../../../kernel/src $(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/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 @@ -26,11 +26,6 @@ include ../../vsn.mk VSN=$(SASL_VSN) APPLICATION=sasl -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -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..4d3fe126fd 100644 --- a/lib/snmp/doc/src/Makefile +++ b/lib/snmp/doc/src/Makefile @@ -28,11 +28,6 @@ include ../../vsn.mk VSN = $(SNMP_VSN) APPLICATION=snmp -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -58,89 +53,9 @@ 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 += - # ---------------------------------------------------- # 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 +65,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/ssh/doc/src/Makefile b/lib/ssh/doc/src/Makefile index 4e32dd9976..47a6db1759 100644 --- a/lib/ssh/doc/src/Makefile +++ b/lib/ssh/doc/src/Makefile @@ -29,11 +29,6 @@ include ../../vsn.mk VSN=$(SSH_VSN) APPLICATION=ssh -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -67,87 +62,7 @@ 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../../.. - -# ---------------------------------------------------- -# 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/ssl/doc/src/Makefile b/lib/ssl/doc/src/Makefile index 064131944c..b758eb0109 100644 --- a/lib/ssl/doc/src/Makefile +++ b/lib/ssl/doc/src/Makefile @@ -29,11 +29,6 @@ include ../../vsn.mk VSN=$(SSL_VSN) APPLICATION=ssl -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -55,86 +50,7 @@ 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: - -# ---------------------------------------------------- -# 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/stdlib/doc/src/Makefile b/lib/stdlib/doc/src/Makefile index 4541b4a463..2faee613a2 100644 --- a/lib/stdlib/doc/src/Makefile +++ b/lib/stdlib/doc/src/Makefile @@ -27,11 +27,6 @@ include ../../vsn.mk VSN=$(STDLIB_VSN) APPLICATION=stdlib -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -113,74 +108,10 @@ 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" - -release_spec: +include $(ERL_TOP)/make/doc.mk 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 @@ -27,22 +27,11 @@ include ../../vsn.mk 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..465eb3aea3 100644 --- a/lib/tools/doc/src/Makefile +++ b/lib/tools/doc/src/Makefile @@ -27,11 +27,6 @@ include ../../vsn.mk VSN=$(TOOLS_VSN) APPLICATION=tools -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN) - # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- @@ -60,89 +55,23 @@ 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) - -# ---------------------------------------------------- -# 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 '' > $(SPECDIR)/specs_erlang_mode.xml + $(gen_verbose)echo '' > $(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/wx/doc/src/Makefile b/lib/wx/doc/src/Makefile index f66d63f63b..a458baa6b9 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_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 " " >> $@ ; \ done @echo "" >> $@ - -$(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 @@ -27,34 +27,20 @@ include ../../vsn.mk 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/make/doc.mk b/make/doc.mk new file mode 100644 index 0000000000..50a4614227 --- /dev/null +++ b/make/doc.mk @@ -0,0 +1,179 @@ +# +# %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 + +APP_DIR = $(ERL_TOP)/lib/$(APPLICATION)/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 + + +# ---------------------------------------------------- +# 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) $< $@ + +docs: man pdf html $(INFO_FILE) + +$(TOP_PDF_FILE): $(XML_FILES) + +pdf: $(TOP_PDF_FILE) + +html: images $(HTML_REF_MAN_FILE) + +man: $(MAN1_FILES) $(MAN2_FILES) $(MAN3_FILES) $(MAN4_FILES) $(MAN5_FILES) $(MAN6_FILES) $(MAN7_FILES) + +images: $(IMAGE_FILES:%=$(HTMLDIR)/%) + +$(EDOC_REF3_FILES:%=$(XMLDIR)/%): $(APP_DIR)/$(@:$(XMLDIR)/%.xml=%.erl) + $(gen_verbose)escript $(DOCGEN)/priv/bin/xml_from_edoc.escript \ + -def vsn $(VSN) $(EDOC_FLAGS) -dir $(XMLDIR) $(APP_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 + 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)/* + +# ---------------------------------------------------- +# 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_DIR_DATA) $(HTMLDIR) "$(RELSYSDIR)/doc/html" +ifneq ($(HTML_EXTRA_FILES),) + $(INSTALL_DATA) $(HTML_EXTRA_FILES) "$(RELSYSDIR)/doc/html" +endif + $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)" +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 +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 \ + release_docs_spec release_spec diff --git a/make/otp.mk.in b/make/otp.mk.in index 54ec6b7a53..0abbfeae18 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -226,7 +226,9 @@ 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 = . @@ -287,14 +289,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 $< diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk index c629a7d143..eeca2dd5da 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)" \ -- cgit v1.2.1 From 82d5f9e99343b7060bb27c0dead167f2c104235d Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 3 Feb 2020 17:38:49 +0100 Subject: doc: Move typer cli app to REF1 section --- lib/dialyzer/doc/src/Makefile | 6 +- lib/dialyzer/doc/src/ref_man.xml | 3 +- lib/dialyzer/doc/src/typer.xml | 157 ------------------------------------- lib/dialyzer/doc/src/typer_cmd.xml | 157 +++++++++++++++++++++++++++++++++++++ 4 files changed, 162 insertions(+), 161 deletions(-) delete mode 100644 lib/dialyzer/doc/src/typer.xml create mode 100644 lib/dialyzer/doc/src/typer_cmd.xml diff --git a/lib/dialyzer/doc/src/Makefile b/lib/dialyzer/doc/src/Makefile index fc54ff8222..bcceb3b661 100644 --- a/lib/dialyzer/doc/src/Makefile +++ b/lib/dialyzer/doc/src/Makefile @@ -29,7 +29,8 @@ APPLICATION=dialyzer # 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 @@ -38,7 +39,8 @@ BOOK_FILES = book.xml XML_FILES = \ $(BOOK_FILES) $(XML_CHAPTER_FILES) \ - $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES) + $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF1_FILES) \ + $(XML_APPLICATION_FILES) # ---------------------------------------------------- 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 @@ - + - diff --git a/lib/dialyzer/doc/src/typer.xml b/lib/dialyzer/doc/src/typer.xml deleted file mode 100644 index 524956ed4b..0000000000 --- a/lib/dialyzer/doc/src/typer.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - -
- - 20062017 - Ericsson AB. 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. - - - - typer - - - 2017-04-13 - - type.xml -
- typer - Typer, a Type annotator for ERlang programs. - - -

TypEr shows type information for Erlang modules to the user. - Additionally, it can annotate the code of files with such type - information.

-
- -
- - Using TypEr from the Command Line -

TypEr is used from the command-line. This section provides a - brief description of the options. The same information can be - obtained by writing the following in a shell:

- - -typer --help - -

Usage:

- - -typer [--help] [--version] [--plt PLT] [--edoc] - [--show | --show-exported | --annotate | --annotate-inc-files] - [-Ddefine]* [-I include_dir]* [-pa dir]* [-pz dir]* - [-T application]* [-r] file* - - -

* denotes that multiple occurrences of the option are possible.

-
- -

Options:

- - - - -r - -

Search directories recursively for .erl files below them.

-
- --show - -

Print type specifications for all functions on stdout. - (This is the default behaviour; this option is not really - needed.)

-
- - --show-exported (or show_exported) - -

Same as --show, but print specifications for - exported functions only. Specs are displayed sorted - alphabetically on the function's name.

-
- - --annotate - -

Annotate the specified files with type specifications.

-
- - --annotate-inc-files - -

Same as --annotate but annotates all - -include() files as well as all .erl files. (Use this - option with caution - it has not been tested much).

-
- - --edoc - -

Print type information as Edoc @spec comments, not - as type specs.

-
- - --plt - -

Use the specified dialyzer PLT file rather than the default one.

-
- - -T file* - -

The specified file(s) already contain type specifications - and these are to be trusted in order to print specs for the - rest of the files. (Multiple files or dirs, separated by - spaces, can be specified.)

-
- - -Dname (or -Dname=value) - -

Pass the defined name(s) to TypEr. (**)

-
- - -I - -

Pass the include_dir to TypEr. (**)

-
- - -pa dir - -

Include dir in the path for Erlang. This is useful - when analyzing files that have -include_lib() - directives or use parse transforms.

-
- - -pz dir - -

Include dir in the path for Erlang. This is useful - when analyzing files that have -include_lib() - directives or use parse transforms.

-
- - --version (or -v) - -

Print the TypEr version and some more information and - exit.

-
- -
- - -

** options -D and -I work both - from the command line and in the TypEr GUI; the syntax of - defines and includes is the same as that used by - erlc(1).

-
- -
- -
diff --git a/lib/dialyzer/doc/src/typer_cmd.xml b/lib/dialyzer/doc/src/typer_cmd.xml new file mode 100644 index 0000000000..b9e75bdd2a --- /dev/null +++ b/lib/dialyzer/doc/src/typer_cmd.xml @@ -0,0 +1,157 @@ + + + + +
+ + 20062017 + Ericsson AB. 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. + + + + typer + + + 2017-04-13 + + type.xml +
+ typer + Typer, a Type annotator for ERlang programs. + + +

TypEr shows type information for Erlang modules to the user. + Additionally, it can annotate the code of files with such type + information.

+
+ +
+ + Using TypEr from the Command Line +

TypEr is used from the command-line. This section provides a + brief description of the options. The same information can be + obtained by writing the following in a shell:

+ + +typer --help + +

Usage:

+ + +typer [--help] [--version] [--plt PLT] [--edoc] + [--show | --show-exported | --annotate | --annotate-inc-files] + [-Ddefine]* [-I include_dir]* [-pa dir]* [-pz dir]* + [-T application]* [-r] file* + + +

* denotes that multiple occurrences of the option are possible.

+
+ +

Options:

+ + + + -r + +

Search directories recursively for .erl files below them.

+
+ --show + +

Print type specifications for all functions on stdout. + (This is the default behaviour; this option is not really + needed.)

+
+ + --show-exported (or show_exported) + +

Same as --show, but print specifications for + exported functions only. Specs are displayed sorted + alphabetically on the function's name.

+
+ + --annotate + +

Annotate the specified files with type specifications.

+
+ + --annotate-inc-files + +

Same as --annotate but annotates all + -include() files as well as all .erl files. (Use this + option with caution - it has not been tested much).

+
+ + --edoc + +

Print type information as Edoc @spec comments, not + as type specs.

+
+ + --plt + +

Use the specified dialyzer PLT file rather than the default one.

+
+ + -T file* + +

The specified file(s) already contain type specifications + and these are to be trusted in order to print specs for the + rest of the files. (Multiple files or dirs, separated by + spaces, can be specified.)

+
+ + -Dname (or -Dname=value) + +

Pass the defined name(s) to TypEr. (**)

+
+ + -I + +

Pass the include_dir to TypEr. (**)

+
+ + -pa dir + +

Include dir in the path for Erlang. This is useful + when analyzing files that have -include_lib() + directives or use parse transforms.

+
+ + -pz dir + +

Include dir in the path for Erlang. This is useful + when analyzing files that have -include_lib() + directives or use parse transforms.

+
+ + --version (or -v) + +

Print the TypEr version and some more information and + exit.

+
+ +
+ + +

** options -D and -I work both + from the command line and in the TypEr GUI; the syntax of + defines and includes is the same as that used by + erlc(1).

+
+ +
+ +
-- cgit v1.2.1 From 1cd2aacc52841cca4a95838ce68961176454d01a Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 18 Feb 2020 17:08:26 +0100 Subject: Implement EEP-48 aka doc chunks --- .gitignore | 2 + erts/doc/src/Makefile | 2 +- erts/test/otp_SUITE.erl | 6 +- lib/common_test/doc/src/Makefile | 2 + lib/diameter/doc/src/Makefile | 2 + lib/erl_docgen/priv/bin/chunk.escript | 740 +++++++++++++++++++++++++++ lib/erl_docgen/src/docgen_edoc_xml_cb.erl | 2 +- lib/inets/doc/src/Makefile | 3 +- lib/jinterface/doc/src/Makefile | 2 - lib/kernel/doc/src/Makefile | 3 + lib/kernel/doc/src/code.xml | 17 + lib/kernel/doc/src/documentation_chapter.xml | 45 ++ lib/kernel/doc/src/part.xml | 1 + lib/kernel/include/eep48.hrl | 14 + lib/kernel/src/Makefile | 3 +- lib/kernel/src/code.erl | 94 +++- lib/kernel/src/kernel.app.src | 3 +- lib/megaco/doc/src/Makefile | 5 + lib/mnesia/doc/src/Mnesia_chap4.xmlsrc | 6 +- lib/observer/doc/src/Makefile | 2 + lib/observer/doc/src/ttb_ug.xml | 4 +- lib/snmp/doc/src/Makefile | 12 + lib/ssh/doc/src/Makefile | 2 + lib/ssl/doc/src/Makefile | 2 + lib/stdlib/doc/src/Makefile | 3 + lib/stdlib/doc/src/c.xml | 58 +++ lib/stdlib/doc/src/ref_man.xml | 1 + lib/stdlib/doc/src/shell_docs.xml | 107 ++++ lib/stdlib/doc/src/specs.xml | 1 + lib/stdlib/src/Makefile | 1 + lib/stdlib/src/c.erl | 82 +++ lib/stdlib/src/edlin_expand.erl | 44 +- lib/stdlib/src/shell_default.erl | 15 +- lib/stdlib/src/shell_docs.erl | 672 ++++++++++++++++++++++++ lib/stdlib/src/stdlib.app.src | 1 + lib/stdlib/test/Makefile | 1 + lib/stdlib/test/shell_docs_SUITE.erl | 88 ++++ lib/tools/doc/src/Makefile | 2 + lib/xmerl/doc/src/xmerl_sax_parser.xml | 4 +- make/doc.mk | 22 +- make/otp.mk.in | 7 + scripts/build-otp | 2 + 42 files changed, 2053 insertions(+), 32 deletions(-) create mode 100644 lib/erl_docgen/priv/bin/chunk.escript create mode 100644 lib/kernel/doc/src/documentation_chapter.xml create mode 100644 lib/kernel/include/eep48.hrl create mode 100644 lib/stdlib/doc/src/shell_docs.xml create mode 100644 lib/stdlib/src/shell_docs.erl create mode 100644 lib/stdlib/test/shell_docs_SUITE.erl diff --git a/.gitignore b/.gitignore index 485acca50d..f06f8291f4 100644 --- a/.gitignore +++ b/.gitignore @@ -186,6 +186,7 @@ JAVADOC-GENERATED /lib/*/doc/src/*.fo /lib/*/doc/xml/*.xml /lib/*/doc/xml/*.ent +/lib/*/doc/chunks/*.chunk /lib/config.log /lib/config.status @@ -285,6 +286,7 @@ JAVADOC-GENERATED /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/erts/doc/src/Makefile b/erts/doc/src/Makefile index 2e13620b13..8b90fa751c 100644 --- a/erts/doc/src/Makefile +++ b/erts/doc/src/Makefile @@ -132,7 +132,7 @@ HTML_EXTRA_FILES = $(ERL_TOP)/erts/example/time_compat.erl \ XML_GEN_FILES = $(XML_INTERNAL_FILES:%=$(XMLDIR)/%) -NO_CHUNKS = $(XML_REF3_CREF) +NO_CHUNKS = $(XML_REF3_CREF) erl_tracer.xml # ---------------------------------------------------- diff --git a/erts/test/otp_SUITE.erl b/erts/test/otp_SUITE.erl index b5f15ebb10..3f4f3f9574 100644 --- a/erts/test/otp_SUITE.erl +++ b/erts/test/otp_SUITE.erl @@ -97,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/common_test/doc/src/Makefile b/lib/common_test/doc/src/Makefile index 55ab5e5cc1..3a37cac09c 100644 --- a/lib/common_test/doc/src/Makefile +++ b/lib/common_test/doc/src/Makefile @@ -86,6 +86,8 @@ XML_FILES=$(XML_APPLICATION_FILES) $(XML_REF1_FILES) $(XML_REF3_FILES) $(XML_RE TOP_SPECS_FILE = specs.xml +NO_CHUNKS = ct_hooks.xml + # ---------------------------------------------------- include $(ERL_TOP)/make/doc.mk diff --git a/lib/diameter/doc/src/Makefile b/lib/diameter/doc/src/Makefile index 4485a2a74b..bac562f815 100644 --- a/lib/diameter/doc/src/Makefile +++ b/lib/diameter/doc/src/Makefile @@ -39,6 +39,8 @@ XML_GEN_FILES = $(XMLDIR)/seehere.ent $(patsubst %.ent,$(XMLDIR)/%.ent,$(XML_EXT EXTRA_FILES=depend.mk $(XMLDIR)/seehere.ent +NO_CHUNKS = diameter_app.xml diameter_transport.xml + # ---------------------------------------------------- # Targets # ---------------------------------------------------- diff --git a/lib/erl_docgen/priv/bin/chunk.escript b/lib/erl_docgen/priv/bin/chunk.escript new file mode 100644 index 0000000000..8b37a88166 --- /dev/null +++ b/lib/erl_docgen/priv/bin/chunk.escript @@ -0,0 +1,740 @@ +#!/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 +%% +%% Does translation of Erlang XML docs to EEP-48 doc chunks. +%%---------------------------------------------------------------------- + +-mode(compile). + +-include_lib("kernel/include/eep48.hrl"). + +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 + 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 = [{" ",[160]}, + {"×",[215]}, + {"±",[177]}, + {"ö","ö"}, + {"ä","ä"}, + {"å","å"} + ], + + 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,[<<"<">>]} -> ok; + {match,[<<">">>]} -> 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:map(fun({_M,_F,_A,true}) -> + ok + end,Exported), + + try + shell_docs:validate(Doc) + catch Err -> + throw({binary_to_term(maps:get(<<"en">>,Doc#docs_v1.module_doc)), Err}) + end. + +%% skip 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
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 to