2 # Copyright 2001-2007 Adrian Thurston <thurston@complang.org>
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.
30 # Installation locations.
33 datarootdir = @datarootdir@
37 MANPAGES = ragel.1 rlgen-cd.1 rlgen-java.1 rlgen-ruby.1 rlgen-dot.1
40 all: ragel-guide.pdf $(MANPAGES)
42 ragel-guide.pdf: $(PDFFIGS) $(INPUT)
48 pdflatex -interaction=nonstopmode $< >/dev/null
49 pdflatex -interaction=nonstopmode $< >/dev/null
50 pdflatex -interaction=nonstopmode $< >/dev/null
52 version.tex: ../version.mk
53 echo '|def|version{$(VERSION)}' | tr '|' '\\' > version.tex
54 echo '|def|pubdate{$(PUBDATE)}' | tr '|' '\\' >> version.tex
56 %.1: %.1.in ../version.mk
57 cat $< | sed 's/@PUBDATE@/$(PUBDATE)/' \
58 | sed 's/@VERSION@/$(VERSION)/' > $@
61 rm -f $(MANPAGES) *.bak *.aux *.dvi *.log *.toc *.pdf
69 install -d $(DESTDIR)$(mandir)/man1
70 install -m 644 ragel.1 $(DESTDIR)$(mandir)/man1/ragel.1
71 install -m 644 rlgen-dot.1 $(DESTDIR)$(mandir)/man1/rlgen-dot.1
72 install -m 644 rlgen-cd.1 $(DESTDIR)$(mandir)/man1/rlgen-cd.1
73 install -m 644 rlgen-java.1 $(DESTDIR)$(mandir)/man1/rlgen-java.1
74 install -m 644 rlgen-ruby.1 $(DESTDIR)$(mandir)/man1/rlgen-ruby.1
76 install: all man-install
77 install -d $(DESTDIR)$(docdir)
78 install -m 644 ragel-guide.pdf $(DESTDIR)$(docdir)/ragel-guide.pdf
79 gzip -c ../ChangeLog > ChangeLog.gz
80 install -m 644 ChangeLog.gz $(DESTDIR)$(docdir)/ChangeLog.gz