diff --git a/share/mk/doc.docbook.mk b/share/mk/doc.docbook.mk index 2acad03be8..a70e60781d 100644 --- a/share/mk/doc.docbook.mk +++ b/share/mk/doc.docbook.mk @@ -680,6 +680,13 @@ ${DOC}.${_curformat}.${_curcompress}: # Redefine them to do things before and after the files are installed, # respectively. +spellcheck: +.for _entry in ${_docs} + @echo "Spellcheck ${_entry}" + @${HTML2TXT} ${HTML2TXTOPTS} ${.CURDIR}/${_entry} | ${ISPELL} ${ISPELLOPTS} +.endfor + + # # Build a list of install-format targets to be installed. These will be # dependencies for the "realinstall" target. diff --git a/share/mk/doc.project.mk b/share/mk/doc.project.mk index 74270f6d97..626bcaaf6a 100644 --- a/share/mk/doc.project.mk +++ b/share/mk/doc.project.mk @@ -75,6 +75,10 @@ LN?= /bin/ln MKDIR?= /bin/mkdir -p RM?= /bin/rm MV?= /bin/mv +HTML2TXT?= ${PREFIX}/bin/w3m +HTML2TXTOPTS?= -dump ${HTML2TXTFLAGS} +ISPELL?= ispell +ISPELLOPTS?= -l -p /usr/share/dict/freebsd ${ISPELLFLAGS} # Image processing (contains code used by the doc..mk files, so must # be listed first).