<doc.docbook-dep.mk> handles implicit dependencies of DocBook documentation

This feature can be disabled with DOCBOOK_DEPS_DISABLE=YES

Missing dependencies will be reported as a warning, and should
be fixed by the document authors.

PR: 222826
This commit is contained in:
Wolfram Schneider 2017-10-06 14:08:45 +00:00
parent 9647f5d77d
commit b1c971fa20
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=51066
6 changed files with 45 additions and 5 deletions

View file

@ -0,0 +1,30 @@
#
# $FreeBSD$
#
# This include file <doc.docbook-dep.mk> handles implicit dependencies of
# DocBook documentation in the FreeBSD Documentation Project.
#
#
# extract the depending *.xml files from the main
# input sources on the fly:
#
# <!ENTITY release.building SYSTEM "./releng-building.xml">
#
# => ./releng-building.xml
#
.if ${.TARGETS} == "all"
_DOCBOOK_DEPS_SYSTEM != for i in $$(egrep '<!ENTITY [^ ]+ SYSTEM "[^ ]+\.xml">' ${SRCS} | sed -E 's,.*"([^"]+)".*,\1,');do \
if [ -e $$i ]; then \
echo $i; \
else \
echo "Warning: dep file $$(pwd)/$$i does not exists" >&2; \
fi; \
done
.endif
DOCBOOK_DEPS += ${_DOCBOOK_DEPS_SYSTEM}
index.html ${DOC}.html: ${DOCBOOK_DEPS}

View file

@ -99,6 +99,11 @@ DOC_LOCAL_MK= ${DOC_PREFIX}/${LANGCODE}/share/mk/doc.local.mk
.if defined(DOC)
.if ${DOCFORMAT} == "docbook"
.include "doc.docbook.mk"
.if !defined(DOCBOOK_DEPS_DISABLE) || ${DOCBOOK_DEPS_DISABLE} != "YES"
.include "doc.docbook-dep.mk"
.endif
.endif
.if ${DOCFORMAT} == "slides"
.include "doc.slides.mk"