2 # Copyright 2001-2006 Adrian Thurston <thurston@cs.queensu.ca>
5 # This file is part of Ragel.
7 # Ragel is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # Ragel is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with Ragel; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 INPUT = version.tex ragel-guide.tex
23 # Pick up all the figures in the current dir.
24 FIGURES = $(wildcard *.fig)
25 PDFFIGS = $(FIGURES:%.fig=%.pdf)
27 # Get the version info.
34 all: ragel-guide.pdf ragel.1 rlcodegen.1
36 ragel-guide.pdf: $(PDFFIGS) $(INPUT)
42 pdflatex -interaction=nonstopmode $< >/dev/null
43 pdflatex -interaction=nonstopmode $< >/dev/null
44 pdflatex -interaction=nonstopmode $< >/dev/null
46 version.tex: ../version.mk
47 echo '\def\version{$(VERSION)}' > version.tex
48 echo '\def\pubdate{$(PUBDATE)}' >> version.tex
50 ragel.1: ragel.1.in ../version.mk
51 cat ragel.1.in | sed 's/@PUBDATE@/$(PUBDATE)/' \
52 | sed 's/@VERSION@/$(VERSION)/' > ragel.1
54 rlcodegen.1: rlcodegen.1.in ../version.mk
55 cat rlcodegen.1.in | sed 's/@PUBDATE@/$(PUBDATE)/' \
56 | sed 's/@VERSION@/$(VERSION)/' > rlcodegen.1
59 rm -f ragel.1 rlcodegen.1 \
60 *.bak *.aux *.dvi *.log *.toc *.pdf
66 install -d $(PREFIX)/man/man1
67 install -m 644 ragel.1 $(PREFIX)/man/man1/ragel.1
68 install -m 644 rlcodegen.1 $(PREFIX)/man/man1/rlcodegen.1
69 install -d $(PREFIX)/share/doc/ragel
70 install -m 644 ragel-guide.pdf $(PREFIX)/share/doc/ragel/ragel-guide.pdf
71 gzip -c ../ChangeLog > ChangeLog.gz
72 install -m 644 ChangeLog.gz $(PREFIX)/share/doc/ragel/ChangeLog.gz