Non cmake build system works again.

This commit is contained in:
Jim Derry 2015-10-31 11:00:27 +08:00
parent e6ceaa8589
commit 9e033cab22

View file

@ -9,7 +9,7 @@
TIDY_PATH="../build/cmake/tidy" # Build directory. TIDY_PATH="../build/cmake/tidy" # Build directory.
TIDY_VERSION=`cat ../version.txt` # Project root directory. TIDY_VERSION=`head -n 1 ../version.txt` # In project root directory.
cat << HEREDOC cat << HEREDOC
@ -31,8 +31,8 @@ HEREDOC
# Output and flags' declarations. # Output and flags' declarations.
DOXY_CFG="doxygen.cfg" DOXY_CFG="./doxygen.cfg"
OUTP_DIR="temp" OUTP_DIR="./temp"
BUILD_XSLT=1 BUILD_XSLT=1
BUILD_API=1 BUILD_API=1
@ -66,20 +66,21 @@ hash xsltproc 2>/dev/null || { echo "- xsltproc not found. You require an XSLT p
if [ "$BUILD_XSLT" -eq 1 ]; then if [ "$BUILD_XSLT" -eq 1 ]; then
# Use the designated tidy to get its config and help. # Use the designated tidy to get its config and help.
# These temporary files will be cleaned up later. # These temporary files will be cleaned up later.
$TIDY_PATH -xml-config > "tidy-config.xml" $TIDY_PATH -xml-config > "$OUTP_DIR/tidy-config.xml"
$TIDY_PATH -xml-help > "tidy-help.xml" $TIDY_PATH -xml-help > "$OUTP_DIR/tidy-help.xml"
# 'quickref.html' # 'quickref.html' and 'quickref_include.html' for the Doxygen build.
xsltproc "quickref.xsl" "tidy-config.xml" > "$OUTP_DIR/quickref.html" xsltproc "./quickref.xsl" "$OUTP_DIR/tidy-config.xml" > "$OUTP_DIR/quickref.html"
xsltproc "quickref.include.xsl" "tidy-config.xml" > ./examples/quickref_include.html xsltproc "./quickref.include.xsl" "$OUTP_DIR/tidy-config.xml" > ./examples/quickref_include.html
# 'tidy.1' # 'tidy.1'; create a valid tidy1.xsl first by subbing CMAKE's variable.
xsltproc "tidy1.xsl" "tidy-help.xml" > "$OUTP_DIR/tidy.1" sed "s|@TIDYCONFIG@|./tidy-config.xml|g" < ./tidy1.xsl.in > "$OUTP_DIR/tidy1.xsl"
xsltproc "$OUTP_DIR/tidy1.xsl" "$OUTP_DIR/tidy-help.xml" > "$OUTP_DIR/tidy.1"
# Cleanup - Note: to avoid issues with the tidy1.xsl finding the tidy-config.xml # Cleanup
# document, they are created and read from the source directory instead of temp. rm "$OUTP_DIR/tidy-config.xml"
rm "tidy-config.xml" rm "$OUTP_DIR/tidy-help.xml"
rm "tidy-help.xml" rm "$OUTP_DIR/tidy1.xsl"
echo "'quickref.html' and 'tidy.1' have been built.\n" echo "'quickref.html' and 'tidy.1' have been built.\n"
else else
@ -114,11 +115,11 @@ if [ "$BUILD_API" -eq 1 ]; then
## copy license file to examples for includsing ## copy license file to examples for includsing
cp ../../LICENSE.md ./examples/ cp ../README/LICENSE.md ./examples/
## this lot ## this lot
# - echos and catches outputs the doxygen config # - echoes and catches output of the doxygen config
# - overwrites some vars but appending some to config an end # - overwrites some vars but appending some to config at end
# - which are then passed to doxygen as stdin (instead of the path to a config.file) # - which are then passed to doxygen as stdin (instead of the path to a config.file)
( cat "$DOXY_CFG"; \ ( cat "$DOXY_CFG"; \
echo "PROJECT_NUMBER=$TIDY_VERSION"; \ echo "PROJECT_NUMBER=$TIDY_VERSION"; \
@ -131,13 +132,6 @@ if [ "$BUILD_API" -eq 1 ]; then
rm "./examples/tidy5.config.txt" rm "./examples/tidy5.config.txt"
rm "./examples/LICENSE.md" rm "./examples/LICENSE.md"
## create zip file of docs
cd $OUTP_DIR;
#zip -r "tidy-docs-$TIDY_VERSION.zip" ./tidylib_api
echo "\nTidyLib API documentation has been built." echo "\nTidyLib API documentation has been built."
else else
echo "* $OUTP_DIR/tidylib_api/ was skipped because not all dependencies were satisfied." echo "* $OUTP_DIR/tidylib_api/ was skipped because not all dependencies were satisfied."