aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-03-16 21:37:32 +0800
committerJia Tan <jiat0218@gmail.com>2023-03-17 01:42:28 +0800
commit16f21255597f6a57e5692780f962cdc090f62b8c (patch)
tree558838c7a5c95bd3f50ff3db319818960362c2af
parentBuild: Create doxygen/update-doxygen script. (diff)
downloadxz-16f21255597f6a57e5692780f962cdc090f62b8c.tar.xz
Build: Generate doxygen documentation in autogen.sh.
Another command line option (--no-doxygen) was added to disable creating the doxygen documenation in cases where it not wanted or if the doxygen tool is not installed.
Diffstat (limited to '')
-rwxr-xr-xautogen.sh35
1 files changed, 29 insertions, 6 deletions
diff --git a/autogen.sh b/autogen.sh
index 020c365c..d5cec1b6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -19,15 +19,38 @@ ${AUTOCONF:-autoconf}
${AUTOHEADER:-autoheader}
${AUTOMAKE:-automake} -acf --foreign
-# Generate the translated man pages if the "po4a" tool is available.
+# Generate the translated man pages and the doxygen documentation if the
+# "po4a" and "doxygen" tools are available.
# This is *NOT* done by "autoreconf -fi" or when "make" is run.
-#
-# Pass --no-po4a to this script to skip this step. It can be useful when
-# you know that po4a isn't available and don't want autogen.sh to exit
-# with non-zero exit status.
-if test "x$1" != "x--no-po4a"; then
+# Pass --no-po4a or --no-doxygen to this script to skip these steps.
+# It can be useful when you know that po4a or doxygen aren't available and
+# don't want autogen.sh to exit with non-zero exit status.
+generate_po4a="y"
+generate_doxygen="y"
+
+for arg in "$@"
+do
+ case $arg in
+ "--no-po4a")
+ generate_po4a="n"
+ ;;
+
+ "--no-doxygen")
+ generate_doxygen="n"
+ ;;
+ esac
+done
+
+if test "$generate_po4a" != "n"; then
cd po4a
sh update-po
+ cd ..
+fi
+
+if test "$generate_doxygen" != "n"; then
+ cd doxygen
+ sh update-doxygen
+ cd ..
fi
exit 0