1# 2# $FreeBSD$ 3# 4 5_ALL!= cd ${.CURDIR} && ls Doxyfile-* 6ALL= ${_ALL:C/Doxyfile-//g} 7PDF_ALL=${_ALL:C/Doxyfile/pdf/g} 8 9TARGET_ARCH?= ${MACHINE_ARCH} 10S?=/usr/src/sys 11LOCALBASE?=/usr/local 12 13MFILES+=dev/acpica/acpi_if.m 14MFILES+=dev/ata/ata_if.m 15MFILES+=dev/eisa/eisa_if.m 16MFILES+=dev/iicbus/iicbb_if.m 17MFILES+=dev/iicbus/iicbus_if.m 18MFILES+=dev/mii/miibus_if.m 19MFILES+=dev/mmc/mmcbr_if.m 20MFILES+=dev/mmc/mmcbus_if.m 21MFILES+=dev/ofw/ofw_bus_if.m 22MFILES+=dev/pccard/card_if.m 23MFILES+=dev/pccard/power_if.m 24MFILES+=dev/pci/pci_if.m 25MFILES+=dev/pci/pcib_if.m 26MFILES+=dev/ppbus/ppbus_if.m 27MFILES+=dev/scc/scc_if.m 28MFILES+=dev/smbus/smbus_if.m 29MFILES+=dev/sound/midi/mpu_if.m 30MFILES+=dev/sound/midi/mpufoi_if.m 31MFILES+=dev/sound/midi/synth_if.m 32MFILES+=dev/sound/pcm/ac97_if.m 33MFILES+=dev/sound/pcm/channel_if.m 34MFILES+=dev/sound/pcm/feeder_if.m 35MFILES+=dev/sound/pcm/mixer_if.m 36MFILES+=dev/spibus/spibus_if.m 37MFILES+=dev/uart/uart_if.m 38MFILES+=dev/usb/usb_if.m 39MFILES+=geom/part/g_part_if.m 40MFILES+=isa/isa_if.m 41MFILES+=kern/bus_if.m 42MFILES+=kern/clock_if.m 43MFILES+=kern/cpufreq_if.m 44MFILES+=kern/device_if.m 45MFILES+=kern/linker_if.m 46MFILES+=kern/serdev_if.m 47MFILES+=libkern/iconv_converter_if.m 48MFILES+=opencrypto/cryptodev_if.m 49MFILES+=pc98/pc98/canbus_if.m 50MFILES+=pci/agp_if.m 51MFILES+=powerpc/powerpc/mmu_if.m 52MFILES+=powerpc/powerpc/pic_if.m 53MFILES+=sparc64/pci/ofw_pci_if.m 54MFILES+=sun4v/mdesc/mdesc_bus_if.m 55 56HFILES= ${MFILES:T:S/.m$/.h/} 57AWK?= awk 58 59.MAIN: usage 60 61usage: 62 @echo "Possible targets are:" 63.for entry in ${ALL} 64 @echo " ${entry}" 65 @echo " pdf-${entry}" 66 @echo " clean-${entry}" 67.endfor 68 @echo 69 @echo " all" 70 @echo " pdf-all" 71 @echo " clean" 72 73all: ${ALL} 74pdf-all:${PDF_ALL} 75 76mfiles: ${HFILES:S/^/${.OBJDIR}\//} 77 78DOXYGEN_DEST_PATH= ${.OBJDIR} 79DOXYGEN_LATEX_DEST_PATH=${.OBJDIR} 80DOXYGEN_PDF_DEST_PATH= ${.OBJDIR} 81 82.if exists{${S}/${TARGET_ARCH}/linux} 83DOXYGEN_LINUX_PATH= ${S}/${TARGET_ARCH}/linux 84.endif 85.if exists{${S}/${TARGET_ARCH}/linux32} 86DOXYGEN_LINUX_PATH+= ${S}/${TARGET_ARCH}/linux32 87.endif 88 89# 90# generate the necessary targets 91# 92.for target in ${ALL} 93${target}: mfiles ${.OBJDIR}/${target}/${target}.tag 94 95${.OBJDIR}/${target}/${target}.tag: 96 @mkdir -p ${.OBJDIR}/${target} 97 @cd ${.OBJDIR} && \ 98 env DOXYGEN_INCLUDE_PATH=${.CURDIR} \ 99 DOXYGEN_SRC_PATH=${S} \ 100 DOXYGEN_DEST_PATH=${DOXYGEN_DEST_PATH} \ 101 DOXYGEN_SRC_INCLUDE_PATH="${S}/sys ${S}/../include ${S}/${TARGET_ARCH}/include" \ 102 DOXYGEN_TARGET_ARCH=${TARGET_ARCH} \ 103 DOXYGEN_LINUX_PATH=${DOXYGEN_LINUX_PATH} \ 104 NOTREVIEWED=${.CURDIR}/notreviewed.dox \ 105 PATH=${LOCALBASE}/bin:${PATH} \ 106 doxygen ${.CURDIR}/Doxyfile-${target} 107 @echo "API docs for ${target} are now available in ${.OBJDIR}/${target}/." | /usr/bin/fmt 108 109pdf-${target}: ${.OBJDIR}/${target}/${target}.tag 110 @cd ${DOXYGEN_LATEX_DEST_PATH}/${target}/latex && ${MAKE} refman.pdf && cp refman.pdf ${DOXYGEN_PDF_DEST_PATH}/${target}.pdf 111 @echo "API docs for ${target} are now available in ${DOXYGEN_PDF_DEST_PATH}/." | /usr/bin/fmt 112 113CLEANDIRS+= ${DOXYGEN_DEST_PATH}/${target} 114CLEANDIRS+= ${.OBJDIR}/${target}/ 115CLEANFILES+= ${DOXYGEN_PDF_DEST_PATH}/${target}.pdf 116clean-${target}: 117 rm -rf ${DOXYGEN_DEST_PATH}/${target} ${.OBJDIR}/${target} 118.endfor 119 120.for file in ${MFILES} 121CLEANDIRS+= ${.OBJDIR}/${file:T:S/.m$/.h/} 122${.OBJDIR}/${file:T:S/.m$/.h/}: ${S}/${file} 123 cd ${.OBJDIR}; ${AWK} -f $S/tools/makeobjops.awk ${S}/${file} -h 124.endfor 125 126# 127# update target for the config files {config syntax change} 128# 129update-doxys: 130.for config_file in ${_ALL} 131 @doxygen -u ${config_file} 132.endfor 133 134.include "Dependencies" 135.include <bsd.obj.mk> 136