3
SOURCEDIR=doc/source/api
5
if [ ! -d ${SOURCEDIR} ] ; then
9
for x in `./doc/find_autodoc_modules.sh`;
11
echo "Generating ${SOURCEDIR}/${x}.rst"
12
echo "${SOURCEDIR}/${x}.rst" >> .autogenerated
13
heading="The :mod:\`${x}\` Module"
14
# Figure out how long the heading is
15
# and make sure to emit that many '=' under
16
# it to avoid heading format errors
18
heading_len=$(echo "$heading" | wc -c)
19
underline=$(head -c $heading_len < /dev/zero | tr '\0' '=')
29
) > ${SOURCEDIR}/${x}.rst
33
if [ ! -f ${SOURCEDIR}/autoindex.rst ] ; then
35
cat > ${SOURCEDIR}/autoindex.rst <<EOF
40
for f in `cat .autogenerated | sort` ; do
41
relative=`echo ${f} | sed -e 's$^'${SOURCEDIR}'/$$'`
42
echo " ${relative}" >> ${SOURCEDIR}/autoindex.rst
45
echo ${SOURCEDIR}/autoindex.rst >> .autogenerated