#!/bin/sh

t1=/tmp/makesumall.$$

trap 'rm -f ${t1}; exit 1' 1 2 3 15 exit

DOCFORMATS="html pdf-a4 pdf-letter text"
_PYTHON_VERSIONS=`make -V _PYTHON_VERSIONS`

echo "TIMESTAMP = $(date +%s)" > ${t1}

for ver in ${_PYTHON_VERSIONS}; do
	ver2=`make -V PYTHON_PORTVERSION DEFAULT_VERSIONS=python=${ver}`
	for format in ${DOCFORMATS}; do
		rm -f distinfo
		make makesum PORTVERSION=${ver2} DOCFORMAT=${format} || exit 1
		egrep -v ^TIMESTAMP distinfo >> ${t1} || exit 1
	done
done
mv -f ${t1} distinfo
