Make it possible to generate 29tsoc ebooks
[project-aon.git] / common / pdf / build / lw / setup_test / Makefile
1 # Makefile to test system setup
2
3 # The default test includes only font test using XeLaTeX
4 # additional tests might be added in the future
5
6 test: font-test
7 font-test: font-test.pdf review-font-test
8
9
10 # Build using XeLaTeX
11 %.pdf: font-test.tex
12          -xelatex -interaction nonstopmode $<
13
14 review-font-test: font-test.pdf
15          @if [ ! -e "$<" ] ; then echo "ERROR: PDF file not generated, review logs"; exit 1; fi
16          @if [ -e "font-test.log" ] &&  grep -q "Some font shapes were not available" font-test.log ; then \
17                 echo "ERROR: There was a problem inserting some fonts. Please review the output file: $<"; \
18           else \
19                 echo "All fonts were included, please review the file $< to ensure that fonts are embedded properly"; \
20          fi
21
22 # Build using LaTeX
23 %.dvi: %.tex $(EXTRAFILES)
24         latex -interaction nonstopmode $<
25
26 %.ps: %.dvi
27         dvips -Ppdf $<
28
29 #%.pdf: %.ps
30 #        ps2pdf $<
31
32 # Build using pdflatex 
33 #%.pdf: font-test.tex
34 #        pdflatex -interaction nonstopmode $<
35
36
37 clean:
38         rm -f *.dvi *.log *.out *.aux *.pdf
39
40 .PHONY: clean test font-test