Skip to content

Commit

Permalink
Build_docs: switch to the standard methodology for json,url,beast,etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdarwin committed Dec 11, 2023
1 parent ec11fdd commit 303d528
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 25 deletions.
22 changes: 13 additions & 9 deletions build_docs/linuxdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Builds library documentation.
optional arguments:
-h, --help Show this help message and exit
-t, --type TYPE The \"type\" of build. Defaults to \"main\" which installs all standard boost prerequisites.
Another option is \"cppal\" which installs the prerequisites used by boostorg/json and a few other similar libraries.
Another option is \"cppalv1\" which had installed the prerequisites used by boostorg/json and a few other similar libraries.
More \"types\" can be added in the future if your library needs a specific set of packages installed.
The type is usually auto-detected and doesn't need to be specified.
--skip-boost Skip downloading boostorg/boost and building b2 if you are certain those steps have already been done.
Expand Down Expand Up @@ -131,21 +131,25 @@ fi

# DECIDE THE TYPE

alltypes="main cppal"
cppaltypes="json beast url http_proto socks_proto zlib"
# Generally, boostorg/release-tools treats all libraries the same, meaning it installs one set of packages and executes b2.
# Therefore all libraries ought to build under 'main' and shouldn't need anything customized.

all_types="main cppalv1"
# cppalv1_types="json beast url http_proto socks_proto zlib"
cppalv1_types="not_currently_used skipping_this"

if [ -z "$typeoption" ]; then
if [[ " $cppaltypes " =~ .*\ $REPONAME\ .* ]]; then
typeoption="cppal"
if [[ " $cppalv1_types " =~ .*\ $REPONAME\ .* ]]; then
typeoption="cppalv1"
else
typeoption="main"
fi
fi

echo "Build type is ${typeoption}."

if [[ ! " $alltypes " =~ .*\ $typeoption\ .* ]]; then
echo "Allowed types are currently 'main' and 'cppal'. Not $typeoption. Please choose a different option. Exiting."
if [[ ! " $all_types " =~ .*\ $typeoption\ .* ]]; then
echo "Allowed types are currently 'main' and 'cppalv1'. Not $typeoption. Please choose a different option. Exiting."
exit 1
fi

Expand All @@ -163,7 +167,7 @@ if [ "$skippackagesoption" != "yes" ]; then

sudo apt-get install -y build-essential cmake curl default-jre-headless python3 rsync unzip wget

if [ "$typeoption" = "cppal" ]; then
if [ "$typeoption" = "cppalv1" ]; then
sudo apt-get install -y bison docbook docbook-xml docbook-xsl flex libfl-dev libsaxonhe-java xsltproc
fi
if [ "$typeoption" = "main" ]; then
Expand Down Expand Up @@ -382,7 +386,7 @@ if [ "$typeoption" = "main" ]; then
echo "using quickbook : build/dist/bin/quickbook ; using auto-index : build/dist/bin/auto_index ; using docutils : /usr/share/docutils ; using doxygen ; using boostbook ; using asciidoctor ; using saxonhe ;" > tools/build/src/user-config.jam
./b2 -j3 $librarypath/doc${boostrelease}

elif [ "$typeoption" = "cppal" ]; then
elif [ "$typeoption" = "cppalv1" ]; then
echo "using doxygen ; using boostbook ; using saxonhe ;" > tools/build/src/user-config.jam
./b2 $librarypath/doc${boostrelease}
fi
Expand Down
20 changes: 12 additions & 8 deletions build_docs/macosdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Builds library documentation.
optional arguments:
-h, --help Show this help message and exit
-t, --type TYPE The \"type\" of build. Defaults to \"main\" which installs all standard boost prerequisites.
Another option is \"cppal\" which installs the prerequisites used by boostorg/json and a few other similar libraries.
Another option is \"cppalv1\" which had installed the prerequisites used by boostorg/json and a few other similar libraries.
More \"types\" can be added in the future if your library needs a specific set of packages installed.
The type is usually auto-detected and doesn't need to be specified.
--skip-boost Skip downloading boostorg/boost and building b2 if you are certain those steps have already been done.
Expand Down Expand Up @@ -145,21 +145,25 @@ fi

# DECIDE THE TYPE

