1 # SPDX-FileCopyrightText: 2002-2024 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
3 # SPDX-License-Identifier: GPL-3.0-or-later
5 bin_SCRIPTS = parallel sql niceload parcat parset parsort \
6 env_parallel env_parallel.ash env_parallel.bash \
7 env_parallel.csh env_parallel.dash env_parallel.fish \
8 env_parallel.ksh env_parallel.mksh env_parallel.pdksh \
9 env_parallel.sh env_parallel.tcsh env_parallel.zsh
11 POD_FILES = parcat.pod parset.pod sem.pod parallel.pod \
12 env_parallel.pod niceload.pod parallel_examples.pod \
13 parallel_tutorial.pod parallel_book.pod parallel_design.pod \
14 parallel_alternatives.pod
16 MAN_FILES = parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 \
17 parallel_examples.7 parallel_tutorial.7 parallel_book.7 \
18 parallel_design.7 parallel_alternatives.7 parcat.1 parset.1 \
21 PDF_MAN = parallel.pdf env_parallel.pdf sem.pdf sql.pdf \
22 niceload.pdf parallel_examples.pdf parallel_tutorial.pdf \
23 parallel_book.pdf parallel_design.pdf \
24 parallel_alternatives.pdf parcat.pdf parset.pdf parsort.pdf
26 PDF_OTHER = parallel_cheat_bw.pdf parallel_options_map.pdf
28 PDF_FILES = $(PDF_MAN) $(PDF_OTHER)
30 RST_FILES = parallel.rst env_parallel.rst sem.rst sql.rst \
31 niceload.rst parallel_examples.rst parallel_tutorial.rst \
32 parallel_book.rst parallel_design.rst \
33 parallel_alternatives.rst parcat.rst parset.rst parsort.rst
35 TEXI_FILES = parallel.texi env_parallel.texi sem.texi sql.texi \
36 niceload.texi parallel_examples.texi parallel_tutorial.texi \
37 parallel_book.texi parallel_design.texi \
38 parallel_alternatives.texi parcat.texi parset.texi \
41 HTML_FILES = parallel.html env_parallel.html sem.html sql.html \
42 niceload.html parallel_examples.html parallel_tutorial.html \
43 parallel_book.html parallel_design.html \
44 parallel_alternatives.html parcat.html parset.html \
48 rm "$(DESTDIR)$(bindir)"/sem || true
49 $(LN_S) parallel "$(DESTDIR)$(bindir)"/sem
52 man_MANS = $(MAN_FILES)
53 doc_DATA = $(HTML_FILES) $(TEXI_FILES) $(RST_FILES) $(PDF_FILES)
56 DISTCLEANFILES = $(MAN_FILES) $(HTML_FILES) $(TEXI_FILES) \
57 $(RST_FILES) $(PDF_FILES)
60 EXTRA_DIST = $(bin_SCRIPTS) sem $(POD_FILES) \
61 parallel_cheat_bw.fodt pod2graph $(DISTCLEANFILES)
67 cd sphinx && make && cd ..
69 # Build documentation file if the tool to build exists.
70 # Otherwise: Use the distributed version
71 parallel.1: parallel.pod
72 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
73 --section=1 "$(srcdir)"/parallel.pod > "$(srcdir)"/parallel.1n \
74 && mv "$(srcdir)"/parallel.1n "$(srcdir)"/parallel.1 \
75 || echo "Warning: pod2man not found. Using old parallel.1"
77 env_parallel.1: env_parallel.pod
78 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
79 --section=1 "$(srcdir)"/env_parallel.pod > "$(srcdir)"/env_parallel.1n \
80 && mv "$(srcdir)"/env_parallel.1n "$(srcdir)"/env_parallel.1 \
81 || echo "Warning: pod2man not found. Using old env_parallel.1"
83 parallel_examples.7: parallel_examples.pod
84 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
85 --section=7 "$(srcdir)"/parallel_examples.pod > "$(srcdir)"/parallel_examples.7n \
86 && mv "$(srcdir)"/parallel_examples.7n "$(srcdir)"/parallel_examples.7 \
87 || echo "Warning: pod2man not found. Using old parallel_examples.7"
89 parallel_tutorial.7: parallel_tutorial.pod
90 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
91 --section=7 "$(srcdir)"/parallel_tutorial.pod > "$(srcdir)"/parallel_tutorial.7n \
92 && mv "$(srcdir)"/parallel_tutorial.7n "$(srcdir)"/parallel_tutorial.7 \
93 || echo "Warning: pod2man not found. Using old parallel_tutorial.7"
95 parallel_book.7: parallel_book.pod
96 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
97 --section=7 "$(srcdir)"/parallel_book.pod > "$(srcdir)"/parallel_book.7n \
98 && mv "$(srcdir)"/parallel_book.7n "$(srcdir)"/parallel_book.7 \
99 || echo "Warning: pod2man not found. Using old parallel_book.7"
101 parallel_design.7: parallel_design.pod
102 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
103 --section=7 "$(srcdir)"/parallel_design.pod > "$(srcdir)"/parallel_design.7n \
104 && mv "$(srcdir)"/parallel_design.7n "$(srcdir)"/parallel_design.7 \
105 || echo "Warning: pod2man not found. Using old parallel_design.7"
107 parallel_alternatives.7: parallel_alternatives.pod
108 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
109 --section=7 "$(srcdir)"/parallel_alternatives.pod > "$(srcdir)"/parallel_alternatives.7n \
110 && mv "$(srcdir)"/parallel_alternatives.7n "$(srcdir)"/parallel_alternatives.7 \
111 || echo "Warning: pod2man not found. Using old parallel_alternatives.7"
114 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
115 --section=1 "$(srcdir)"/sem.pod > "$(srcdir)"/sem.1n \
116 && mv "$(srcdir)"/sem.1n "$(srcdir)"/sem.1 \
117 || echo "Warning: pod2man not found. Using old sem.1"
120 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
121 --section=1 "$(srcdir)"/sql > "$(srcdir)"/sql.1n \
122 && mv "$(srcdir)"/sql.1n "$(srcdir)"/sql.1 \
123 || echo "Warning: pod2man not found. Using old sql.1"
125 niceload.1: niceload.pod
126 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
127 --section=1 "$(srcdir)"/niceload.pod > "$(srcdir)"/niceload.1n \
128 && mv "$(srcdir)"/niceload.1n "$(srcdir)"/niceload.1 \
129 || echo "Warning: pod2man not found. Using old niceload.1"
132 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
133 --section=1 "$(srcdir)"/parcat.pod > "$(srcdir)"/parcat.1n \
134 && mv "$(srcdir)"/parcat.1n "$(srcdir)"/parcat.1 \
135 || echo "Warning: pod2man not found. Using old parcat.1"
138 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
139 --section=1 "$(srcdir)"/parset.pod > "$(srcdir)"/parset.1n \
140 && mv "$(srcdir)"/parset.1n "$(srcdir)"/parset.1 \
141 || echo "Warning: pod2man not found. Using old parset.1"
144 pod2man --release='$(PACKAGE_VERSION)' --center='$(PACKAGE_NAME)' \
145 --section=1 "$(srcdir)"/parsort > "$(srcdir)"/parsort.1n \
146 && mv "$(srcdir)"/parsort.1n "$(srcdir)"/parsort.1 \
147 || echo "Warning: pod2man not found. Using old parsort.1"
149 parallel.html: parallel.pod
150 pod2html --title "GNU Parallel" "$(srcdir)"/parallel.pod > "$(srcdir)"/parallel.htmln \
151 && mv "$(srcdir)"/parallel.htmln "$(srcdir)"/parallel.html \
152 || echo "Warning: pod2html not found. Using old parallel.html"
153 rm -f "$(srcdir)"/pod2htm*
155 # Depending on parallel.html to avoid stupid pod2html race condition
156 env_parallel.html: env_parallel.pod parallel.html
157 pod2html --title "GNU Parallel with environment" "$(srcdir)"/env_parallel.pod > "$(srcdir)"/env_parallel.htmln \
158 && mv "$(srcdir)"/env_parallel.htmln "$(srcdir)"/env_parallel.html \
159 || echo "Warning: pod2html not found. Using old env_parallel.html"
160 rm -f "$(srcdir)"/pod2htm*
162 # Depending on env_parallel.html to avoid stupid pod2html race condition
163 parallel_examples.html: parallel_examples.pod env_parallel.html
164 pod2html --title "GNU Parallel examples" "$(srcdir)"/parallel_examples.pod > "$(srcdir)"/parallel_examples.htmln \
165 && mv "$(srcdir)"/parallel_examples.htmln "$(srcdir)"/parallel_examples.html \
166 || echo "Warning: pod2html not found. Using old parallel_examples.html"
167 rm -f "$(srcdir)"/pod2htm*
169 # Depending on parallel_examples.html to avoid stupid pod2html race condition
170 parallel_tutorial.html: parallel_tutorial.pod parallel_examples.html
171 pod2html --title "GNU Parallel tutorial" "$(srcdir)"/parallel_tutorial.pod > "$(srcdir)"/parallel_tutorial.htmln \
172 && mv "$(srcdir)"/parallel_tutorial.htmln "$(srcdir)"/parallel_tutorial.html \
173 || echo "Warning: pod2html not found. Using old parallel_tutorial.html"
174 rm -f "$(srcdir)"/pod2htm*
176 # Depending on parallel_tutorial.html to avoid stupid pod2html race condition
177 parallel_book.html: parallel_book.pod parallel_tutorial.html
178 pod2html --title "GNU Parallel book" "$(srcdir)"/parallel_book.pod > "$(srcdir)"/parallel_book.htmln \
179 && mv "$(srcdir)"/parallel_book.htmln "$(srcdir)"/parallel_book.html \
180 || echo "Warning: pod2html not found. Using old parallel_book.html"
181 rm -f "$(srcdir)"/pod2htm*
183 # Depending on parallel_book.html to avoid stupid pod2html race condition
184 parallel_design.html: parallel_design.pod parallel_book.html
185 pod2html --title "GNU Parallel design" "$(srcdir)"/parallel_design.pod > "$(srcdir)"/parallel_design.htmln \
186 && mv "$(srcdir)"/parallel_design.htmln "$(srcdir)"/parallel_design.html \
187 || echo "Warning: pod2html not found. Using old parallel_design.html"
188 rm -f "$(srcdir)"/pod2htm*
190 # Depending on parallel_design.html to avoid stupid pod2html race condition
191 parallel_alternatives.html: parallel_alternatives.pod parallel_design.html
192 pod2html --title "GNU Parallel alternatives" "$(srcdir)"/parallel_alternatives.pod > "$(srcdir)"/parallel_alternatives.htmln \
193 && mv "$(srcdir)"/parallel_alternatives.htmln "$(srcdir)"/parallel_alternatives.html \
194 || echo "Warning: pod2html not found. Using old parallel_alternatives.html"
195 rm -f "$(srcdir)"/pod2htm*
197 # Depending on parallel_alternatives.html to avoid stupid pod2html race condition
198 sem.html: sem.pod parallel_alternatives.html
199 pod2html --title "sem (GNU Parallel)" "$(srcdir)"/sem.pod > "$(srcdir)"/sem.htmln \
200 && mv "$(srcdir)"/sem.htmln "$(srcdir)"/sem.html \
201 || echo "Warning: pod2html not found. Using old sem.html"
202 rm -f "$(srcdir)"/pod2htm*
204 # Depending on sem.html to avoid stupid pod2html race condition
205 sql.html: sql sem.html
206 pod2html --title "GNU SQL" "$(srcdir)"/sql > "$(srcdir)"/sql.htmln \
207 && mv "$(srcdir)"/sql.htmln "$(srcdir)"/sql.html \
208 || echo "Warning: pod2html not found. Using old sql.html"
209 rm -f "$(srcdir)"/pod2htm*
211 # Depending on sql.html to avoid stupid pod2html race condition
212 niceload.html: niceload.pod sql.html
213 pod2html --title "GNU niceload" "$(srcdir)"/niceload.pod > "$(srcdir)"/niceload.htmln \
214 && mv "$(srcdir)"/niceload.htmln "$(srcdir)"/niceload.html \
215 || echo "Warning: pod2html not found. Using old niceload.html"
216 rm -f "$(srcdir)"/pod2htm*
218 # Depending on niceload.html to avoid stupid pod2html race condition
219 parcat.html: parcat.pod niceload.html
220 pod2html --title "GNU parcat" "$(srcdir)"/parcat.pod > "$(srcdir)"/parcat.htmln \
221 && mv "$(srcdir)"/parcat.htmln "$(srcdir)"/parcat.html \
222 || echo "Warning: pod2html not found. Using old parcat.html"
223 rm -f "$(srcdir)"/pod2htm*
225 # Depending on parcat.html to avoid stupid pod2html race condition
226 parset.html: parset.pod parcat.html
227 pod2html --title "GNU parset" "$(srcdir)"/parset.pod > "$(srcdir)"/parset.htmln \
228 && mv "$(srcdir)"/parset.htmln "$(srcdir)"/parset.html \
229 || echo "Warning: pod2html not found. Using old parset.html"
230 rm -f "$(srcdir)"/pod2htm*
232 # Depending on parset.html to avoid stupid pod2html race condition
233 parsort.html: parsort parset.html
234 pod2html --title "GNU parsort" "$(srcdir)"/parsort > "$(srcdir)"/parsort.htmln \
235 && mv "$(srcdir)"/parsort.htmln "$(srcdir)"/parsort.html \
236 || echo "Warning: pod2html not found. Using old parsort.html"
237 rm -f "$(srcdir)"/pod2htm*
239 parallel.texi: parallel.pod
240 pod2texi --output="$(srcdir)"/parallel.texi "$(srcdir)"/parallel.pod \
241 || echo "Warning: pod2texi not found. Using old parallel.texi"
243 env_parallel.texi: env_parallel.pod
244 pod2texi --output="$(srcdir)"/env_parallel.texi "$(srcdir)"/env_parallel.pod \
245 || echo "Warning: pod2texi not found. Using old env_parallel.texi"
247 parallel_examples.texi: parallel_examples.pod
248 pod2texi --output="$(srcdir)"/parallel_examples.texi "$(srcdir)"/parallel_examples.pod \
249 || echo "Warning: pod2texi not found. Using old parallel_examples.texi"
251 parallel_tutorial.texi: parallel_tutorial.pod
252 pod2texi --output="$(srcdir)"/parallel_tutorial.texi "$(srcdir)"/parallel_tutorial.pod \
253 || echo "Warning: pod2texi not found. Using old parallel_tutorial.texi"
255 parallel_book.texi: parallel_book.pod
256 pod2texi --output="$(srcdir)"/parallel_book.texi "$(srcdir)"/parallel_book.pod \
257 || echo "Warning: pod2texi not found. Using old parallel_book.texi"
259 parallel_design.texi: parallel_design.pod
260 pod2texi --output="$(srcdir)"/parallel_design.texi "$(srcdir)"/parallel_design.pod \
261 || echo "Warning: pod2texi not found. Using old parallel_design.texi"
263 parallel_alternatives.texi: parallel_alternatives.pod
264 pod2texi --output="$(srcdir)"/parallel_alternatives.texi "$(srcdir)"/parallel_alternatives.pod \
265 || echo "Warning: pod2texi not found. Using old parallel_alternatives.texi"
268 pod2texi --output="$(srcdir)"/sem.texi "$(srcdir)"/sem.pod \
269 || echo "Warning: pod2texi not found. Using old sem.texi"
272 pod2texi --output="$(srcdir)"/sql.texi "$(srcdir)"/sql \
273 || echo "Warning: pod2texi not found. Using old sql.texi"
275 niceload.texi: niceload.pod
276 pod2texi --output="$(srcdir)"/niceload.texi "$(srcdir)"/niceload.pod \
277 || echo "Warning: pod2texi not found. Using old niceload.texi"
279 parcat.texi: parcat.pod
280 pod2texi --output="$(srcdir)"/parcat.texi "$(srcdir)"/parcat.pod \
281 || echo "Warning: pod2texi not found. Using old parcat.texi"
283 parset.texi: parset.pod
284 pod2texi --output="$(srcdir)"/parset.texi "$(srcdir)"/parset.pod \
285 || echo "Warning: pod2texi not found. Using old parset.texi"
287 parsort.texi: parsort
288 pod2texi --output="$(srcdir)"/parsort.texi "$(srcdir)"/parsort \
289 || echo "Warning: pod2texi not found. Using old parsort.texi"
291 parallel.rst: parallel.pod
292 ./pod2rst-fix < "$(srcdir)"/parallel.pod > "$(srcdir)"/parallel.rst \
293 || echo "Warning: pod2rst not found. Using old parallel.rst"
295 env_parallel.rst: env_parallel.pod
296 ./pod2rst-fix < "$(srcdir)"/env_parallel.pod > "$(srcdir)"/env_parallel.rst \
297 || echo "Warning: pod2rst not found. Using old env_parallel.rst"
299 parallel_examples.rst: parallel_examples.pod
300 ./pod2rst-fix < "$(srcdir)"/parallel_examples.pod > "$(srcdir)"/parallel_examples.rst \
301 || echo "Warning: pod2rst not found. Using old parallel_examples.rst"
303 parallel_tutorial.rst: parallel_tutorial.pod
304 ./pod2rst-fix < "$(srcdir)"/parallel_tutorial.pod > "$(srcdir)"/parallel_tutorial.rst \
305 || echo "Warning: pod2rst not found. Using old parallel_tutorial.rst"
307 parallel_book.rst: parallel_book.pod
308 ./pod2rst-fix < "$(srcdir)"/parallel_book.pod > "$(srcdir)"/parallel_book.rst \
309 || echo "Warning: pod2rst not found. Using old parallel_book.rst"
311 parallel_design.rst: parallel_design.pod
312 ./pod2rst-fix < "$(srcdir)"/parallel_design.pod > "$(srcdir)"/parallel_design.rst \
313 || echo "Warning: pod2rst not found. Using old parallel_design.rst"
315 parallel_alternatives.rst: parallel_alternatives.pod
316 ./pod2rst-fix < "$(srcdir)"/parallel_alternatives.pod > "$(srcdir)"/parallel_alternatives.rst \
317 || echo "Warning: pod2rst not found. Using old parallel_alternatives.rst"
320 ./pod2rst-fix < "$(srcdir)"/sem.pod > "$(srcdir)"/sem.rst \
321 || echo "Warning: pod2rst not found. Using old sem.rst"
324 ./pod2rst-fix < "$(srcdir)"/sql > "$(srcdir)"/sql.rst \
325 || echo "Warning: pod2rst not found. Using old sql.rst"
327 niceload.rst: niceload.pod
328 ./pod2rst-fix < "$(srcdir)"/niceload.pod > "$(srcdir)"/niceload.rst \
329 || echo "Warning: pod2rst not found. Using old niceload.rst"
331 parcat.rst: parcat.pod
332 ./pod2rst-fix < "$(srcdir)"/parcat.pod > "$(srcdir)"/parcat.rst \
333 || echo "Warning: pod2rst not found. Using old parcat.rst"
335 parset.rst: parset.pod
336 ./pod2rst-fix < "$(srcdir)"/parset.pod > "$(srcdir)"/parset.rst \
337 || echo "Warning: pod2rst not found. Using old parset.rst"
340 ./pod2rst-fix < "$(srcdir)"/parsort > "$(srcdir)"/parsort.rst \
341 || echo "Warning: pod2rst not found. Using old parsort.rst"
343 parallel.pdf: parallel.pod
344 pod2pdf --output-file "$(srcdir)"/parallel.pdf "$(srcdir)"/parallel.pod --title "GNU Parallel" \
345 || echo "Warning: pod2pdf not found. Using old parallel.pdf"
347 env_parallel.pdf: env_parallel.pod
348 pod2pdf --output-file "$(srcdir)"/env_parallel.pdf "$(srcdir)"/env_parallel.pod --title "GNU Parallel with environment" \
349 || echo "Warning: pod2pdf not found. Using old env_parallel.pdf"
351 parallel_examples.pdf: parallel_examples.pod
352 pod2pdf --output-file "$(srcdir)"/parallel_examples.pdf "$(srcdir)"/parallel_examples.pod --title "GNU Parallel Examples" \
353 || echo "Warning: pod2pdf not found. Using old parallel_examples.pdf"
355 parallel_tutorial.pdf: parallel_tutorial.pod
356 pod2pdf --output-file "$(srcdir)"/parallel_tutorial.pdf "$(srcdir)"/parallel_tutorial.pod --title "GNU Parallel Tutorial" \
357 || echo "Warning: pod2pdf not found. Using old parallel_tutorial.pdf"
359 parallel_book.pdf: parallel_book.pod
360 pod2pdf --output-file "$(srcdir)"/parallel_book.pdf "$(srcdir)"/parallel_book.pod --title "GNU Parallel Book" \
361 || echo "Warning: pod2pdf not found. Using old parallel_book.pdf"
363 parallel_design.pdf: parallel_design.pod
364 pod2pdf --output-file "$(srcdir)"/parallel_design.pdf "$(srcdir)"/parallel_design.pod --title "GNU Parallel Design" \
365 || echo "Warning: pod2pdf not found. Using old parallel_design.pdf"
367 parallel_alternatives.pdf: parallel_alternatives.pod
368 pod2pdf --output-file "$(srcdir)"/parallel_alternatives.pdf "$(srcdir)"/parallel_alternatives.pod --title "GNU Parallel alternatives" \
369 || echo "Warning: pod2pdf not found. Using old parallel_alternatives.pdf"
372 pod2pdf --output-file "$(srcdir)"/sem.pdf "$(srcdir)"/sem.pod --title "GNU sem" \
373 || echo "Warning: pod2pdf not found. Using old sem.pdf"
376 pod2pdf --output-file "$(srcdir)"/sql.pdf "$(srcdir)"/sql --title "GNU SQL" \
377 || echo "Warning: pod2pdf not found. Using old sql.pdf"
379 niceload.pdf: niceload.pod
380 pod2pdf --output-file "$(srcdir)"/niceload.pdf "$(srcdir)"/niceload.pod --title "GNU niceload" \
381 || echo "Warning: pod2pdf not found. Using old niceload.pdf"
383 parcat.pdf: parcat.pod
384 pod2pdf --output-file "$(srcdir)"/parcat.pdf "$(srcdir)"/parcat.pod --title "GNU parcat" \
385 || echo "Warning: pod2pdf not found. Using old parcat.pdf"
387 parset.pdf: parset.pod
388 pod2pdf --output-file "$(srcdir)"/parset.pdf "$(srcdir)"/parset.pod --title "GNU parset" \
389 || echo "Warning: pod2pdf not found. Using old parset.pdf"
392 pod2pdf --output-file "$(srcdir)"/parsort.pdf "$(srcdir)"/parsort --title "GNU parsort" \
393 || echo "Warning: pod2pdf not found. Using old parsort.pdf"
395 parallel_cheat_bw.pdf: parallel_cheat_bw.fodt
396 libreoffice --headless --convert-to pdf parallel_cheat_bw.fodt \
397 || echo "Warning: libreoffice failed. Using old parallel_cheat_bw.pdf"
399 parallel_options_map.pdf: parallel.pod pod2graph
400 ./pod2graph parallel.pod > parallel_options_map.pdf \
401 || echo "Warning: pod2graph failed. Using old parallel_options_map.pdf"