1 MANUAL_OUTPUT_DIR
= $(OUT
)/manual
2 TEX_INCLUDES
= $(wildcard $(DOC
)/manual
/*.
tex) $(wildcard $(DOC
)/manual
/*.sty
)
3 TEX_FILES_EN
= $(wildcard $(DOC
)/manual
/en
/*.
tex)
4 TEX_INCLUDES_EN
= $(wildcard $(DOC
)/manual
/en
/*.sty
)
5 FIGURES_EN
= $(DOC
)/manual
/en
/figures
/*.png
$(DOC
)/manual
/en
/figures
/*.pdf
8 alt2_landable_airport \
10 alt2_marginal_airport \
12 alt_landable_airport \
14 alt_marginal_airport \
16 alt_reachable_airport \
37 SVG_ICONS
= $(patsubst %,$(MANUAL_OUTPUT_DIR
)/icons
/%.pdf
,$(SVG_ICON_LIST
))
39 SVG_FIGURES_SHARED
= $(wildcard $(DOC
)/manual
/figures
/*.svg
)
40 SVG_FIGURES
= $(patsubst $(DOC
)/manual
/figures
/%.svg
,$(MANUAL_OUTPUT_DIR
)/figures
/%.pdf
,$(SVG_FIGURES_SHARED
))
42 SVG_GRAPHICS_DATA
= $(wildcard $(topdir
)/Data
/graphics
/*.svg
)
43 SVG_GRAPHICS
= $(patsubst $(topdir
)/Data
/graphics
/%.svg
,$(MANUAL_OUTPUT_DIR
)/graphics
/%.pdf
,$(SVG_GRAPHICS_DATA
))
45 SVG_LOGOS_DATA
= $(wildcard $(topdir
)/Data
/graphics
/logo
*.svg
)
46 SVG_LOGOS
= $(patsubst $(topdir
)/Data
/graphics
/%.svg
,$(MANUAL_OUTPUT_DIR
)/graphics
/%.png
,$(SVG_LOGOS_DATA
))
48 TEX_INCLUDES_BLITZ_DE
= $(wildcard $(DOC
)/manual
/de
/Blitz
/*.sty
)
49 FIGURES_BLITZ_DE
= $(DOC
)/manual
/de
/Blitz
/Bilder
/*.png
$(DOC
)/manual
/de
/Blitz
/Bilder
/*.jpg
51 TEX_FILES_DE
= $(wildcard $(DOC
)/manual
/de
/*.
tex)
52 TEX_INCLUDES_DE
= $(wildcard $(DOC
)/manual
/de
/*.sty
)
53 FIGURES_DE
= $(DOC
)/manual
/de
/figures
/*.png
55 TEX_FILES_FR
= $(wildcard $(DOC
)/manual
/fr
/*.
tex)
56 TEX_INCLUDES_FR
= $(wildcard $(DOC
)/manual
/fr
/*.sty
)
57 FIGURES_FR
= $(DOC
)/manual
/fr
/figures
/*.png
59 TEX_VARS
= TEXINPUTS
="$(<D):$(DOC)/manual:$(MANUAL_OUTPUT_DIR):.:$(DOC)/manual/en:"
60 TEX_FLAGS
= -halt-on-error
-interaction
=nonstopmode
61 TEX_RUN
= $(TEX_VARS
) pdflatex
$(TEX_FLAGS
) -output-directory
$(@D
)
62 XETEX_RUN
= $(TEX_VARS
) xetex
$(TEX_FLAGS
) -no-pdf
-output-directory
$(@D
)
65 $(MANUAL_OUTPUT_DIR
)/XCSoar-manual.pdf \
66 $(MANUAL_OUTPUT_DIR
)/XCSoar-developer-manual.pdf \
67 $(MANUAL_OUTPUT_DIR
)/XCSoar-Blitzeinstieg.pdf \
68 $(MANUAL_OUTPUT_DIR
)/XCSoar-manual-de.pdf \
69 $(MANUAL_OUTPUT_DIR
)/XCSoar-Prise-en-main.pdf \
70 $(MANUAL_OUTPUT_DIR
)/XCSoar-manual-fr.pdf
76 $(MANUAL_OUTPUT_DIR
)/XCSoar-manual-de.pdf
78 # Generate a redistributable ZIP file that allows manual editors
79 # without the full XCSoar development chain to compile the XCSoar
80 # manual. It contains all generated files.
81 manual-dev-dist
: $(MANUAL_OUTPUT_DIR
)/XCSoar-manual-dev.zip
83 $(MANUAL_OUTPUT_DIR
)/XCSoar-manual.pdf
: $(DOC
)/manual
/en
/XCSoar-manual.
tex \
84 $(TEX_FILES_EN
) $(TEX_INCLUDES_EN
) $(TEX_INCLUDES
) \
85 $(FIGURES_EN
) $(SVG_ICONS
) $(SVG_FIGURES
) $(SVG_GRAPHICS
) $(SVG_LOGOS
) |
$(MANUAL_OUTPUT_DIR
)/dirstamp
86 # run TeX twice to make sure that all references are resolved
90 # Generate a HTML version of the manual with latex2html
91 $(MANUAL_OUTPUT_DIR
)/html
/index.html
: $(DOC
)/manual
/en
/XCSoar-manual.
tex \
92 $(TEX_FILES_EN
) $(TEX_INCLUDES_EN
) $(TEX_INCLUDES
) \
93 $(FIGURES_EN
) $(SVG_ICONS
) $(SVG_FIGURES
) $(SVG_GRAPHICS
) $(SVG_LOGOS
) |
$(MANUAL_OUTPUT_DIR
)/html
/dirstamp
94 $(TEX_VARS
) latex2html
-dir $(@D
) $<
96 $(MANUAL_OUTPUT_DIR
)/XCSoar-developer-manual.pdf
: $(DOC
)/manual
/en
/XCSoar-developer-manual.
tex $(TEX_INCLUDES_EN
) $(TEX_INCLUDES
) \
97 $(FIGURES_EN
) $(SVG_ICONS
) $(SVG_FIGURES
) $(SVG_GRAPHICS
) $(SVG_LOGOS
) |
$(MANUAL_OUTPUT_DIR
)/dirstamp
98 # run TeX twice to make sure that all references are resolved
102 $(MANUAL_OUTPUT_DIR
)/XCSoar-Blitzeinstieg.pdf
: $(DOC
)/manual
/de
/Blitz
/XCSoar-Blitzeinstieg.
tex $(DOC
)/manual
/de
/Blitz
/Blitzeinstieg.
tex \
103 $(TEX_INCLUDES_BLITZ_DE
) $(FIGURES_BLITZ_DE
) $(SVG_ICONS
) $(SVG_FIGURES
) $(SVG_GRAPHICS
) $(SVG_LOGOS
) |
$(MANUAL_OUTPUT_DIR
)/dirstamp
104 # run TeX twice to make sure that all references are resolved
108 $(MANUAL_OUTPUT_DIR
)/XCSoar-manual-de.pdf
: $(DOC
)/manual
/de
/XCSoar-manual-de.
tex \
109 $(TEX_FILES_DE
) $(TEX_INCLUDES_DE
) $(TEX_INCLUDES
) \
110 $(FIGURES_DE
) $(SVG_ICONS
) $(SVG_FIGURES
) $(SVG_GRAPHICS
) $(SVG_LOGOS
) |
$(MANUAL_OUTPUT_DIR
)/dirstamp
111 # run TeX twice to make sure that all references are resolved
115 $(MANUAL_OUTPUT_DIR
)/XCSoar-Prise-en-main.pdf
: $(DOC
)/manual
/fr
/XCSoar-Prise-en-main.
tex $(TEX_INCLUDES_FR
) $(TEX_INCLUDES
) \
116 $(FIGURES_FR
) $(SVG_ICONS
) $(SVG_FIGURES
) $(SVG_GRAPHICS
) $(SVG_LOGOS
) |
$(MANUAL_OUTPUT_DIR
)/dirstamp
117 # run TeX twice to make sure that all references are resolved
121 $(MANUAL_OUTPUT_DIR
)/XCSoar-manual-fr.pdf
: $(DOC
)/manual
/fr
/XCSoar-manual-fr.
tex \
122 $(TEX_FILES_FR
) $(TEX_INCLUDES_FR
) $(TEX_INCLUDES
) \
123 $(FIGURES_FR
) $(SVG_ICONS
) $(SVG_FIGURES
) $(SVG_GRAPHICS
) $(SVG_LOGOS
)|
$(MANUAL_OUTPUT_DIR
)/dirstamp
124 # run TeX twice to make sure that all references are resolved
128 $(SVG_ICONS
): $(MANUAL_OUTPUT_DIR
)/icons
/%.pdf
: $(topdir
)/Data
/icons
/%.svg |
$(MANUAL_OUTPUT_DIR
)/icons
/dirstamp
129 rsvg-convert
-a
-f pdf
-w
32 $< -o
$@
131 $(SVG_FIGURES
): $(MANUAL_OUTPUT_DIR
)/figures
/%.pdf
: $(topdir
)/doc
/manual
/figures
/%.svg |
$(MANUAL_OUTPUT_DIR
)/figures
/dirstamp
132 rsvg-convert
-a
-f pdf
$< -o
$@
134 $(SVG_GRAPHICS
): $(MANUAL_OUTPUT_DIR
)/graphics
/%.pdf
: $(topdir
)/Data
/graphics
/%.svg |
$(MANUAL_OUTPUT_DIR
)/graphics
/dirstamp
135 rsvg-convert
-a
-f pdf
$< -o
$@
137 $(SVG_LOGOS
): $(MANUAL_OUTPUT_DIR
)/graphics
/%.png
: $(topdir
)/Data
/graphics
/%.svg |
$(MANUAL_OUTPUT_DIR
)/graphics
/dirstamp
138 rsvg-convert
-a
-z
1.5 -f png
$< -o
$@
140 $(MANUAL_OUTPUT_DIR
)/XCSoar-manual-dev.zip
: T
=$(MANUAL_OUTPUT_DIR
)/XCSoar-manual-dev
141 $(MANUAL_OUTPUT_DIR
)/XCSoar-manual-dev.zip
: VERSION.txt \
142 $(TEX_FILES_EN
) $(TEX_INCLUDES_EN
) $(TEX_INCLUDES
) \
143 $(FIGURES_EN
) $(SVG_ICONS
) $(SVG_FIGURES
) $(SVG_GRAPHICS
) $(SVG_LOGOS
) \
144 $(TEX_FILES_FR
) $(TEX_INCLUDES_FR
) $(FIGURES_FR
)
146 mkdir
-p
$(T
)/figures
$(T
)/en
/figures
147 echo
$(GIT_COMMIT_ID
) >$(T
)/git.txt
148 cp VERSION.txt
$(TEX_INCLUDES
) $(T
)/.
149 cp
$(SVG_FIGURES
) $(SVG_LOGOS
) $(T
)/figures
/.
150 cp
-r
$(MANUAL_OUTPUT_DIR
)/graphics
$(MANUAL_OUTPUT_DIR
)/icons
$(T
)/.
151 # Incl. the English original
152 cp
$(TEX_FILES_EN
) $(TEX_INCLUDES_EN
) $(T
)/en
/.
153 cp
$(FIGURES_EN
) $(T
)/en
/figures
/.
154 # Incl. the French translation
155 mkdir
-p
$(T
)/fr
/figures
156 cp
$(TEX_FILES_FR
) $(TEX_INCLUDES_FR
) $(T
)/fr
/.
157 cp
$(FIGURES_FR
) $(T
)/fr
/figures
/.
158 # Incl. both German translation
159 mkdir
-p
$(T
)/de
/figures
$(T
)/de
/Blitz
/Bilder
160 cp
$(DOC
)/manual
/de
/Blitz
/*.
tex $(T
)/de
/Blitz
/.
161 cp
$(TEX_INCLUDES_BLITZ_DE
) $(T
)/de
/Blitz
/.
162 cp
$(FIGURES_BLITZ_DE
) $(T
)/de
/Blitz
/Bilder
/.
163 cp
$(TEX_FILES_DE
) $(TEX_INCLUDES_DE
) $(T
)/de
/.
164 cp
$(FIGURES_DE
) $(T
)/de
/figures
/.
165 # Create an example bash to generate the manuals
166 echo
"#!/bin/bash\n\n# This is an example how the manuals get generated\n\nmkdir -p output" > $(T
)/generate_manuals.sh
167 make manual
-ns|grep
-v mkdir|grep
-v touch|sed s
#doc/manual#.#g|sed s#output/manual#output#g >> $(T)/generate_manuals.sh
168 chmod
+x
$(T
)/generate_manuals.sh
169 # Copy an example bat file to generate the manuals with MikTex on Windows
170 cp
$(DOC
)/manual
/generate_manuals.bat
$(T
)/.
171 cd
$(@D
) && zip
-r XCSoar-manual-dev.zip XCSoar-manual-dev