aboutsummaryrefslogtreecommitdiffstats
path: root/examples/intel/MAX10/runme_postsynth
blob: f1621054062a51b45fc4429c9d1fe70ae6bd51e5 (plain)
1
2
3
4
5
id='n31' href='#n31'>31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
#!/bin/bash

fast_mode=false
update_mode=false

set -- $(getopt fu "$@")
while [ $# -gt 0 ]; do
	case "$1" in
		-f)
			fast_mode=true
			;;
		-u)
			update_mode=true
			;;
		--)
			shift
			break
			;;
		-*)
			echo "$0: error - unrecognized option $1" 1>&2
			exit 1
			;;
		*)
			break
	esac
	shift
done

PDFTEX_OPT="-shell-escape -halt-on-error"

if $update_mode; then
	make -C ..
	../yosys -p 'help -write-tex-command-reference-manual'
fi

if ! $fast_mode; then
	md5sum *.aux *.bbl *.blg > autoloop.old
fi

set -ex

pdflatex $PDFTEX_OPT manual.tex

if ! $fast_mode; then
	bibtex manual.aux
	bibtex weblink.aux

	while
		md5sum *.aux *.bbl *.blg > autoloop.new
		! cmp autoloop.old autoloop.new
	do
		cp autoloop.new autoloop.old
		pdflatex $PDFTEX_OPT manual.tex
	done

	rm -f autoloop.old
	rm -f autoloop.new
fi