3 #**********************************************************************
4 # Copyright (C) 2021 - The Geeqie Team
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License along
19 # with this program; if not, write to the Free Software Foundation, Inc.,
20 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #**********************************************************************
24 ## @brief Create the Lua API html document, which is part of
25 ## the Geeqie Help file.
27 ## It is run during the generation of the help files.
29 ## The generated Lua html files are placed in doc/html/lua-api
31 ## The doxygen.conf file is modified to extract only those comments
32 ## that are useful as part of an API description.
35 export PROJECT="Geeqie"
36 VERSION=$(git tag --list v[1-9]* | tail -1)
38 export SRCDIR="$PWD/.."
39 export DOCDIR="$PWD/html/lua-api"
40 export INLINE_SOURCES=NO
41 export STRIP_CODE_COMMENTS=YES
43 TMPFILE=$(mktemp "${TMPDIR:-/tmp}/geeqie.XXXXXXXXXX") || exit 1
45 # Modify the Geeqie doxygen.conf file to produce
46 # only the data needed for the lua API document
49 FILE_PATTERNS_found = "FALSE"
52 if (FILE_PATTERNS_found == "TRUE")
60 FILE_PATTERNS_found = "FALSE"
63 if ($1 == SHOW_INCLUDE_FILES)
65 {print "SHOW_INCLUDE_FILES = NO"}
67 else if ($1 == "FILE_PATTERNS")
69 print "FILE_PATTERNS = lua.c"
70 FILE_PATTERNS_found = "TRUE"
73 else if ($1 == "EXCLUDE_SYMBOLS")
75 print "EXCLUDE_SYMBOLS = L \\"
76 print "lua_callvalue \\"
77 print "lua_check_exif \\"
78 print "lua_check_image \\"
80 print "_XOPEN_SOURCE \\"
81 print "LUA_register_global \\"
82 print "LUA_register_meta"
84 else if ($1 == "SOURCE_BROWSER")
86 print "SOURCE_BROWSER = NO"
88 else if ($1 == "HAVE_DOT")
90 {print "HAVE_DOT = NO"}
97 ' ../doxygen.conf > "$TMPFILE"