Skip to content

Commit

Permalink
Doc install and redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
anarthal committed Oct 3, 2023
1 parent ecfe51c commit 53ef947
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
22 changes: 20 additions & 2 deletions doc/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import sequence ;

# All paths must be absolute to work well with the Doxygen rules.
path-constant this_dir : . ;
path-constant target_dir : html ;
path-constant redis_root_dir : .. ;
path-constant include_dir : ../include ;
path-constant examples_dir : ../examples ;
Expand All @@ -20,7 +21,8 @@ local examples = [ path.glob-tree $(examples_dir) : *.hpp *.cpp ] ;
# which is not correct.
local stylesheet_arg = [ sequence.join "\"$(stylesheet_files)\"" : " " ] ;

doxygen autodoc.html
# The doxygen rule requires the target name to end in .html to generate HTML files
doxygen doc.html
:
$(includes) $(examples) $(readme)
:
Expand Down Expand Up @@ -59,11 +61,27 @@ doxygen autodoc.html
<doxygen:param>DIRECTORY_GRAPH=NO
;

explicit doc.html ;

# The doxygen rule only informs b2 about the main HTML file, and not about
# all the doc directory that gets generated. Using the install rule copies
# only a single file, which is incorrect. This is a workaround to copy
# the generated docs to the doc/html directory, where they should be.
make copyhtml.tag : doc.html : @copy_html_dir ;
explicit copyhtml.tag ;
actions copy_html_dir
{
rm -rf $(target_dir)
mkdir -p $(target_dir)
cp -r $(<:D)/html/doc/* $(target_dir)/
echo "Stamped" > "$(<)"
}

# These are used to inform the build system of the
# means to build the integrated and stand-alone docs.

alias boostdoc ;
explicit boostdoc ;

alias boostrelease : autodoc.html ;
alias boostrelease : copyhtml.tag ;
explicit boostrelease ;
24 changes: 24 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<html>

<head>
<title>Boost.Redis</title>
<meta http-equiv="refresh" content="0; URL=./doc/html/index.html">
</head>

<body>
Automatic redirection failed, please go to
<a href="./doc/html/index.html">./doc/html/index.html</a>
<hr>
<tt>
Boost.Redis<br>
<br>
Copyright&nbsp;(C)&nbsp;2023&nbsp;Marcelo&nbsp;Zimbres<br>
<br>
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
<a href=http://www.boost.org/LICENSE_1_0.txt>http://www.boost.org/LICENSE_1_0.txt</a>) <br>
<br>
</tt>
</body>

</html>

0 comments on commit 53ef947

Please sign in to comment.