From e8fe39ce74481e0dd4297c67bf3098d0a8842b8e Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Sat, 10 Jun 2023 16:25:31 +0100 Subject: [PATCH] Simple script to generate doxgen documentation - Ignore ./subprojects folder from doxygen documentation --- doxygen.conf | 3 ++- scripts/doxygen-help.sh | 9 +------ scripts/doxygen.sh | 60 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 9 deletions(-) create mode 100755 scripts/doxygen.sh diff --git a/doxygen.conf b/doxygen.conf index 97a5c40d..f2484b79 100644 --- a/doxygen.conf +++ b/doxygen.conf @@ -956,7 +956,8 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = build +EXCLUDE = build \ + subprojects # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded diff --git a/scripts/doxygen-help.sh b/scripts/doxygen-help.sh index 75b00ca3..4621b0b4 100755 --- a/scripts/doxygen-help.sh +++ b/scripts/doxygen-help.sh @@ -41,14 +41,7 @@ ## ## ********************************************************************** ## -## To generate the Doxygen html files set the following -## environment variables: -## DOCDIR (destination folder) -## SRCDIR (must point to the level above the source code) -## PROJECT -## VERSION -## -## Then run 'doxygen doxygen.conf' +## To generate the Doxygen html files run 'doxygen.sh' ## if [ -z "${DOCDIR}" ] diff --git a/scripts/doxygen.sh b/scripts/doxygen.sh new file mode 100755 index 00000000..ee74caa0 --- /dev/null +++ b/scripts/doxygen.sh @@ -0,0 +1,60 @@ +#!/bin/sh +#********************************************************************** +# Copyright (C) 2023 - The Geeqie Team +# +# Author: Colin Clark +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +#********************************************************************** + +## @file +## @brief Run doxygen for the Geeqie project +## +## The environment variables needed to generate the +## Geeqie doxygen documentation are set up here. +## +## Run from the project root directory. +## +## $1 Destination directory. If blank, default is ../doxygen +## + +if ! { [ -d ".git" ] && [ -d "src" ] && [ -f "geeqie.1" ] && [ -f "doxygen.conf" ]; } +then + printf "This is not the project root directory\n" + exit +fi + +if [ -n "$1" ] +then + DOCDIR="$1" +else + DOCDIR="$PWD"/../doxygen +fi + +if ! mkdir -p "$DOCDIR"/doxygen +then + printf "Cannot create %s\n" "$DOCDIR" +fi + +export DOCDIR +export SRCDIR="$PWD" +export PROJECT="Geeqie" +VERSION=$(git -C "$PWD" tag --list v[1-9]* | tail -n 1) +export VERSION +export PLANTUML_JAR_PATH="$HOME"/bin/plantuml.jar +export INLINE_SOURCES=YES +export STRIP_CODE_COMMENTS=NO + +doxygen doxygen.conf -- 2.20.1