alltypes="main cppal"
cppaltypes="json beast url http_proto socks_proto zlib"
# Generally, boostorg/release-tools treats all libraries the same, meaning it installs one set of packages and executes b2.
# Therefore all libraries ought to build under 'main' and shouldn't need anything customized.

all_types="main cppalv1"
# cppalv1_types="json beast url http_proto socks_proto zlib"
cppalv1_types="not_currently_used skipping_this"

if [ -z "$typeoption" ]; then
if [[ " $cppaltypes " =~ .*\ $REPONAME\ .* ]]; then
typeoption="cppal"
if [[ " $cppalv1_types " =~ .*\ $REPONAME\ .* ]]; then
typeoption="cppalv1"
else
typeoption="main"
fi
fi

echo "Build type is ${typeoption}."

if [[ ! " $alltypes " =~ .*\ $typeoption\ .* ]]; then
echo "Allowed types are currently 'main' and 'cppal'. Not $typeoption. Please choose a different option. Exiting."
if [[ ! " $all_types " =~ .*\ $typeoption\ .* ]]; then
echo "Allowed types are currently 'main' and 'cppalv1'. Not $typeoption. Please choose a different option. Exiting."
exit 1
fi

Expand Down Expand Up @@ -402,7 +406,7 @@ if [ "$typeoption" = "main" ]; then
echo "using quickbook : build/dist/bin/quickbook ; using auto-index : build/dist/bin/auto_index ; using docutils ; using doxygen ; using boostbook ; using asciidoctor ; using saxonhe ;" > tools/build/src/user-config.jam
./b2 -j3 $librarypath/doc${boostrelease}

elif [ "$typeoption" = "cppal" ]; then
elif [ "$typeoption" = "cppalv1" ]; then
echo "using doxygen ; using boostbook ; using saxonhe ;" > tools/build/src/user-config.jam
./b2 $librarypath/doc${boostrelease} cxxstd=11
fi
Expand Down
20 changes: 12 additions & 8 deletions build_docs/windowsdocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Builds library documentation.
optional arguments:
-help Show this help message and exit
-type TYPE The `"type`" of build. Defaults to `"main`" which installs all standard boost prerequisites.
Another option is `"cppal`" which installs the prerequisites used by boostorg/json and a few other similar libraries.
Another option is `"cppalv1`" which had installed the prerequisites used by boostorg/json and a few other similar libraries.
More `"types`" can be added in the future if your library needs a specific set of packages installed.
The type is usually auto-detected and doesn't need to be specified.
-skip-boost Skip downloading boostorg/boost and building b2 if you are certain those steps have already been done.
Expand Down Expand Up @@ -196,12 +196,16 @@ else {

# DECIDE THE TYPE

$alltypes="main cppal"
$cppaltypes="json beast url http_proto socks_proto zlib"
# Generally, boostorg/release-tools treats all libraries the same, meaning it installs one set of packages and executes b2.
# Therefore all libraries ought to build under 'main' and shouldn't need anything customized.

$all_types="main cppalv1"
# $cppalv1_types="json beast url http_proto socks_proto zlib"
$cppalv1_types="not_currently_used skipping_this"

if (! $typeoption ) {
if ($cppaltypes.contains($REPONAME)) {
$typeoption="cppal"
if ($cppalv1_types.contains($REPONAME)) {
$typeoption="cppalv1"
}
else {
$typeoption="main"
Expand All @@ -210,8 +214,8 @@ if (! $typeoption ) {

echo "Build type is $typeoption"

if ( ! $alltypes.contains($typeoption)) {
echo "Allowed types are currently 'main' and 'cppal'. Not $typeoption. Please choose a different option. Exiting."
if ( ! $all_types.contains($typeoption)) {
echo "Allowed types are currently 'main' and 'cppalv1'. Not $typeoption. Please choose a different option. Exiting."
exit 1
}

Expand Down Expand Up @@ -614,7 +618,7 @@ if ($typeoption -eq "main") {
exit 1
}
}
elseif ($typeoption -eq "cppal") {
elseif ($typeoption -eq "cppalv1") {
$content="using doxygen : `"/Program Files/doxygen/bin/doxygen.exe`" ; using boostbook ; using saxonhe ;"
$filename="$Env:BOOST_ROOT\tools\build\src\user-config.jam"
[IO.File]::WriteAllLines($filename, $content)
Expand Down

0 comments on commit 303d528

Please sign in to comment.