Additional documentation for developers
[geeqie.git] / scripts / doxygen.sh
1 #!/bin/sh
2 #**********************************************************************
3 # Copyright (C) 2023 - The Geeqie Team
4 #
5 # Author: Colin Clark
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License along
18 # with this program; if not, write to the Free Software Foundation, Inc.,
19 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #**********************************************************************
21
22 ## @file
23 ## @brief Run doxygen for the Geeqie project
24 ##
25 ## The environment variables needed to generate the
26 ## Geeqie doxygen documentation are set up here.
27 ##
28 ## Run from the project root directory.
29 ##
30 ## $1 Destination directory. If blank, default is ../doxygen
31 ##
32
33 if ! { [ -d ".git" ] && [ -d "src" ] && [ -f "geeqie.1" ] && [ -f "doxygen.conf" ]; }
34 then
35         printf "This is not the project root directory\n"
36     exit
37 fi
38
39 if [ -n "$1" ]
40 then
41         DOCDIR="$1"
42 else
43         DOCDIR="$PWD"/../doxygen
44 fi
45
46 if ! mkdir -p "$DOCDIR"/
47 then
48         printf "Cannot create %s\n" "$DOCDIR"
49         exit 1
50 fi
51
52 export DOCDIR
53 export SRCDIR="$PWD"
54 export PROJECT="Geeqie"
55 VERSION=$(git -C "$PWD" tag --list v[1-9]* | tail -n 1)
56 export VERSION
57 export PLANTUML_JAR_PATH="$HOME"/bin/plantuml.jar
58 export INLINE_SOURCES=YES
59 export STRIP_CODE_COMMENTS=NO
60
61 doxygen doxygen.conf