1 ##############################################################################
3 ##############################################################################
11 # emacs, auctex, ediff
15 ##############################################################################
17 ##############################################################################
18 .PHONY
: all clean distclean
21 all: manual.pdf cocci_syntax.pdf options.pdf
26 mv main.pdf manual.pdf
31 cocci_syntax.pdf
: main_grammar.
tex cocci_syntax.
tex macros_listing_cocci.
tex macros_grammar.
tex macros_common.
tex examples.
tex tips.
tex
32 pdflatex main_grammar.
tex
33 pdflatex main_grammar.
tex
34 mv main_grammar.pdf cocci_syntax.pdf
36 options.pdf
: main_options.
tex spatch_options.
tex macros_options.
tex
37 pdflatex main_options.
tex
38 pdflatex main_options.
tex
39 mv main_options.pdf options.pdf
45 rm -f manual.pdf cocci_syntax.pdf options.pdf
49 #RERUN = Rerun (LaTeX|to get cross-references right)
55 # if egrep -s '$(RERUN)' $*.log ;then $(PDFLATEX) $<; fi
56 # if egrep -s '$(RERUN)' $*.log ;then $(PDFLATEX) $<; fi
58 ##############################################################################
60 ##############################################################################
66 WEB
=/var
/www
/localhost
/htdocs
/coccinelle
/
67 EMNWEB
=~
/website
/docs
/
70 HTML
=$(TEX
:.
tex=.html
)
75 rm -f
*.aux
*.
dvi *.haux
*.htoc
*.log
*.out
*~
78 rm -f
*.pdf
*.html
*.gif
*.css
85 universe
: world
install
88 cp
*.css
*.gif
*.html
$(WEB
)
90 chown apache
:apache
-R
$(WEB
)
94 cp
*.css
*.gif
*.html
$(EMNWEB
)
101 # For Gentoo: /usr/lib64/hevea
102 # For Ubuntu family: /usr/share/hevea
103 # For default installation
104 @if
[ -f
/usr
/lib64
/hevea
/xxdate.exe
]; then \
105 hevea
-exec
/usr
/lib64
/hevea
/xxdate.exe
$< ; \
106 hevea
-exec
/usr
/lib64
/hevea
/xxdate.exe
$< ; \
107 elif
[ -f
/usr
/share
/hevea
/xxdate.exe
]; then \
108 hevea
-exec
/usr
/share
/hevea
/xxdate.exe
$< ; \
109 hevea
-exec
/usr
/share
/hevea
/xxdate.exe
$< ; \
110 elif
[ -f
/usr
/local
/lib
/hevea
/xxdate.exe
]; then \
111 hevea
-exec
/usr
/local
/lib
/hevea
/xxdate.exe
$< ; \
112 hevea
-exec
/usr
/local
/lib
/hevea
/xxdate.exe
$< ; \
114 echo
-e
"\n\n *** Hevea: Unable to find xxdate.exe ***\n\n"; \
116 hacha
-o index.html cocci_syntax.html
119 ##############################################################################
121 ##############################################################################
124 ##############################################################################
126 ##############################################################################
128 LATEXDIFFOPT
=--type
=CTRADITIONAL
130 #if multi files ? sed sur les \input{} ? ou create in another dir ?
132 latexdiff
$(LATEXDIFFOPT
) main-old.
tex main.
tex > main-diff.
tex
133 make MAINSRC
=main-diff
137 cp main-old.
tex main-older.
tex
138 cp main.
tex main-old.
tex
148 ##############################################################################
150 ##############################################################################
154 dvips
-P cmz
$< -o
$@
-t
$(FORMAT
)