# Copyright Antony Polukhin 2016-2019.
# Use, modification, and distribution are
# subject to the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

using quickbook ;
using boostbook ;
using doxygen ;
using xsltproc ;

import set ;
import doxygen ;
import xsltproc ;
import notfile ;
import path ;

project pfr/doc ;

#
# Common params for doxygen
# 

local doxygen_params =
        <doxygen:param>EXTRACT_ALL=NO
        <doxygen:param>HIDE_UNDOC_MEMBERS=YES
        <doxygen:param>EXTRACT_PRIVATE=NO
        <doxygen:param>ENABLE_PREPROCESSING=YES
        <doxygen:param>EXPAND_ONLY_PREDEF=YES
        <doxygen:param>MACRO_EXPANSION=YES
        <doxygen:param>INLINE_SIMPLE_STRUCTS=YES
        <doxygen:param>SORT_MEMBER_DOCS=NO
        <doxygen:param>"ALIASES= \\
            \"forcedlink{1}=\\xmlonly<link linkend='boost.pfr.\\1'>\\endxmlonly boost::pfr::\\1\\xmlonly</link>\\endxmlonly\" \\
            \"podops=\\b See \\b Also : \\xmlonly<link linkend='boost_pfr.tutorial.three_ways_of_getting_operators'>\\endxmlonly 'Three ways of getting operators' \\xmlonly</link>\\endxmlonly\" \\
            \"fnrefl=\\b See \\b Also : \\xmlonly<link linkend='boost_pfr.tutorial.reflection_of_field_name'>\\endxmlonly 'Reflection of field names' \\xmlonly</link>\\endxmlonly\" \\
            \"customio=\\b See \\b Also : \\xmlonly<link linkend='boost_pfr.tutorial.custom_printing_of_aggregates'>\\endxmlonly 'Custom printing of aggregates' \\xmlonly</link>\\endxmlonly for info on how to implement your own manipulator with custom format.\" \\
            \"aggregate=\\xmlonly<link linkend='boost_pfr.limitations_and_configuration'>\\endxmlonly simple aggregate \\xmlonly</link>\\endxmlonly\" \\
        "
        <doxygen:param>"PREDEFINED= \\
            \"BOOST_PFR_DOXYGEN_INVOKED=1\" \\
        "
    ;

doxygen autodoc_pfr
    :
        [ glob ../../../boost/pfr.hpp ]
        [ glob ../../../boost/pfr/*.hpp ]
    :
        $(doxygen_params)
        <xsl:param>"boost.doxygen.reftitle=Reference Section of PFR"
    ;

boostbook pfr-doc
    :
        pfr.qbk
    :
        <dependency>autodoc_pfr
        <xsl:param>boost.root=https://www.boost.org/doc/libs/1_81_0
        #<xsl:param>boost.root=../../../.
        <xml:param>html.stylesheet=../../../../doc/src/boostbook.css
    ;

###############################################################################
alias boostdoc
    : pfr-doc/<format>docbook
    :
    :
    : ;
explicit boostdoc ;
alias boostrelease ;
explicit boostrelease ;

