2006-05-26 18:06:07 +00:00
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
_ALL!= cd ${.CURDIR} && ls Doxyfile-*
|
|
|
|
ALL= ${_ALL:C/Doxyfile-//g}
|
|
|
|
PDF_ALL=${_ALL:C/Doxyfile/pdf/g}
|
|
|
|
|
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
|
|
|
S?=/usr/src/sys
|
2006-08-02 15:24:59 +00:00
|
|
|
LOCALBASE?=/usr/local
|
2006-05-26 18:06:07 +00:00
|
|
|
|
2009-08-24 13:10:55 +00:00
|
|
|
MFILES!= find ${S} -name \*.m | sed -e 's:${S}/::g'
|
2006-05-26 18:06:07 +00:00
|
|
|
HFILES= ${MFILES:T:S/.m$/.h/}
|
|
|
|
AWK?= awk
|
|
|
|
|
|
|
|
.MAIN: usage
|
|
|
|
|
|
|
|
usage:
|
|
|
|
@echo "Possible targets are:"
|
|
|
|
.for entry in ${ALL}
|
|
|
|
@echo " ${entry}"
|
|
|
|
@echo " pdf-${entry}"
|
|
|
|
@echo " clean-${entry}"
|
|
|
|
.endfor
|
|
|
|
@echo
|
|
|
|
@echo " all"
|
|
|
|
@echo " pdf-all"
|
|
|
|
@echo " clean"
|
|
|
|
|
|
|
|
all: ${ALL}
|
|
|
|
pdf-all:${PDF_ALL}
|
|
|
|
|
2009-08-24 13:10:55 +00:00
|
|
|
mfiles: ${HFILES:S/^/${.OBJDIR}\/include\//}
|
2006-05-26 18:06:07 +00:00
|
|
|
|
2009-08-24 13:10:55 +00:00
|
|
|
DOXYGEN_DEST_PATH?= ${.OBJDIR}
|
|
|
|
DOXYGEN_LATEX_DEST_PATH?=${.OBJDIR}
|
|
|
|
DOXYGEN_PDF_DEST_PATH?= ${.OBJDIR}
|
2006-05-26 18:06:07 +00:00
|
|
|
|
2009-08-24 13:10:55 +00:00
|
|
|
.if exists(${S}/${TARGET_ARCH}/linux)
|
2006-05-26 18:06:07 +00:00
|
|
|
DOXYGEN_LINUX_PATH= ${S}/${TARGET_ARCH}/linux
|
|
|
|
.endif
|
2009-08-24 13:10:55 +00:00
|
|
|
.if exists(${S}/${TARGET_ARCH}/linux32)
|
2006-05-26 18:06:07 +00:00
|
|
|
DOXYGEN_LINUX_PATH+= ${S}/${TARGET_ARCH}/linux32
|
|
|
|
.endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# generate the necessary targets
|
|
|
|
#
|
|
|
|
.for target in ${ALL}
|
|
|
|
${target}: mfiles ${.OBJDIR}/${target}/${target}.tag
|
|
|
|
|
|
|
|
${.OBJDIR}/${target}/${target}.tag:
|
2006-08-02 15:24:59 +00:00
|
|
|
@mkdir -p ${.OBJDIR}/${target}
|
2006-05-26 18:06:07 +00:00
|
|
|
@cd ${.OBJDIR} && \
|
|
|
|
env DOXYGEN_INCLUDE_PATH=${.CURDIR} \
|
|
|
|
DOXYGEN_SRC_PATH=${S} \
|
|
|
|
DOXYGEN_DEST_PATH=${DOXYGEN_DEST_PATH} \
|
2009-08-24 13:10:55 +00:00
|
|
|
DOXYGEN_SRC_INCLUDE_PATH="${S}/sys ${S}/../include ${S}/${TARGET_ARCH}/include ${.OBJDIR}/include" \
|
2006-05-26 18:06:07 +00:00
|
|
|
DOXYGEN_TARGET_ARCH=${TARGET_ARCH} \
|
|
|
|
DOXYGEN_LINUX_PATH=${DOXYGEN_LINUX_PATH} \
|
2006-05-28 15:25:18 +00:00
|
|
|
NOTREVIEWED=${.CURDIR}/notreviewed.dox \
|
2006-08-02 15:24:59 +00:00
|
|
|
PATH=${LOCALBASE}/bin:${PATH} \
|
2006-05-26 18:06:07 +00:00
|
|
|
doxygen ${.CURDIR}/Doxyfile-${target}
|
2009-08-24 13:10:55 +00:00
|
|
|
@echo "API docs for ${target} are now available in ${DOXYGEN_DEST_PATH}/${target}/." | /usr/bin/fmt
|
2006-05-26 18:06:07 +00:00
|
|
|
|
|
|
|
pdf-${target}: ${.OBJDIR}/${target}/${target}.tag
|
|
|
|
@cd ${DOXYGEN_LATEX_DEST_PATH}/${target}/latex && ${MAKE} refman.pdf && cp refman.pdf ${DOXYGEN_PDF_DEST_PATH}/${target}.pdf
|
|
|
|
@echo "API docs for ${target} are now available in ${DOXYGEN_PDF_DEST_PATH}/." | /usr/bin/fmt
|
|
|
|
|
|
|
|
CLEANDIRS+= ${DOXYGEN_DEST_PATH}/${target}
|
|
|
|
CLEANDIRS+= ${.OBJDIR}/${target}/
|
|
|
|
CLEANFILES+= ${DOXYGEN_PDF_DEST_PATH}/${target}.pdf
|
|
|
|
clean-${target}:
|
|
|
|
rm -rf ${DOXYGEN_DEST_PATH}/${target} ${.OBJDIR}/${target}
|
|
|
|
.endfor
|
|
|
|
|
2009-08-24 13:10:55 +00:00
|
|
|
CLEANDIRS+= ${.OBJDIR}/include
|
2006-05-26 18:06:07 +00:00
|
|
|
.for file in ${MFILES}
|
2009-08-24 13:10:55 +00:00
|
|
|
CLEANFILES+= ${.OBJDIR}/include/${file:T:S/.m$/.h/}
|
|
|
|
${.OBJDIR}/include/${file:T:S/.m$/.h/}: ${S}/${file}
|
|
|
|
@mkdir -p ${.OBJDIR}/include
|
|
|
|
cd ${.OBJDIR}/include && ${AWK} -f $S/tools/makeobjops.awk ${S}/${file} -h
|
2006-05-26 18:06:07 +00:00
|
|
|
.endfor
|
|
|
|
|
|
|
|
#
|
|
|
|
# update target for the config files {config syntax change}
|
|
|
|
#
|
|
|
|
update-doxys:
|
|
|
|
.for config_file in ${_ALL}
|
|
|
|
@doxygen -u ${config_file}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.include "Dependencies"
|
|
|
|
.include <bsd.obj.mk>
|