Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

GNUmakefile 11 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
  1. # $Id$
  2. #
  3. # Copyright (c) 1991-2012 by P. Wessel, W. H. F. Smith, R. Scharroo, and J. Luis
  4. # See COPYING file for copying and redistribution conditions.
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; version 2 or any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # Contact info: gmt.soest.hawaii.edu
  16. #-------------------------------------------------------------------------------
  17. # GNU Makefile for GMT Documentation by gurus only
  18. #
  19. # The following commands are available to create all the GMT documentation
  20. #
  21. # make all : same as : make pdf html
  22. # make pdf : Creƒwebmanate PDF versions of documentation and man pages
  23. # make html : Create HTML version of man pages
  24. # make install : make all; and then install in place
  25. #
  26. # All the above commands prepare all the necessary graphs and text to be included.
  27. # Make sure, however, that the examples are already made by running "make examples"
  28. #
  29. # make prep : Only prepare the prerequisites.
  30. #
  31. # Authors: Paul Wessel, SOEST, U. of Hawaii
  32. # Walter H. F. Smith, Lab for Satellite Altimetry, NOAA
  33. #
  34. # Date: 08-Feb-2007
  35. #-------------------------------------------------------------------------------
  36. include ../src/config.mk
  37. .SUFFIXES: .eps .pdf .tex .ps .sh
  38. .PHONY: pdf html all install
  39. # Papersize
  40. PAPER=a4
  41. # PNG resolution
  42. PNGRES=100
  43. # LaTeX command
  44. PDFLATEX=pdflatex --interaction=batchmode
  45. # PS and TEX files used by all documents
  46. ALLPS= fig/GMT_covertext.eps fig/GMT_coverlogo.ps
  47. ALLTEX= GMT_version.tex GMT_macros.tex GMT_Cover.tex
  48. # PS, PDF and TEX files used to make Tutorial
  49. TUTPS= fig/GMT_Environment.eps fig/GMT_pstext_clearance.ps fig/GMT_pstext_justify.ps \
  50. fig/GMT_nearneighbor.ps fig/GMT_atan.ps $(ALLPS)
  51. TUTPDF=$(TUTPS:.ps=.pdf)
  52. TUTPNG=$(TUTPS:.ps=.png)
  53. TUTTEX=GMT_Tutorial.tex $(ALLTEX)
  54. # PS, PDF and TEX files used to make API documentation
  55. APIPS=
  56. APIPDF= $(APIPS:.ps=.pdf)
  57. APITEX= GMT_API.tex $(ALLTEX)
  58. APIIMG= fig/GMT4_mode.png fig/GMT5_mode.png
  59. # PS files created from example scripts
  60. EX_PS= fig/example_01.ps fig/example_02.ps fig/example_03.ps fig/example_04.ps \
  61. fig/example_04c.ps fig/example_05.ps fig/example_06.ps fig/example_07.ps \
  62. fig/example_08.ps fig/example_09.ps fig/example_10.ps fig/example_11.ps \
  63. fig/example_12.ps fig/example_13.ps fig/example_14.ps fig/example_15.ps \
  64. fig/example_16.ps fig/example_17.ps fig/example_18.ps fig/example_19.ps \
  65. fig/example_20.ps fig/example_21.ps fig/example_22.ps fig/example_23.ps \
  66. fig/example_24.ps fig/example_25.ps fig/example_26.ps fig/example_27.ps \
  67. fig/example_28.ps fig/example_29.ps fig/example_30.ps fig/example_31.ps \
  68. fig/example_32.ps
  69. # Ghostscript font lookup path
  70. FONTPATH=examples/ex31/fonts
  71. # PS files created from animation scripts
  72. AN_PS= fig/anim_01.ps fig/anim_02.ps fig/anim_03.ps fig/anim_04.ps
  73. # TEX files of .def files used in the Cookbook that are to retain the comments
  74. DEF_TEX= fig/volcano.tex fig/bullseye.tex fig/functions.tex
  75. # PS files that need special attention
  76. IS_EPS= fig/GMT_covertext.eps fig/GMT_Environment.eps
  77. RGBPS= fig/GMT_RGBchart_a4.ps fig/GMT_RGBchart_letter.ps fig/GMT_RGBchart_tabloid.ps
  78. # PS files for GMT_Docs created from scripts. Scripts have to be converted to TeX (with comments)
  79. DOCPS0= fig/GMT_App_P_1.ps fig/GMT_App_P_2.ps fig/GMT_App_M_2.ps
  80. # PS files for GMT_Docs created from scripts. Scripts have to be converted to TeX (without comments)
  81. DOCPS1= fig/GMT_App_K_1.ps fig/GMT_App_K_2.ps fig/GMT_App_K_3.ps fig/GMT_App_K_4.ps \
  82. fig/GMT_App_K_5.ps \
  83. fig/GMT_App_O_1.ps fig/GMT_App_O_2.ps fig/GMT_App_O_3.ps \
  84. fig/GMT_App_O_4.ps fig/GMT_App_O_5.ps fig/GMT_App_O_6.ps fig/GMT_App_O_7.ps \
  85. fig/GMT_App_O_8.ps fig/GMT_App_O_9.ps \
  86. fig/GMT_-B_custom.ps fig/GMT_-B_time1.ps fig/GMT_-B_time2.ps fig/GMT_-B_time3.ps \
  87. fig/GMT_-B_time4.ps fig/GMT_-B_time5.ps fig/GMT_-B_time6.ps fig/GMT_-B_time7.ps \
  88. fig/GMT_linear.ps fig/GMT_log.ps fig/GMT_pow.ps \
  89. fig/GMT_linear_cal.ps fig/GMT_linear_d.ps fig/GMT_polar.ps \
  90. fig/GMT_TM.ps fig/GMT_albers.ps fig/GMT_az_equidistant.ps \
  91. fig/GMT_cassini.ps fig/GMT_eckert4.ps fig/GMT_eckert6.ps fig/GMT_equi_cyl.ps \
  92. fig/GMT_equidistant_conic.ps fig/GMT_gall_stereo.ps fig/GMT_general_cyl.ps \
  93. fig/GMT_gnomonic.ps fig/GMT_grinten.ps fig/GMT_hammer.ps \
  94. fig/GMT_lambert_az_hemi.ps fig/GMT_lambert_az_rect.ps fig/GMT_lambert_conic.ps \
  95. fig/GMT_mercator.ps fig/GMT_miller.ps fig/GMT_mollweide.ps \
  96. fig/GMT_obl_merc.ps fig/GMT_orthographic.ps fig/GMT_perspective.ps fig/GMT_polyconic.ps \
  97. fig/GMT_robinson.ps fig/GMT_sinus_int.ps fig/GMT_sinusoidal.ps \
  98. fig/GMT_stereographic_general.ps fig/GMT_stereographic_polar.ps \
  99. fig/GMT_stereographic_rect.ps fig/GMT_stereonets.ps fig/GMT_transverse_merc.ps \
  100. fig/GMT_winkel.ps
  101. # PS files for GMT_Docs created from scripts. Scripts do not need to be converted to TeX.
  102. DOCPS2= fig/GMT_-B_geo_1.ps fig/GMT_-B_geo_2.ps fig/GMT_-B_linear.ps fig/GMT_-B_log.ps \
  103. fig/GMT_-B_pow.ps fig/GMT_utm_zones.ps fig/GMT_linecap.ps fig/GMT_arrows.ps \
  104. fig/GMT_-J.ps fig/GMT_-OK.ps fig/GMT_-P.ps fig/GMT_-R.ps fig/GMT_-U.ps \
  105. fig/GMT_-XY.ps fig/GMT_registration.ps fig/GMT_App_E.ps \
  106. fig/GMT_App_F_dingbats.ps fig/GMT_App_F_iso+.ps fig/GMT_App_F_stand+.ps \
  107. fig/GMT_App_F_symbol.ps fig/GMT_App_G.ps fig/GMT_App_J_1.ps fig/GMT_App_J_2.ps fig/GMT_App_J_3.ps \
  108. fig/GMT_App_M_1.ps fig/GMT_App_N_1.ps \
  109. fig/GMT_Defaults_1a.ps fig/GMT_Defaults_1b.ps fig/GMT_Defaults_1c.ps fig/GMT_volcano.ps \
  110. fig/GMT_color_interpolate.ps
  111. # Prepared images for GMT_Docs
  112. DOCIMG= fig/GMT5_Summit_2011.png fig/gimp-panel.png fig/gimp-sliders.png fig/hsv-cone.png \
  113. ppt/formatpicture.png ppt/rendering.png
  114. # All PS, EPS and PDF files for GMT_Docs
  115. DOCPS= $(DOCPS0) $(DOCPS1) $(DOCPS2) $(ALLPS) $(RGBPS)
  116. DOCPDF= $(DOCPS:.ps=.pdf) $(IS_EPS:.eps=.pdf) $(EX_PS:.ps=.pdf) $(AN_PS:.ps=.pdf)
  117. EXPNG= $(EX_PS:.ps=.png)
  118. # All TEX files needed for GMT_Docs
  119. DOCTEX= GMT_Docs.tex GMT_Appendix_A.tex GMT_Appendix_B.tex GMT_Appendix_C.tex GMT_Appendix_D.tex \
  120. GMT_Appendix_E.tex GMT_Appendix_F.tex GMT_Appendix_G.tex GMT_Appendix_H.tex GMT_Appendix_I.tex \
  121. GMT_Appendix_J.tex GMT_Appendix_K.tex GMT_Appendix_L.tex GMT_Appendix_M.tex GMT_Appendix_N.tex \
  122. GMT_Appendix_O.tex GMT_Appendix_P.tex \
  123. GMT_Chapter_1.tex GMT_Chapter_2.tex GMT_Chapter_3.tex GMT_Chapter_4.tex GMT_Chapter_5.tex \
  124. GMT_Chapter_6.tex GMT_Chapter_7.tex GMT_Chapter_8.tex GMT_Chapter_9.tex \
  125. GMT_Frontmatter.tex $(DOCPS0:.ps=.tex) $(DOCPS1:.ps=.tex) $(EX_PS:.ps=.tex) $(AN_PS:.ps=.tex) $(DEF_TEX) $(ALLTEX)
  126. all: pdf html
  127. install:: all
  128. # Shortcut, just to preprocess all required files
  129. prep prepro: prep-ps prep-pdf prep-tex prep-png $(DOCIMG)
  130. prep-ps: $(DOCPS) $(TUTPS) $(APIPS)
  131. prep-pdf: $(DOCPDF) $(TUTPDF) $(APIPDF)
  132. prep-png: $(EXPNG)
  133. prep-tex: $(DOCTEX) $(TUTTEX) $(APITEX)
  134. # Cleanup, before or after
  135. clean:
  136. \rm -f *% .gmt* gmt.conf
  137. \rm -f *.aux *.lot *.lof *.toc *.pdf *.out *.dvi *.ind *.ilg *.idx *.log *.ps \
  138. *.4ct *.4tc *.css *.html *.idv *.lg *.tmp *.xref *-js.tex
  139. \rm -f GMT_Appendix_N_inc.tex
  140. \rm -f fig/*.{tex,pdf} fig/{GMT,example,anim}_*.png
  141. \rm -rf GMT_Docs GMT_Tutorial GMT_API
  142. spotless: clean
  143. \rm -f GMT_version.tex
  144. \rm -rf html/man html/index.html html/images pdf
  145. # Shortcuts, just to do a couple of things
  146. pdf: docs tutorial api man
  147. docs: pdf/GMT_Docs.pdf
  148. tutorial: pdf/GMT_Tutorial.pdf
  149. api: pdf/GMT_API.pdf
  150. man: pdf/GMT_Manpages.pdf
  151. html: html/man/blockmean.html html/index.html
  152. # Convert the PS files of the examples and animations to PS and PDF, while stripping off the time tag and
  153. # rotating landscape images back to portrait.
  154. # The extra FONTPATH options is only needed for example 31, but we do it here for all.
  155. $(EX_PS:.ps=.pdf) $(AN_PS:.ps=.pdf): %.pdf: %.ps
  156. ps2raster -Au -P -Tf -C-sFONTPATH=$(FONTPATH) $*.ps
  157. $(EX_PS:.ps=.png) $(AN_PS:.ps=.png): %.png: %.ps
  158. ps2raster -Au -P -Tg -E$(PNGRES) $*.ps
  159. %.pdf: %.ps
  160. ps2raster -A -P -Tf $*.ps
  161. %.png: %.ps
  162. ps2raster -A -P -Tg -E$(PNGRES) $*.ps
  163. # To convert EPS to PDF
  164. %.pdf: %.eps
  165. ps2raster -P -Tf $*.eps
  166. %.png: %.eps
  167. ps2raster -P -Tg -E$(PNGRES) $*.eps
  168. # Turn scripts into TeX files for inclusion in the documentation. Keep comments in these.
  169. $(DOCPS0:.ps=.tex) fig/functions.tex: fig/%.tex: scripts/%.sh
  170. pr -t -e scripts/$*.sh | egrep -v 'Id:|functions.sh' > fig/$*.tex
  171. # Turn scripts into TeX files for inclusion in the documentation. Remove comments in these.
  172. $(DOCPS1:.ps=.tex): fig/%.tex: scripts/%.sh
  173. pr -t -e scripts/$*.sh | egrep -v '^#|^$$|functions.sh' > fig/$*.tex
  174. # Keep the comments in the examples, but remove CVS tag.
  175. $(EX_PS:.ps=.tex): %.tex: %.ps
  176. pr -t -e $(subst fig/example_,examples/*/job,$*).sh | egrep -v 'Id:|functions.sh' > $*.tex
  177. $(AN_PS:.ps=.tex): %.tex: %.ps
  178. pr -t -e $(subst fig/anim_,examples/*/anim_,$*).sh | egrep -v 'Id:|functions.sh' > $*.tex
  179. fig/volcano.tex: ../share/custom/volcano.def
  180. pr -t -e ../share/custom/volcano.def | egrep -v 'Id:' > $@
  181. fig/bullseye.tex: examples/ex20/bullseye.def
  182. pr -t -e examples/ex20/bullseye.def | egrep -v 'Id:' > $@
  183. # How to create version info
  184. GMT_version.tex: GMT_version.tex.in
  185. @echo "You must first run configure in the main GMT directory"; exit 1
  186. # Dependencies and rules to make PDF documentation
  187. pdf/GMT_Docs.pdf: $(DOCPDF) $(DOCIMG) $(DOCTEX)
  188. \rm -f GMT_{Docs,Frontmatter,Chapter*,Appendix*}.{aux,idx,ilg,ind,log,lof,lot,toc,out,dvi}
  189. $(PDFLATEX) GMT_Docs
  190. $(PDFLATEX) GMT_Docs
  191. makeindex -s GMT.ist GMT_Docs.idx
  192. $(PDFLATEX) GMT_Docs
  193. $(PDFLATEX) GMT_Docs
  194. mkdir -p pdf
  195. \mv GMT_Docs.pdf $@
  196. \ln -f fig/GMT_RGBchart_*.pdf pdf
  197. \rm -f GMT_{Docs,Frontmatter,Chapter*,Appendix*}.{aux,idx,ilg,ind,log,lof,lot,toc,out,dvi}
  198. pdf/GMT_Tutorial.pdf: $(TUTPDF) $(TUTIMG) $(TUTTEX)
  199. \rm -f GMT_Tutorial.{aux,idx,ilg,ind,log,lof,lot,toc,out,dvi}
  200. $(PDFLATEX) GMT_Tutorial
  201. $(PDFLATEX) GMT_Tutorial
  202. makeindex -s GMT.ist GMT_Tutorial.idx
  203. $(PDFLATEX) GMT_Tutorial
  204. $(PDFLATEX) GMT_Tutorial
  205. mkdir -p pdf
  206. \mv GMT_Tutorial.pdf $@
  207. \rm -f GMT_Tutorial.{aux,idx,ilg,ind,log,lof,lot,toc,out,dvi}
  208. pdf/GMT_API.pdf: $(APIPDF) $(APIIMG) $(APITEX)
  209. \rm -f GMT_API.{aux,idx,ilg,ind,log,lof,lot,toc,out,dvi}
  210. $(PDFLATEX) GMT_API
  211. $(PDFLATEX) GMT_API
  212. makeindex -s GMT.ist GMT_API.idx
  213. $(PDFLATEX) GMT_API
  214. $(PDFLATEX) GMT_API
  215. mkdir -p pdf
  216. \mv GMT_API.pdf $@
  217. \rm -f GMT_API.{aux,idx,ilg,ind,log,lof,lot,toc,out,dvi}
  218. pdf/GMT_Manpages.pdf: pdfman.sh ../src/blockmean.1
  219. bash pdfman.sh -s
  220. html/man/blockmean.html: webman.sh ../src/blockmean.1
  221. bash webman.sh -s
  222. html/index.html: $(EXPNG)
  223. ln -f html/gmt_services.html $@
  224. \mkdir -p html/images
  225. \ln -f $(EXPNG) html/images
  226. include Makefile
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...