Makefile 907 Bytes
Newer Older
1
2
PDFIMAGES = $(shell ls *.pdf)
PNGIMAGES = ${PDFIMAGES:.pdf=.png}
3
HUGEIMAGES = $(shell find . -maxdepth 1 -name "*.pdf"  -size +10000k)
4
5
ORIGIMAGES = ${HUGEIMAGES:.pdf=.pdf-orig}

6
7
8
#PNGCONV = gm convert -density 1200 -resample 50 -trim -antialias -quality 9 -filter Cubic
PNGCONV = pdftoppm -png -singlefile -r 96 -freetype yes -aa yes -aaVector yes
PDFCONV = gm convert
9

10
all: #$(ORIGIMAGES) $(PNGIMAGES)
11
12
	sphinx-build -E -b html . build

13
%.pdf-orig: %.pdf
14
15
16
	$(PNGCONV) $< > $@-tmp.png
	$(PDFCONV) $@-tmp.png $@
	rm $@-tmp.png
17
18

%.png: %.pdf
19
20
	test -d $<-orig && $(PNGCONV) $<-orig > $@ || true
	test -d $<-orig || $(PNGCONV) $< > $@ || true
21

22
23
24
latex:
	sphinx-build -E -b latex . build

25
26
27
28
test:
	OMP_NUM_THREADS=1 sphinx-build -b doctest . build

push:
Tiago Peixoto's avatar
Tiago Peixoto committed
29
	rsync -rEvpLz build/* root@skewed.de:/var/www/graph-tool-doc/
30
31
32
33

push-dev:
	rsync -rEvpLz build/* root@skewed.de:/var/www/graph-tool-doc/dev/

34
35
36
clean:
	rm -rf build