aboutsummaryrefslogtreecommitdiffstats
path: root/lib/docbuilder
diff options
context:
space:
mode:
Diffstat (limited to 'lib/docbuilder')
-rw-r--r--lib/docbuilder/doc/src/docb_gen.xml2
-rw-r--r--lib/docbuilder/doc/src/docb_transform.xml2
-rw-r--r--lib/docbuilder/doc/src/docb_xml_check.xml2
-rw-r--r--lib/docbuilder/doc/src/docbuilder_app.xml2
-rw-r--r--lib/docbuilder/doc/src/notes.xml15
-rw-r--r--lib/docbuilder/src/docb_main.erl29
-rw-r--r--lib/docbuilder/test/Makefile2
-rw-r--r--lib/docbuilder/test/docb.cover2
-rw-r--r--lib/docbuilder/test/docb_SUITE.erl25
-rw-r--r--lib/docbuilder/vsn.mk2
10 files changed, 67 insertions, 16 deletions
diff --git a/lib/docbuilder/doc/src/docb_gen.xml b/lib/docbuilder/doc/src/docb_gen.xml
index 49eb79ae24..d4ebfd0f84 100644
--- a/lib/docbuilder/doc/src/docb_gen.xml
+++ b/lib/docbuilder/doc/src/docb_gen.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>1999</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/docbuilder/doc/src/docb_transform.xml b/lib/docbuilder/doc/src/docb_transform.xml
index b8975e2698..06a04c8c02 100644
--- a/lib/docbuilder/doc/src/docb_transform.xml
+++ b/lib/docbuilder/doc/src/docb_transform.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2001</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/docbuilder/doc/src/docb_xml_check.xml b/lib/docbuilder/doc/src/docb_xml_check.xml
index 7ec456c014..eff4fc4342 100644
--- a/lib/docbuilder/doc/src/docb_xml_check.xml
+++ b/lib/docbuilder/doc/src/docb_xml_check.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2007</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/docbuilder/doc/src/docbuilder_app.xml b/lib/docbuilder/doc/src/docbuilder_app.xml
index a1df496258..58b8daf598 100644
--- a/lib/docbuilder/doc/src/docbuilder_app.xml
+++ b/lib/docbuilder/doc/src/docbuilder_app.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2007</year>
- <year>2007</year>
+ <year>2011</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/docbuilder/doc/src/notes.xml b/lib/docbuilder/doc/src/notes.xml
index 019cf1b083..4b8c04f323 100644
--- a/lib/docbuilder/doc/src/notes.xml
+++ b/lib/docbuilder/doc/src/notes.xml
@@ -31,6 +31,21 @@
<p>This document describes the changes made to the DocBuilder
application.</p>
+<section><title>Docbuilder 0.9.8.9</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> Fix compatibility issues with docbuilder for R11
+ documentation patches. </p>
+ <p>
+ Own Id: OTP-8946</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Docbuilder 0.9.8.8</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/docbuilder/src/docb_main.erl b/lib/docbuilder/src/docb_main.erl
index 87a1401a02..4f5f035a65 100644
--- a/lib/docbuilder/src/docb_main.erl
+++ b/lib/docbuilder/src/docb_main.erl
@@ -34,14 +34,23 @@
%% Parses the source file File and transforms the result to html,
%% latex and/or man page format.
process(File, Opts) ->
-
- File1 = File ++ ".tmpconv",
- os:cmd("sed -e 's/xi:include[ \t]*href/include file/g' -e 's/xmlns:xi=\"http:\\/\\/www.w3.org\\/2001\\/XInclude\"//g' < " ++
- File ++ ".xml > " ++ File1 ++ ".xml"), %LATH
+
+ SrcType = docb_util:lookup_option(src_type, Opts),
+
+ File1 =
+ case SrcType of
+ ".xml" ->
+ FileTmp = File ++ ".tmpconv",
+ os:cmd("sed -e 's/xi:include[ \t]*href/include file/g' -e 's/xmlns:xi=\"http:\\/\\/www.w3.org\\/2001\\/XInclude\"//g' < " ++
+ File ++ ".xml > " ++ FileTmp ++ ".xml"),
+ FileTmp;
+ ".sgml" ->
+ File
+ end,
case parse1(File1, Opts) of
errors ->
- file:delete(File1 ++ ".xml"),
+ delete_tmp_file(SrcType, File1),
errors;
{ok, Tree} ->
From = element(1, Tree),
@@ -62,15 +71,21 @@ process(File, Opts) ->
Result = [transform(From, To, Opts, File, Tree)||To <- Tos],
case lists:member(transformation_error,Result) of
true ->
- file:delete(File1 ++ ".xml"),
+ delete_tmp_file(SrcType, File1),
errors;
_ ->
- file:delete(File1 ++ ".xml"),
+ delete_tmp_file(SrcType, File1),
ok
end
end.
+
+delete_tmp_file(".xml", File) ->
+ file:delete(File ++ ".xml");
+delete_tmp_file(_, _) ->
+ ok.
+
%%----------------------------------------------------------------------
%% parse(File, Opts) -> {ok, Tree} | errors
diff --git a/lib/docbuilder/test/Makefile b/lib/docbuilder/test/Makefile
index b2a3bab372..53dff193dc 100644
--- a/lib/docbuilder/test/Makefile
+++ b/lib/docbuilder/test/Makefile
@@ -71,7 +71,7 @@ release_spec: opt
release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(SPEC_FILES) $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR)
+ $(INSTALL_DATA) $(SPEC_FILES) docb.cover $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR)
chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
diff --git a/lib/docbuilder/test/docb.cover b/lib/docbuilder/test/docb.cover
new file mode 100644
index 0000000000..80bab6eba7
--- /dev/null
+++ b/lib/docbuilder/test/docb.cover
@@ -0,0 +1,2 @@
+{incl_app,docbuilder,details}
+
diff --git a/lib/docbuilder/test/docb_SUITE.erl b/lib/docbuilder/test/docb_SUITE.erl
index c871130521..d286824539 100644
--- a/lib/docbuilder/test/docb_SUITE.erl
+++ b/lib/docbuilder/test/docb_SUITE.erl
@@ -17,13 +17,32 @@
%%
-module(docb_SUITE).
--export([all/1,html/1]).
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2,html/1]).
--include("test_server.hrl").
+-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/include/file.hrl").
-all(suite) -> [html].
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+[html].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
html(suite) -> [];
html(Config) when is_list(Config) ->
diff --git a/lib/docbuilder/vsn.mk b/lib/docbuilder/vsn.mk
index b23ee521c7..1209b80d94 100644
--- a/lib/docbuilder/vsn.mk
+++ b/lib/docbuilder/vsn.mk
@@ -1 +1 @@
-DOCB_VSN = 0.9.8.8
+DOCB_VSN = 0.9.8.9