lw-build-system/scripts/build.docs.doxygen/build.docs

44 lines
957 B
Plaintext
Raw Normal View History

# These are external variables, and shouldn't clash with anything else
# @CNAME@_BUILT
#
MONOLITHIC_DOC="${MONOLITHIC_DOC} $(echo src/@NAME@/*.dox)"
build_target monolithic
if [ -z ${@CNAME@_BUILT} ]
then
echo "Building documentation with Doxygen..."
DOXYFILE=obj/Doxyfile.@NAME@
if [ ! -e ${DOXYFILE} ]
then
do_cmd cp src/docs/Doxyfile.in ${DOXYFILE} || return 1
echo "INPUT = ${MONOLITHIC_DOC}" >> ${DOXYFILE}
echo "PROJECT_NUMBER = ${VERSION}" >> ${DOXYFILE}
fi
MODIFIED=0
for file in ${MONOLITHIC_DOC}
do
if [ ${file} -nt html/index.html ]
then
MODIFIED=1
break
fi
done
if [ ${MODIFIED} -ne 0 ]
then
do_cmd doxygen ${DOXYFILE} || return 1
print_success "Documentation built"
else
print_success "Documentation is up to date"
fi
@CNAME@_BUILT=1
fi
# kate: @KATE_MODELINE@
# vim: @VIM_MODELINE@