Revision b1d8a4c546531d6a79f9a7be156205c6a40f215c authored by Brian Viele on 20 March 2020, 22:21:38 UTC, committed by Brian Viele on 23 March 2020, 13:23:21 UTC
Separated definitions that did not seem consistent between the "v2" EXTI
platforms. Added SYSCFG defs needed for EXTICR settings.
1 parent 89074d6
Raw File
gendoxylist
#!/bin/sh
# Karl Palsson <karlp@tweak.net.au> Sept 2017
# Parse .d files for a given target, and generate a doxygen config file 
# stub that is to be "@INCLUDE = <xxx>" into a doxygen template file.

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 "# All headers for core/platform, not always caught by .d file tracking\n" >> ${ODIR}/${ONAME}
UNTRACKED_DIRS="../include/libopencm3/cm3 ../include/libopencm3/${IPATH}"
for FN in $(find ${UNTRACKED_DIRS} -name '*.h' | sort); 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}

printf "# Now sources\n" >> ${ODIR}/${ONAME}
grep -o '[^ ]*\.c' ${DDIR}/*.d | cut -d ':' -f 2 | sort | uniq | sed "s#^#INPUT += $PATH_DELTA/#" >> ${ODIR}/${ONAME}
back to top