mirror of
https://github.com/boostorg/boost-tasks.git
synced 2026-02-01 08:22:13 +00:00
172 lines
4.0 KiB
Bash
Executable File
172 lines
4.0 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
set -e
|
|
set -u
|
|
|
|
cd $(dirname $0)
|
|
root=$(pwd)
|
|
. $root/settings.sh
|
|
|
|
build_impl()
|
|
{
|
|
name=$1
|
|
output=$2
|
|
|
|
build_dir=$DOC_DATA/build/build-$name
|
|
boost_root=$build_dir/boost
|
|
inspect_root=$build_dir/boost-inspect
|
|
exec_dir=$build_dir/bin
|
|
|
|
if [ -d $build_dir ]
|
|
then
|
|
rm -rf $build_dir
|
|
fi
|
|
|
|
echo
|
|
echo "Setup Build Directory"
|
|
echo
|
|
|
|
mkdir -p $DOC_DATA/upload
|
|
mkdir -p $build_dir
|
|
mkdir -p $exec_dir
|
|
|
|
echo
|
|
echo "Create Makefile"
|
|
echo
|
|
|
|
escaped_documentation=$(echo $STANDALONE_DOCUMENTATION | sed 's/\//\\\//g')
|
|
sed "s/__STANDALONE_DOCUMENTATION__/$escaped_documentation/g" \
|
|
templates/Makefile > $build_dir/Makefile
|
|
|
|
echo
|
|
echo "Extract docutils"
|
|
echo
|
|
|
|
cd $build_dir
|
|
tar -xzf $DOC_DATA/tarballs/$DOCUTILS_FILENAME
|
|
|
|
mkdir $build_dir/docbook-xsl
|
|
cd $build_dir/docbook-xsl
|
|
tar -xjf $DOC_DATA/tarballs/$DOCBOOK_XSL_FILENAME
|
|
|
|
mkdir $build_dir/docbook-dtd
|
|
cd $build_dir/docbook-dtd
|
|
unzip $DOC_DATA/tarballs/$DOCBOOK_DTD_FILENAME
|
|
|
|
echo
|
|
echo "Create user-config.jam"
|
|
echo
|
|
|
|
touch $build_dir/user-config.jam
|
|
echo "using doxygen : $DOXYGEN_BIN ;" >> $build_dir/user-config.jam
|
|
echo "using $B2_TOOLSET : : $CCACHE_BIN $CXX_BIN $CXX_FLAGS ;" >> $build_dir/user-config.jam
|
|
echo "using boostbook" >> $build_dir/user-config.jam
|
|
echo " : $build_dir/docbook-xsl/docbook-xsl-$DOCBOOK_XSL_VERSION" >> $build_dir/user-config.jam
|
|
echo " : $build_dir/docbook-dtd" >> $build_dir/user-config.jam
|
|
echo " ;" >> $build_dir/user-config.jam
|
|
echo "using docutils : $build_dir/docutils-${DOCUTILS_VERSION} ;" >> $build_dir/user-config.jam
|
|
|
|
echo
|
|
echo "Export repo"
|
|
echo
|
|
|
|
$root/git-export ${GIT_URL}/boostorg/boost.git \
|
|
refs/heads/$name $boost_root
|
|
|
|
# Make a clean copy that can be used for inspection later.
|
|
mkdir $inspect_root
|
|
cd $boost_root
|
|
pax -rwl . $inspect_root
|
|
|
|
# Make the inspect copy look more like a release by moving
|
|
# all the headers into $inspect_root/boost, and then removing
|
|
# .git* files.
|
|
|
|
find $inspect_root/libs -name "include" |
|
|
grep -v "/include/.*/include" |
|
|
grep -v "/mpl/preprocessed/include" |
|
|
grep -v "/phoenix/test/include" |
|
|
while read include_dir
|
|
do
|
|
pushd $include_dir
|
|
pax -rwl . $inspect_root
|
|
popd
|
|
rm -r $include_dir
|
|
done
|
|
|
|
find $inspect_root -name ".git*" -print0 | xargs -0 rm -r
|
|
|
|
echo
|
|
echo "Starting Build"
|
|
echo
|
|
|
|
# So that boost build will use the user-config.jam created for this
|
|
# build
|
|
export HOME=$build_dir
|
|
export PATH=$exec_dir:$PATH
|
|
cd $HOME && make all-docs
|
|
|
|
echo
|
|
echo "Create zipfile"
|
|
echo
|
|
|
|
echo "Creating zipfile..." >> $output/summary.txt
|
|
|
|
target=boost-$name-docs.7z
|
|
zip_file=$output/$target
|
|
$root/compress-docs $name $boost_root $zip_file
|
|
|
|
if [ $name = 'develop' -o $name = 'master' ]; then
|
|
# Link file in upload directory, so that it will later
|
|
# be uploaded via. ftp.
|
|
|
|
ln $zip_file $DOC_DATA/upload/$target.upload
|
|
fi
|
|
|
|
echo "Finished zipfile." >> $output/summary.txt
|
|
|
|
echo "Building and running inspect." >> $output/summary.txt
|
|
|
|
echo
|
|
echo "Build inspect"
|
|
echo
|
|
|
|
cd $boost_root/tools/inspect/build
|
|
$build_dir/bin/b2 -q
|
|
|
|
echo
|
|
echo "Extract docs into inspect copy"
|
|
echo
|
|
|
|
cd $inspect_root
|
|
7za x -y $output/$target
|
|
|
|
echo
|
|
echo "Mark inspect copy to upload to servers"
|
|
echo
|
|
|
|
if [ $name = master -o $name = develop ]; then
|
|
echo $inspect_root > $DOC_DATA/upload/upload-$name
|
|
fi
|
|
|
|
echo
|
|
echo "Run inspect"
|
|
echo
|
|
|
|
cd $inspect_root
|
|
$boost_root/dist/bin/inspect > $output/docs-inspect-$name.html || true
|
|
|
|
if [ $name = 'develop' -o $name = 'master' ]; then
|
|
ln $output/docs-inspect-$name.html $DOC_DATA/upload/docs-inspect-$name.html.upload
|
|
fi
|
|
|
|
echo "Finished inspect." >> $output/summary.txt
|
|
|
|
echo
|
|
echo
|
|
|
|
echo "All OK." >> $output/summary.txt
|
|
}
|
|
|
|
build_impl $*
|