3657fdc3412950c25decdd6e255be4b2cd9ea2be
[bpt/coccinelle.git] / docs / grammar / Makefile
1 TEX=cocci_syntax.tex
2 WEB=/var/www/localhost/htdocs/coccinelle/
3 EMNWEB=~/website/docs/
4
5 PDF=$(TEX:.tex=.pdf)
6 HTML=$(TEX:.tex=.html)
7
8
9 .phony: all html clean check
10
11 all: $(TEX)
12 pdflatex $<
13 pdflatex $<
14
15 html: $(HTML)
16
17 clean:
18 rm -f *.aux *.dvi *.haux *.htoc *.log *.out *~
19
20 distclean: clean
21 rm -f *.pdf *.html *.gif *.css
22
23 check: $(HTML)
24 checklink $<
25
26 world: all html
27
28 universe: world install
29
30 install:
31 cp *.css *.gif *.html $(WEB)
32 cp $(PDF) $(WEB)
33 chown apache:apache -R $(WEB)
34 chmod a-w -R $(WEB)
35
36 emn_install: world
37 cp *.css *.gif *.html $(EMNWEB)
38 cp $(PDF) $(EMNWEB)
39
40 ############################################
41 ############################################
42
43 .SUFFIXES: .html .tex
44
45 .tex.html:
46 # For Gentoo: /usr/lib64/hevea
47 # For Ubuntu family: /usr/share/hevea
48 # For default installation
49 @if [ -f /usr/lib64/hevea/xxdate.exe ]; then \
50 hevea -exec /usr/lib64/hevea/xxdate.exe $< ; \
51 hevea -exec /usr/lib64/hevea/xxdate.exe $< ; \
52 elif [ -f /usr/share/hevea/xxdate.exe ]; then \
53 hevea -exec /usr/share/hevea/xxdate.exe $< ; \
54 hevea -exec /usr/share/hevea/xxdate.exe $< ; \
55 elif [ -f /usr/local/lib/hevea/xxdate.exe ]; then \
56 hevea -exec /usr/local/lib/hevea/xxdate.exe $< ; \
57 hevea -exec /usr/local/lib/hevea/xxdate.exe $< ; \
58 else \
59 echo -e "\n\n *** Hevea: Unable to find xxdate.exe ***\n\n"; \
60 fi
61 hacha -o index.html cocci_syntax.html