From d002d9552fb004fe5ddff2c317bcd12b63d85139 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Wed, 4 Oct 2017 22:09:04 +0000 Subject: [PATCH] doc: dynamically generate correct file lists Instead of the fragile and error prone attempts to specifically include/exclude files from doxygen by name and pattern, simply use the already generated .d files to provide accurate and up to date lists of all source files used. Pros: * Nothing left to worry about * Much more encouraging to actually _work_ on the documentation now that you can be sure the right docs will be generated instead of a confusing mix. Downsides/Upsides: * Automatically includes all CM3/USB in each device's page _as well_ now Downsides: * lpc43xx still manually listed. However, completely contained in it's own dir, so no problems * No attempt to carry this in latex. easy, but more tempted to drop latex support outright. (I don't think the generation there has even worked for a while now) * Due to the mismatch between lib directories and document roots, the sourcelist can't be magically created per directory. There has to be some sort of mapping between the two, so as this is doc generation only, a static list seems sane for maintennance. (Especially compared to the old method) * Source list generation probably doesn't work on windows. --- .gitignore | 1 + doc/Makefile | 31 +++++++++++++++++++++++++++++-- doc/efm32g/Doxyfile | 7 ++----- doc/efm32gg/Doxyfile | 7 ++----- doc/efm32lg/Doxyfile | 7 ++----- doc/efm32tg/Doxyfile | 7 ++----- doc/lm3s/Doxyfile | 5 ++--- doc/lm4f/Doxyfile | 5 ++--- doc/lpc13xx/Doxyfile | 5 ++--- doc/lpc43xx/Doxyfile | 6 +++--- doc/sam3a/Doxyfile | 12 ++---------- doc/sam3n/Doxyfile | 12 ++---------- doc/sam3s/Doxyfile | 12 ++---------- doc/sam3u/Doxyfile | 12 ++---------- doc/sam3x/Doxyfile | 12 ++---------- doc/stm32f0/Doxyfile | 17 +++-------------- doc/stm32f1/Doxyfile | 23 ++--------------------- doc/stm32f2/Doxyfile | 16 ++-------------- doc/stm32f3/Doxyfile | 18 ++---------------- doc/stm32f4/Doxyfile | 16 ++-------------- doc/stm32f7/Doxyfile | 16 ++-------------- doc/stm32l0/Doxyfile | 20 ++------------------ doc/stm32l1/Doxyfile | 25 ++----------------------- doc/vf6xx/Doxyfile | 8 ++------ scripts/gendoxylist | 21 +++++++++++++++++++++ 25 files changed, 97 insertions(+), 224 deletions(-) create mode 100755 scripts/gendoxylist diff --git a/.gitignore b/.gitignore index da0940de..52599a7a 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ include/libopencm3/**/nvic.h include/libopencm3/**/**/nvic.h lib/**/vector_nvic.c lib/**/**/vector_nvic.c +doxy.sourcelist include/libopencmsis/efm32/ include/libopencmsis/lm3s/ include/libopencmsis/lpc13xx/ diff --git a/doc/Makefile b/doc/Makefile index a4b93fb1..960e4ecf 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -15,7 +15,7 @@ PDFS := $(ARCHS:=.pdf) doc: html latex -html: cm3 usb $(ARCHS) +html: rebuildsources cm3 usb $(ARCHS) doxygen latex: $(PDFS) @@ -35,5 +35,32 @@ $(ARCHS): clean: @rm -rf html/ */html/ */latex/ *.pdf */*.tag -.PHONY: doc html cm3 usb $(ARCHS) latex +rebuildsources: + @printf "Manually regenerating source lists from build deps\n" + ../scripts/gendoxylist ../lib/stm32/f0 stm32f0 + ../scripts/gendoxylist ../lib/stm32/f1 stm32f1 + ../scripts/gendoxylist ../lib/stm32/f2 stm32f2 + ../scripts/gendoxylist ../lib/stm32/f3 stm32f3 + ../scripts/gendoxylist ../lib/stm32/f4 stm32f4 + ../scripts/gendoxylist ../lib/stm32/f7 stm32f7 + ../scripts/gendoxylist ../lib/stm32/l0 stm32l0 + ../scripts/gendoxylist ../lib/stm32/l1 stm32l1 + ../scripts/gendoxylist ../lib/stm32/l4 stm32l4 + ../scripts/gendoxylist ../lib/stm32/l4 stm32l4 + ../scripts/gendoxylist ../lib/efm32/g efm32g + ../scripts/gendoxylist ../lib/efm32/gg efm32gg + ../scripts/gendoxylist ../lib/efm32/lg efm32lg + ../scripts/gendoxylist ../lib/efm32/tg efm32tg + ../scripts/gendoxylist ../lib/lm3s lm3s + ../scripts/gendoxylist ../lib/lm4f lm4f + ../scripts/gendoxylist ../lib/lpc13xx lpc13xx + ../scripts/gendoxylist ../lib/lpc17xx lpc17xx + ../scripts/gendoxylist ../lib/sam/3a sam3a + ../scripts/gendoxylist ../lib/sam/3n sam3n + ../scripts/gendoxylist ../lib/sam/3s sam3s + ../scripts/gendoxylist ../lib/sam/3u sam3u + ../scripts/gendoxylist ../lib/sam/3x sam3x + ../scripts/gendoxylist ../lib/vf6xx vf6xx + +.PHONY: doc html cm3 usb $(ARCHS) latex rebuildsources diff --git a/doc/efm32g/Doxyfile b/doc/efm32g/Doxyfile index a3a65c76..566d50e8 100644 --- a/doc/efm32g/Doxyfile +++ b/doc/efm32g/Doxyfile @@ -15,11 +15,8 @@ WARN_LOGFILE = doxygen_efm32g.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/efm32/efm32g \ - ../../lib/efm32/efm32g - -EXCLUDE = +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_efm32g.xml diff --git a/doc/efm32gg/Doxyfile b/doc/efm32gg/Doxyfile index 1b939004..7b9cda5b 100644 --- a/doc/efm32gg/Doxyfile +++ b/doc/efm32gg/Doxyfile @@ -15,11 +15,8 @@ WARN_LOGFILE = doxygen_efm32gg.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/efm32/efm32gg \ - ../../lib/efm32/efm32gg - -EXCLUDE = +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_efm32gg.xml diff --git a/doc/efm32lg/Doxyfile b/doc/efm32lg/Doxyfile index 2139da58..7d5269fa 100644 --- a/doc/efm32lg/Doxyfile +++ b/doc/efm32lg/Doxyfile @@ -15,11 +15,8 @@ WARN_LOGFILE = doxygen_efm32lg.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/efm32/efm32lg \ - ../../lib/efm32/efm32lg - -EXCLUDE = +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_efm32lg.xml diff --git a/doc/efm32tg/Doxyfile b/doc/efm32tg/Doxyfile index 1610f21f..6ea2b79c 100644 --- a/doc/efm32tg/Doxyfile +++ b/doc/efm32tg/Doxyfile @@ -15,11 +15,8 @@ WARN_LOGFILE = doxygen_efm32tg.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/efm32/efm32tg \ - ../../lib/efm32/efm32tg - -EXCLUDE = +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_efm32tg.xml diff --git a/doc/lm3s/Doxyfile b/doc/lm3s/Doxyfile index d7feff22..07a62966 100644 --- a/doc/lm3s/Doxyfile +++ b/doc/lm3s/Doxyfile @@ -15,9 +15,8 @@ WARN_LOGFILE = doxygen_lm3s.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/lm3s \ - ../../lib/lm3s +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_lm3s.xml diff --git a/doc/lm4f/Doxyfile b/doc/lm4f/Doxyfile index 284ac7ab..16164ce2 100644 --- a/doc/lm4f/Doxyfile +++ b/doc/lm4f/Doxyfile @@ -15,9 +15,8 @@ WARN_LOGFILE = doxygen_lm4f.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/lm4f \ - ../../lib/lm4f +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_lm4f.xml diff --git a/doc/lpc13xx/Doxyfile b/doc/lpc13xx/Doxyfile index d8284fc5..4ed9d5f8 100644 --- a/doc/lpc13xx/Doxyfile +++ b/doc/lpc13xx/Doxyfile @@ -15,9 +15,8 @@ WARN_LOGFILE = doxygen_lpc13xx.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/lpc13xx \ - ../../lib/lpc13xx +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_lpc13xx.xml diff --git a/doc/lpc43xx/Doxyfile b/doc/lpc43xx/Doxyfile index fc6a3114..52be8d6e 100644 --- a/doc/lpc43xx/Doxyfile +++ b/doc/lpc43xx/Doxyfile @@ -15,9 +15,9 @@ WARN_LOGFILE = doxygen_lpc43xx.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/lpc43xx \ - ../../lib/lpc43xx +INPUT = ../../include/libopencm3/license.dox +INPUT += ../../include/libopencm3/lpc43xx +INPUT += ../../lib/lpc43xx LAYOUT_FILE = DoxygenLayout_lpc43xx.xml diff --git a/doc/sam3a/Doxyfile b/doc/sam3a/Doxyfile index 4ec920c4..ea06caee 100644 --- a/doc/sam3a/Doxyfile +++ b/doc/sam3a/Doxyfile @@ -17,16 +17,8 @@ WARN_LOGFILE = doxygen_sam3a.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/sam/3a \ - ../../include/libopencm3/sam/common - -INPUT += ../../lib/sam/3a \ - ../../lib/sam/common - -EXCLUDE = - -EXCLUDE_PATTERNS = *_common_3n3s.h +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_sam3a.xml diff --git a/doc/sam3n/Doxyfile b/doc/sam3n/Doxyfile index c268821c..a2dd4612 100644 --- a/doc/sam3n/Doxyfile +++ b/doc/sam3n/Doxyfile @@ -17,16 +17,8 @@ WARN_LOGFILE = doxygen_sam3n.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/sam/3n \ - ../../include/libopencm3/sam/common - -INPUT += ../../lib/sam/3n \ - ../../lib/sam/common - -EXCLUDE = - -EXCLUDE_PATTERNS = *_common_3a3u3x.h +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_sam3n.xml diff --git a/doc/sam3s/Doxyfile b/doc/sam3s/Doxyfile index 2c6a2ebb..66a966fa 100644 --- a/doc/sam3s/Doxyfile +++ b/doc/sam3s/Doxyfile @@ -17,16 +17,8 @@ WARN_LOGFILE = doxygen_sam3s.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/sam/3s \ - ../../include/libopencm3/sam/common - -INPUT += ../../lib/sam/3a \ - ../../lib/sam/common - -EXCLUDE = - -EXCLUDE_PATTERNS = *_common_3a3u3x.h +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_sam3s.xml diff --git a/doc/sam3u/Doxyfile b/doc/sam3u/Doxyfile index 72fddf45..0503fb33 100644 --- a/doc/sam3u/Doxyfile +++ b/doc/sam3u/Doxyfile @@ -17,16 +17,8 @@ WARN_LOGFILE = doxygen_sam3u.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/sam/3u \ - ../../include/libopencm3/sam/common - -INPUT += ../../lib/sam/3u \ - ../../lib/sam/common - -EXCLUDE = - -EXCLUDE_PATTERNS = *_common_3n3s.h +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_sam3u.xml diff --git a/doc/sam3x/Doxyfile b/doc/sam3x/Doxyfile index ce5e62a7..df4fe9e5 100644 --- a/doc/sam3x/Doxyfile +++ b/doc/sam3x/Doxyfile @@ -17,16 +17,8 @@ WARN_LOGFILE = doxygen_sam3x.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/sam/3x \ - ../../include/libopencm3/sam/common - -INPUT += ../../lib/sam/3x \ - ../../lib/sam/common - -EXCLUDE = - -EXCLUDE_PATTERNS = *_common_3n3s.h +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_sam3x.xml diff --git a/doc/stm32f0/Doxyfile b/doc/stm32f0/Doxyfile index 725499db..3c1d999a 100644 --- a/doc/stm32f0/Doxyfile +++ b/doc/stm32f0/Doxyfile @@ -1,4 +1,4 @@ -# HTML Documentation for STM32F1 code level +# HTML Documentation for STM32F0 code level # 14 September 2012 # (C) Ken Sarkies @@ -15,19 +15,8 @@ WARN_LOGFILE = doxygen_stm32f0.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/stm32/f0 \ - ../../include/libopencm3/stm32/common - -INPUT += ../../lib/stm32/f0 \ - ../../lib/stm32/common - -EXCLUDE = ../../include/libopencm3/stm32/f0/usb.h \ - ../../include/libopencm3/stm32/f0/usb_desc.h - -EXCLUDE_PATTERNS = *_common_*f24.h *_common_*f24.c \ - *_common_*f234.h *_common_*f234.c \ - *_common_*f124.h *_common_*f124.c +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_stm32f0.xml diff --git a/doc/stm32f1/Doxyfile b/doc/stm32f1/Doxyfile index 556b6230..65432dee 100644 --- a/doc/stm32f1/Doxyfile +++ b/doc/stm32f1/Doxyfile @@ -15,27 +15,8 @@ WARN_LOGFILE = doxygen_stm32f1.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/stm32/f1 \ - ../../include/libopencm3/stm32/common - -INPUT += ../../lib/stm32/f1 \ - ../../lib/stm32/common - -EXCLUDE = ../../include/libopencm3/stm32/f1/usb.h \ - ../../include/libopencm3/stm32/f1/usb_desc.h \ - ../../include/libopencm3/stm32/common/crs_common_all.h - -EXCLUDE += ../../lib/stm32/common/crs_common_all.c \ - ../../lib/stm32/common/rtc_common_l1f024.c \ - ../../lib/stm32/common/ - -EXCLUDE_PATTERNS = *_common_*f24.h *_common_*f24.c \ - *_common_*f234.h *_common_*f234.c \ - *_common_*f0234.h *_common_*f0234.c \ - *_common_*f024.h *_common_*f024.c \ - *_common_*f03.h *_common_*f03.c \ - *_common_l01.h _common_l01.c +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_stm32f1.xml diff --git a/doc/stm32f2/Doxyfile b/doc/stm32f2/Doxyfile index b522998f..88eb906f 100644 --- a/doc/stm32f2/Doxyfile +++ b/doc/stm32f2/Doxyfile @@ -15,20 +15,8 @@ WARN_LOGFILE = doxygen_stm32f2.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/stm32/f2 \ - ../../include/libopencm3/stm32/common - -INPUT += ../../lib/stm32/f2 \ - ../../lib/stm32/common - -EXCLUDE = - -EXCLUDE_PATTERNS = *_common_f13.h *_common_f13.c \ - *_common_*f013.h *_common_*f013.c \ - *_common_*f01.h *_common_*f01.c \ - *_common_*f03.h *_common_*f03.c \ - *crs_common_all.[ch] +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_stm32f2.xml diff --git a/doc/stm32f3/Doxyfile b/doc/stm32f3/Doxyfile index f751db82..8c788ef6 100644 --- a/doc/stm32f3/Doxyfile +++ b/doc/stm32f3/Doxyfile @@ -12,22 +12,8 @@ WARN_LOGFILE = doxygen_stm32f3.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/stm32/f3 \ - ../../include/libopencm3/stm32/common - -INPUT += ../../lib/stm32/f3 \ - ../../lib/stm32/common - -EXCLUDE = ../../include/libopencm3/stm32/f3/usb.h \ - ../../include/libopencm3/stm32/f3/usb_desc.h - -EXCLUDE_PATTERNS = *_common_*f*24.h *_common_*f*24.c \ - *_common_*f01.h *_common_*f01.c \ - *_common_bcd.h *_common_bcd.c \ - *crs_common_all.[ch] -EXCLUDE_PATTERNS += *adc_common_v1* *adc_common_v2_single* -EXCLUDE_PATTERNS += *pwr_common_l01.* +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_stm32f3.xml diff --git a/doc/stm32f4/Doxyfile b/doc/stm32f4/Doxyfile index 5c1dcd61..67f4ed8f 100644 --- a/doc/stm32f4/Doxyfile +++ b/doc/stm32f4/Doxyfile @@ -15,20 +15,8 @@ WARN_LOGFILE = doxygen_stm32f4.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/stm32/f4 \ - ../../include/libopencm3/stm32/common - -INPUT += ../../lib/stm32/f4 \ - ../../lib/stm32/common - -EXCLUDE = - -EXCLUDE_PATTERNS = *_common_f*3.h *_common_f*3.c \ - *_common_*f013.h *_common_*f013.c \ - *_common_*f01.h *_common_*f01.c \ \ - *_common_*f03.h *_common_*f03.c \ - *crs_common_all.[ch] +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_stm32f4.xml diff --git a/doc/stm32f7/Doxyfile b/doc/stm32f7/Doxyfile index 3c2bd708..3d2c9e45 100644 --- a/doc/stm32f7/Doxyfile +++ b/doc/stm32f7/Doxyfile @@ -15,20 +15,8 @@ WARN_LOGFILE = doxygen_stm32f7.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/stm32/f7 \ - ../../include/libopencm3/stm32/common - -INPUT += ../../lib/stm32/f7 \ - ../../lib/stm32/common - -EXCLUDE = - -EXCLUDE_PATTERNS = *_common_f*3.h *_common_f*3.c \ - *_common_*f013.h *_common_*f013.c \ - *_common_*f01.h *_common_*f01.c \ \ - *_common_*f03.h *_common_*f03.c -EXCLUDE_PATTERNS += pwr_common_v1.* pwr_common_v2.* +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_stm32f7.xml diff --git a/doc/stm32l0/Doxyfile b/doc/stm32l0/Doxyfile index 496336ff..6a5f10b5 100644 --- a/doc/stm32l0/Doxyfile +++ b/doc/stm32l0/Doxyfile @@ -15,24 +15,8 @@ WARN_LOGFILE = doxygen_stm32l0.log -INPUT = ../../include/libopencm3/license.dox -INPUT +=../../include/libopencm3/stm32/l0 -INPUT +=../../include/libopencm3/stm32/common - -INPUT +=../../lib/stm32/l0 -INPUT +=../../lib/stm32/common - -EXCLUDE = ../../include/libopencm3/stm32/common/gpio_common_f24.h -EXCLUDE +=../../include/libopencm3/stm32/common/timer_common_f24.h \ -EXCLUDE +=../../include/libopencm3/stm32/common/crypto_common_f24.h \ -EXCLUDE +=../../include/libopencm3/stm32/common/hash_common_f24.h - -EXCLUDE =../../lib/stm32/common/gpio_common_f24.c -EXCLUDE =../../lib/stm32/common/timer_common_f24.c -EXCLUDE =../../lib/stm32/common/crypto_common_f24.c -EXCLUDE =../../lib/stm32/common/hash_common_f24.c - -EXCLUDE_PATTERNS = +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_stm32l0.xml diff --git a/doc/stm32l1/Doxyfile b/doc/stm32l1/Doxyfile index 98835ab8..95820578 100644 --- a/doc/stm32l1/Doxyfile +++ b/doc/stm32l1/Doxyfile @@ -15,29 +15,8 @@ WARN_LOGFILE = doxygen_stm32l1.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/stm32/l1 \ - ../../include/libopencm3/stm32/common - -INPUT += ../../lib/stm32/l1 \ - ../../lib/stm32/common - -EXCLUDE = ../../include/libopencm3/stm32/common/gpio_common_f24.h \ - ../../include/libopencm3/stm32/common/gpio_common_f234.h \ - ../../include/libopencm3/stm32/common/timer_common_f24.h \ - ../../include/libopencm3/stm32/common/crypto_common_f24.h \ - ../../include/libopencm3/stm32/common/hash_common_f24.h \ - ../../include/libopencm3/stm32/common/crs_common_all.h - -EXCLUDE += ../../lib/stm32/common/gpio_common_f24.c \ - ../../lib/stm32/common/timer_common_f24.c \ - ../../lib/stm32/common/crypto_common_f24.c \ - ../../lib/stm32/common/hash_common_f24.c \ - ../../lib/stm32/common/crs_common_all.c - -EXCLUDE_PATTERNS = *common/flash_common_f*.* -EXCLUDE_PATTERNS += *common/adc_common_v2* -EXCLUDE_PATTERNS += *common/spi_common_f03.* +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_stm32l1.xml diff --git a/doc/vf6xx/Doxyfile b/doc/vf6xx/Doxyfile index 93dfb661..5041a4b3 100644 --- a/doc/vf6xx/Doxyfile +++ b/doc/vf6xx/Doxyfile @@ -15,12 +15,8 @@ WARN_LOGFILE = doxygen_vf6xx.log -INPUT = ../../include/libopencm3/license.dox \ - ../../include/libopencm3/vf6xx - -INPUT += ../../lib/vf6xx - -EXCLUDE = +INPUT = ../../include/libopencm3/license.dox +@INCLUDE = doxy.sourcelist LAYOUT_FILE = DoxygenLayout_vf6xx.xml diff --git a/scripts/gendoxylist b/scripts/gendoxylist new file mode 100755 index 00000000..6129f5bf --- /dev/null +++ b/scripts/gendoxylist @@ -0,0 +1,21 @@ +#!/bin/sh +# Karl Palsson Sept 2017 +# Parse .d files for a given target, and generate a doxygen config file +# stub that is to be "@INCLUDE = " into a doxygen template file. + +DDIR=$1 +ODIR=$2 +ONAME=doxy.sourcelist + +PATH_DELTA=$(realpath --relative-to=${ODIR} ${DDIR}) + +printf "# This file is autogenerated by scripts/gendoxylist\n" > ${ODIR}/${ONAME} +printf "# Documentation only header, not caught by .d file tracking" >> ${ODIR}/${ONAME} +FN=$(find ../include/libopencm3/ -name doc-$(basename ${ODIR}).h) +printf "INPUT += ../%s\n" "$FN" > ${ODIR}/${ONAME} + +printf "# Headers first\n" >> ${ODIR}/${ONAME} +grep -o '[^ ]*.h' ${DDIR}/*.d | grep 'include/libopencm3' | cut -d ':' -f2 | sort | uniq | sed "s#^#INPUT += ${PATH_DELTA}/#" >> ${ODIR}/${ONAME} + +printf "# Now sources\n" >> ${ODIR}/${ONAME} +grep -o '[^ ]*\.c' ${DDIR}/*.d | cut -d ':' -f 2 | sort | uniq | sed "s#^#INPUT += $PATH_DELTA/#" >> ${ODIR}/${ONAME}