doxygen: include all target headers

Even if they haven't been referenced from a .c file.  Some peripherals
start their life as register definitions only, and they should still
have the documentation generated.

There _will_ be overlap in the generated lists, but doxygen doesn't seem
to mind this.
This commit is contained in:
Karl Palsson 2017-10-23 20:58:04 +00:00
parent 38125e9941
commit 313d82ba02
1 changed files with 6 additions and 3 deletions

View File

@ -6,14 +6,17 @@
DDIR=$1
ODIR=$2
ONAME=doxy.sourcelist
IPATH=$(echo ${DDIR} | sed -e 's#../lib/##')
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 "# All headers for platform, not always caught by .d file tracking" >> ${ODIR}/${ONAME}
for FN in FN=$(find ../include/libopencm3/${IPATH} -name '*.h'); do
printf "INPUT += ../%s\n" "$FN" >> ${ODIR}/${ONAME}
done
# There will be duplicates here, but doxygen doesn't mind.
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}