From 313d82ba02f117f9a6fe15280ee84f31cd9bdf76 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Mon, 23 Oct 2017 20:58:04 +0000 Subject: [PATCH] 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. --- scripts/gendoxylist | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/gendoxylist b/scripts/gendoxylist index 6129f5bf..361feb2f 100755 --- a/scripts/gendoxylist +++ b/scripts/gendoxylist @@ -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}