diff options
author | Lukas Larsson <[email protected]> | 2018-04-12 10:16:41 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-04-12 10:16:41 +0200 |
commit | 0f4e092e58929a9a517eb17653f4ec217f2a9132 (patch) | |
tree | d7f9ecebec69ebf5f08018b60113a45f78453213 /lib/erl_docgen/priv/bin/xml_from_edoc.escript | |
parent | cb9fb22d0798f162c8a580d2f6751d7de0ae63dd (diff) | |
parent | a26796d0552c737baf26e4916e8d9014215bc301 (diff) | |
download | otp-0f4e092e58929a9a517eb17653f4ec217f2a9132.tar.gz otp-0f4e092e58929a9a517eb17653f4ec217f2a9132.tar.bz2 otp-0f4e092e58929a9a517eb17653f4ec217f2a9132.zip |
Merge branch 'lukas/erl_docgen/add_github_contrib_link/OTP-14979'
* lukas/erl_docgen/add_github_contrib_link/OTP-14979:
erl_docgen: Remove git dependency in github link script
stdlib: Fix timer monotonic time link
erl_docgen: Use name based anchors where possible
erl_docgen: Change ghlink icon to pencil
erl_docgen: Fix ghlinks to .xmlsrc
erl_docgen: Add hover links for ghlink
erl_docgen: Add ghlink step for all non-generated doc xml files
Fix erlang:abs/2 type docs
Tickets missed in 9033a41375f3a31a18eb0cba3ea
OTP-14651: temp_alloc disabling
OTP-14652: msacc bugs
Diffstat (limited to 'lib/erl_docgen/priv/bin/xml_from_edoc.escript')
-rwxr-xr-x | lib/erl_docgen/priv/bin/xml_from_edoc.escript | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/erl_docgen/priv/bin/xml_from_edoc.escript b/lib/erl_docgen/priv/bin/xml_from_edoc.escript index b930ae3818..b0e3764fae 100755 --- a/lib/erl_docgen/priv/bin/xml_from_edoc.escript +++ b/lib/erl_docgen/priv/bin/xml_from_edoc.escript @@ -28,6 +28,7 @@ %% Records %%====================================================================== -record(args, {suffix=".xml", + dir=".", layout=docgen_edoc_xml_cb, def=[], includes=[], @@ -85,7 +86,7 @@ module(File, Args) -> {app_default, "OTPROOT"}, {file_suffix, Args#args.suffix}, - {dir, "."}, + {dir, Args#args.dir}, {layout, Args#args.layout}], edoc:file(File, Opts); false -> @@ -118,7 +119,7 @@ users_guide(File, Args) -> Text = edoc_lib:run_layout(F, Opts), OutFile = "chapter" ++ Args#args.suffix, - edoc_lib:write_file(Text, ".", OutFile, Encoding); + edoc_lib:write_file(Text, Args#args.dir, OutFile, Encoding); false -> io:format("~s: not a regular file\n", [File]), usage() @@ -139,6 +140,8 @@ parse(["-def", Key, Val |RawOpts], Type, Args) -> parse(["-i", Dir |RawOpts], Type, Args) -> Args2 = Args#args{includes=Args#args.includes++[Dir]}, parse(RawOpts, Type, Args2); +parse(["-dir", Dir |RawOpts], Type, Args) -> + parse(RawOpts, Type, Args#args{dir=Dir}); parse(["-preprocess", Bool |RawOpts], Type, Args) when Bool == "true"; Bool == "false" -> parse(RawOpts, Type, Args#args{preprocess=list_to_atom(Bool)}); |