1 # DCP-o-matic manual makefile
5 DIAGRAMS := file-structure.svg 3d-left-right.svg 3d-top-bottom.svg timecode.svg pipeline1.svg pipeline2.svg \
6 pipeline3.svg pipeline4.svg burn-in.svg discrete.svg dcp-copy.svg dcp-refer.svg reels-by-video.svg \
9 SCREENSHOTS := file-new.pdf new-film.pdf video-select-content-file.pdf \
10 still-select-content-file.pdf examine-content.pdf timing-tab.pdf \
11 calculate-audio-gain.pdf add-file.pdf dcp-tab.pdf colour-conversion.pdf \
12 prefs-email.pdf prefs-kdm-email.pdf prefs-general.pdf prefs-tms.pdf prefs-cover-sheet.pdf \
13 prefs-advanced.pdf prefs-defaults.pdf prefs-servers.pdf prefs-keys.pdf \
14 prefs-notifications.pdf timeline1.pdf timed-text-tab.pdf \
15 making-dcp.pdf filters.pdf video-tab.pdf audio-tab.pdf \
16 audio-plot.pdf audio-map-eg1.pdf audio-map-eg2.pdf audio-map-eg3.pdf kdm.pdf \
17 kdm-creator.pdf export.pdf
22 # For the HTML: convert PDF screenshots to PNG and copy into html/screenshots, scaling some.
24 html/screenshots/%.png: screenshots/%.pdf
25 mkdir -p html/screenshots
26 pdftoppm $< $(basename $@) -png -f 1 -singlefile -rx 80 -ry 80
29 # For LaTeX/PDF: crop some of the PDF screenshots; use others as-is
30 screenshots/%.pdf: raw-screenshots/%.pdf
33 screenshots/prefs-general.pdf: raw-screenshots/prefs-general.pdf
34 python3 pdf_crop_by.py $< $@ 0 400 0 0
36 screenshots/prefs-defaults.pdf: raw-screenshots/prefs-defaults.pdf
37 python3 pdf_crop_by.py $< $@ 0 400 0 0
39 screenshots/prefs-servers.pdf: raw-screenshots/prefs-servers.pdf
40 python3 pdf_crop_by.py $< $@ 0 700 0 0
42 screenshots/prefs-keys.pdf: raw-screenshots/prefs-keys.pdf
43 python3 pdf_crop_by.py $< $@ 0 600 0 0
45 screenshots/prefs-tms.pdf: raw-screenshots/prefs-tms.pdf
46 python3 pdf_crop_by.py $< $@ 0 600 0 0
48 screenshots/prefs-email.pdf: raw-screenshots/prefs-email.pdf
49 python3 pdf_crop_by.py $< $@ 0 700 0 0
51 screenshots/prefs-cover-sheet.pdf: raw-screenshots/prefs-cover-sheet.pdf
52 python3 pdf_crop_by.py $< $@ 0 600 0 0
54 screenshots/examine-content.pdf: raw-screenshots/examine-content.pdf
55 python3 pdf_crop_by.py $< $@ 460 270 200 580
57 screenshots/audio-tab.pdf: raw-screenshots/audio-tab.pdf
58 python3 pdf_crop_by.py $< $@ 0 0 1230 380
60 screenshots/timing-tab.pdf: raw-screenshots/timing-tab.pdf
61 python3 pdf_crop_by.py $< $@ 0 0 1230 380
63 screenshots/timed-text-tab.pdf: raw-screenshots/timed-text-tab.pdf
64 python3 pdf_crop_by.py $< $@ 0 200 1230 380
66 screenshots/video-tab.pdf: raw-screenshots/video-tab.pdf
67 python3 pdf_crop_by.py $< $@ 0 0 1230 295
69 screenshots/add-file.pdf: raw-screenshots/add-file.pdf
70 python3 pdf_crop_by.py $< $@ 0 600 1210 0
72 screenshots/making-dcp.pdf: raw-screenshots/making-dcp.pdf
73 python3 pdf_crop_by.py $< $@ 470 190 300 700
75 screenshots/audio-map-eg1.pdf: raw-screenshots/audio-map-eg1.pdf
76 python3 pdf_crop_by.py $< $@ 10 195 1350 630
78 screenshots/audio-map-eg2.pdf: raw-screenshots/audio-map-eg2.pdf
79 python3 pdf_crop_by.py $< $@ 10 195 1350 630
81 screenshots/audio-map-eg3.pdf: raw-screenshots/audio-map-eg3.pdf
82 python3 pdf_crop_by.py $< $@ 10 75 1350 630
84 screenshots/dcp-tab.pdf: raw-screenshots/dcp-tab.pdf
85 python3 pdf_crop_by.py $< $@ 0 200 1230 30
88 # For HTML: convert diagrams from SVG to PNG
89 diagrams/%.png: diagrams/%.svg
90 inkscape $< --export-type=png --export-filename=$@ --export-area-drawing
92 # For LaTeX/PDF: convert diagrams from SVG to PDF
93 diagrams/%.pdf: diagrams/%.svg
94 inkscape $< --export-type=pdf --export-filename=$@ --export-area-drawing
96 config.xml: ../../src/lib/config.cc config.py
97 python3 config.py ../../src/lib/config.cc > config.xml
103 html: $(XML) config.xml dcpomatic-html.xsl extensions-html.ent dcpomatic.css dcpomatic_create.xml dcpomatic_cli.xml dcpomatic_kdm_cli.xml \
104 $(subst .pdf,.png,$(addprefix html/screenshots/,$(SCREENSHOTS))) \
105 $(subst .svg,.png,$(addprefix diagrams/,$(DIAGRAMS))) \
107 # The DocBook needs to know what file extensions to look for
108 # for screenshots and diagrams; use the correct file to tell it.
109 cp extensions-html.ent extensions.ent
112 xmlto html -m dcpomatic-html.xsl dcpomatic.xml --skip-validation -o html
114 # Copy graphics and CSS in
115 mkdir -p html/diagrams
116 cp diagrams/*.png html/diagrams
117 cp dcpomatic.css html
123 pdf: $(XML) config.xml dcpomatic-pdf.xsl extensions-pdf.ent dcpomatic_create.xml dcpomatic_cli.xml dcpomatic_kdm_cli.xml \
124 $(addprefix screenshots/,$(SCREENSHOTS)) \
125 $(subst .svg,.pdf,$(addprefix diagrams/,$(DIAGRAMS)))
127 # The DocBook needs to know what file extensions to look for
128 # for screenshots and diagrams; use the correct file to tell it.
129 cp extensions-pdf.ent extensions.ent
133 dblatex -p dcpomatic-pdf.xsl -s dcpomatic.sty -r pptex.py -T native dcpomatic.xml -t pdf -o pdf/dcpomatic.pdf
137 # LaTeX (handy for debugging)
140 tex: $(XML) config.xml dcpomatic-pdf.xsl extensions-pdf.ent
142 # The DocBook needs to know what file extensions to look for
143 # for screenshots and diagrams; use the correct file to tell it.
144 cp extensions-pdf.ent extensions.ent
148 # -P <foo> removes the revhistory table
149 dblatex -P doc.collab.show=0 -P latex.output.revhistory=0 -p dcpomatic-pdf.xsl -s dcpomatic.sty -r pptex.py -T native dcpomatic.xml -t tex -o tex/dcpomatic.tex
152 clean:; rm -rf html pdf diagrams/*.pdf diagrams/*.png graphics/*.png *.aux dcpomatic.cb dcpomatic.cb2 dcpomatic.glo dcpomatic.idx dcpomatic.ilg
153 rm -rf dcpomatic.ind dcpomatic.lof dcpomatic.log dcpomatic.tex dcpomatic.toc extensions.ent dcpomatic.out