Rename GP_Context -> GP_Pixmap
[gfxprim.git] / doc / Makefile
blob5da5636ad7ec69a1bc60553648290834704e630b
1 TOPDIR=..
2 include $(TOPDIR)/config.mk
4 SOURCES=index.html about.txt pixmap.txt loaders.txt filters.txt \
5 basic_types.txt gfx.txt backends.txt gamma.txt grabbers.txt \
6 environment_variables.txt debug.txt core.txt input.txt \
7 gen.txt pixels.txt coordinate_system.txt coding_style.txt \
8 get_put_pixel.txt blits.txt progress_callback.txt text.txt \
9 event_queue.txt compilation.txt filters_resize.txt \
10 filters_dithering.txt filters_python.txt spiv.txt core_common.txt \
11 convert.txt news_1_0_0-rc1.txt loaders_io.txt signatures.txt
13 SOURCES+=core_python.txt gfx_python.txt loaders_python.txt backends_python.txt
15 EXAMPLE_SOURCES=$(wildcard example_*.txt)
17 ASCIIDOC_PARAMS=--conf-file asciidoc.conf
20 # Names of generated images for cleanup
22 GENIMAGES=discrete_linear_1D_convolution_alg1 discrete_linear_1D_convolution_alg2 \
23 discrete_linear_convolution discrete_linear_convolution_alg1 \
24 discrete_linear_convolution_alg2 laplacian_edge_sharpening laplacian_kernel
26 PAGES=$(subst .txt,.html,$(SOURCES))
27 PAGES+=$(subst .txt,.html,$(EXAMPLE_SOURCES))
28 PAGES+=examples.html
30 .PHONY: toolcheck clean
32 all: toolcheck examples.html $(PAGES)
34 $(PAGES): asciidoc.conf
37 # Dependencies
39 IMG_INCLUDES=images/blur/images.txt images/median/images.txt\
40 images/edge_sharpening/images.txt images/gaussian_noise/images.txt
42 filters_python.html: $(IMG_INCLUDES)
43 filters.html: $(IMG_INCLUDES)
46 # Check if we have all the needed tools
48 toolcheck:
49 @if [ -z `which asciidoc 2>/dev/null` ] ; then \
50 echo "ERROR: Could not find 'asciidoc'" ; exit 127 ; fi
51 @if [ -z `which source-highlight 2>/dev/null` ] ; then \
52 echo "ERROR: Could not find 'source-highlight'" ; exit 127 ; fi
53 @if [ ! -d "/usr/share/graphviz" ] ; then \
54 echo "ERROR: Could not find 'graphviz'" ; exit 127 ; fi
55 @if [ -z `which latex 2>/dev/null` ] ; then \
56 echo "error: could not find 'latex'" ; exit 127 ; fi
57 @if [ -z `which dvipng 2>/dev/null` ] ; then \
58 echo "error: could not find 'dvipng'" ; exit 127 ; fi
61 # Create page for each part of API description
63 $(PAGES): %.html: %.txt
64 asciidoc $(ASCIIDOC_PARAMS) $<
67 # Autogenerate examples page
69 examples.txt: $(EXAMPLE_SOURCES) gen_examples_page.sh
70 ./gen_examples_page.sh examples.txt
73 # Clean up generated images
75 CLEAN+=$(patsubst %,%.md5,$(GENIMAGES))
76 CLEAN+=$(patsubst %,%.png,$(GENIMAGES))
77 CLEAN+=examples.txt
80 # Clean up generated pages
82 CLEAN+=$(PAGES)
84 clean:
85 rm -f $(CLEAN)
87 INSTALL_DOC=$(PAGES) *.png *.svg asciidoc.css images/*/*.png
88 install: $(INSTALL_DOC)
90 include $(TOPDIR)/install.mk