#!/bin/sh

if [ -e Makefile ] ; then
    make clean
    exit
fi

TEMPFILE=$(mktemp)

cat <<EOF >${TEMPFILE}
clean:
	\$(RM) *~ #*# *.aux *.bcf *.bbl *.toc *.blg *.lol *.log *.out *.run.xml flycheck_* 
EOF

make -f ${TEMPFILE} clean

rm ${TEMPFILE}
