Merge pull request #1545 from YosysHQ/eddie/ice40_wrapcarry_attr
[yosys.git] / manual / manual.sh
1 #!/bin/bash
2
3 fast_mode=false
4 update_mode=false
5
6 set -- $(getopt fu "$@")
7 while [ $# -gt 0 ]; do
8 case "$1" in
9 -f)
10 fast_mode=true
11 ;;
12 -u)
13 update_mode=true
14 ;;
15 --)
16 shift
17 break
18 ;;
19 -*)
20 echo "$0: error - unrecognized option $1" 1>&2
21 exit 1
22 ;;
23 *)
24 break
25 esac
26 shift
27 done
28
29 PDFTEX_OPT="-shell-escape -halt-on-error"
30
31 if $update_mode; then
32 make -C ..
33 ../yosys -p 'help -write-tex-command-reference-manual'
34 fi
35
36 if ! $fast_mode; then
37 md5sum *.aux *.bbl *.blg > autoloop.old
38 fi
39
40 set -ex
41
42 pdflatex $PDFTEX_OPT manual.tex
43
44 if ! $fast_mode; then
45 bibtex manual.aux
46 bibtex weblink.aux
47
48 while
49 md5sum *.aux *.bbl *.blg > autoloop.new
50 ! cmp autoloop.old autoloop.new
51 do
52 cp autoloop.new autoloop.old
53 pdflatex $PDFTEX_OPT manual.tex
54 done
55
56 rm -f autoloop.old
57 rm -f autoloop.new
58 fi
59