1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
/*
* libexplain - Explain errno values returned by libc functions
* Copyright (C) 2008-2010, 2012 Peter Miller
* Written by Peter Miller <pmiller@opensource.org.au>
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
doxygen = [find_command doxygen];
if [doxygen] then
{
all += web-site/doc-external/index.html;
integration-build-targets += web-site/doc-internal/index.html;
}
web-site/doc-internal/files =
[match_mask libexplain/%0%.h [source_files]]
[match_mask libexplain/%0%.c [source_files]]
;
web-site/doc-external/files =
[sort
libexplain/libexplain.h
[collect c_incl -nc -ns -eia -nsri
[addprefix -I [search_list]]
[resolve libexplain/libexplain.h]
[addprefix -rlp\= [search_list]]
]
]
;
/*
* The function below is used to remove not names not existing in the
* filesystem from a list of path. It is used to clean the
* INCLUDE_PATH path variable in doxygen.cfg since doxygen issue a
* warning for directory it's unable to find.
*/
function remove_not_existing_paths =
{
result = ;
paths = arg;
loop
{
tmp_path = [head [paths]];
if [not [tmp_path]] then
loopstop;
if [exists [tmp_path]] then
result = [result] [tmp_path];
paths = [tail [paths]];
}
return [result];
}
web-site/%/index.html: [web-site/%/files] etc/doxygen.cfg
set shallow gate-first
if [in % doc-internal doc-external]
{
function quiet_print Generate;
rm -rf web-site/% doxygen-tmp;
cat [resolve etc/doxygen.cfg] - > Doxyfile;
data
# The OUTPUT_DIRECTORY tag is used to specify the (relative or
# absolute) base path where the generated documentation will be
# put. If a relative path is entered, it will be relative to the
# location where doxygen was started. If left blank the current
# directory will be used.
OUTPUT_DIRECTORY = doxygen-tmp
# documented source files. You may enter file names like "myfile.cpp"
# or directories like "/usr/src/myproject". Separate the files or
# directories with spaces.
INPUT = [unsplit " \\\n" [resolve [web-site/%/files]]]
# The PROJECT_NUMBER tag can be used to enter a project or revision
# number. This could be handy for archiving the generated
# documentation or if some version control system is used.
PROJECT_NUMBER = [version]
# The INCLUDE_PATH tag can be used to specify one or more directories that
# contain include files that are not input files but should be processed by
# the preprocessor.
INCLUDE_PATH = [remove_not_existing_paths
[unsplit " \\\n" [addprefix -I [search_list] ] ] ]
# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
# can be used to strip a user defined part of the path. Stripping is
# only done if one of the specified strings matches the left-hand part of
# the path. It is allowed to use relative paths in the argument list.
STRIP_FROM_PATH = [addsuffix "/" [search_path] [split ":" [search_list]]]
dataend
[doxygen] Doxyfile -d web-site/% 2>&1 | tee doxygen.output.tmp
/*
* Have Cook tell us how long
* it takes to cook.
*/
set meter
;
/*
* Test file exists and has a size greater of zero, otherwise fail
* this build step. This is to cope with the fact that Doxygen
* exits with an exit status of zero even if it finds errors.
*/
test ! -s doxygen.output.tmp;
rm -rf web-site/%;
mv doxygen-tmp/html web-site/%;
if [in % doc-internal] then
{
mkdir -p man/man3;
mv "doxygen-tmp/man/man3/*.3" man/man3/.
set errok;
}
rm -rf Doxyfile doxygen-tmp
set errok ;
}
/* vim: set ts=8 sw=4 et : */
|