source: trunk/docs/docs_dev/makefile_non_sphinx

Last change on this file was 205, checked in by pinsard, 8 years ago

website not any more hosted by LOCEAN

  • Property svn:executable set to *
  • Property svn:keywords set to Id URL
File size: 6.7 KB
Line 
1#+
2#
3# .. _makefile_non_sphinx:
4#
5# ===================
6# makefile_non_sphinx
7# ===================
8#
9# génération des manuels à partir des fichiers non assimilables directement
10# par sphinx
11#
12# SEE ALSO
13# ========
14#
15# :ref:`builddoc`
16#
17# :ref:`Makefile`
18#
19# :ref:`<extract_rst.sh fptools:extract_rst.sh>`
20#
21# TODO
22# ====
23#
24# check man_troff
25#
26# improve dependencies
27#
28# sort manuals in alphanumeric order
29#
30# EVOLUTIONS
31# ==========
32#
33# $Id$
34#
35# $URL$
36#
37# - fplod 20120319
38#
39#   * sort manuals in alphanumeric order
40#     thanks to
41#     http://morlockhq.blogspot.fr/2008/09/bash-tip-reverse-sorting-lists-revisted.html
42#   * fix ferret and odv errors
43#
44# - fplod 20120306
45#
46#   * creation from adm/makefile
47#   * start fix for ../../src/paper01/fig\*/\*.pro
48#   * start fix for ../../src/test/\*.m
49#
50#-
51#
52LIST_SRCSH = \
53$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.sh" ; \
54        echo "Makefile"; \
55        echo "makefile_non_sphinx" \
56        | sort)
57
58LIST_SRCSH_RST = \
59$(shell echo "$(LIST_SRCSH)" | \
60        sed -e "s+../../adm/website+source/manuals+g" \
61            -e "s+../../adm+source/manuals+g" \
62            -e "s+../../src+source/manuals+g" \
63            -e "s+../../docs/docs_dev+source/manuals+g" \
64            -e "s+Makefile+source/manuals/Makefile.rst+g" \
65            -e "s+makefile_non_sphinx+source/manuals/makefile_non_sphinx.rst+g" \
66            -e "s+\.sh+.sh.rst+g")
67
68LIST_SRCIDL = \
69$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.pro" | sort)
70
71LIST_SRCIDL_RST = \
72$(shell echo "$(LIST_SRCIDL)" | \
73        sed \
74            -e "s+../../src/paper01/fig10+source/manuals+g" \
75            -e "s+../../src/paper01/fig11+source/manuals+g" \
76            -e "s+../../src/paper01/fig12+source/manuals+g" \
77            -e "s+../../src/paper01/fig13+source/manuals+g" \
78            -e "s+../../src/paper01/fig14+source/manuals+g" \
79            -e "s+../../src/paper01/fig15+source/manuals+g" \
80            -e "s+../../src/paper01/fig16+source/manuals+g" \
81            -e "s+../../src/paper01/fig1+source/manuals+g" \
82            -e "s+../../src/paper01/fig2+source/manuals+g" \
83            -e "s+../../src/paper01/fig3+source/manuals+g" \
84            -e "s+../../src/paper01/fig4+source/manuals+g" \
85            -e "s+../../src/paper01/fig5+source/manuals+g" \
86            -e "s+../../src/paper01/fig6+source/manuals+g" \
87            -e "s+../../src/paper01/fig7+source/manuals+g" \
88            -e "s+../../src/paper01/fig8+source/manuals+g" \
89            -e "s+../../src/paper01/fig9+source/manuals+g" \
90            -e "s+../../src+source/manuals+g" \
91            -e "s+\.pro+.pro.rst+g")
92
93LIST_SRCMATLAB = \
94$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.m" | sort)
95
96LIST_SRCMATLAB_RST = \
97$(shell echo "$(LIST_SRCMATLAB)" | \
98        sed -e "s+../../src/test+source/manuals+g" \
99            -e "s+../../src+source/manuals+g" \
100            -e "s+\.m+.m.rst+g")
101
102LIST_SRCFERRET = \
103$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.jnl" | sort)
104
105LIST_SRCFERRET_RST = \
106$(shell echo "$(LIST_SRCFERRET)" | \
107        sed -e "s+../../src/test+source/manuals+g" \
108            -e "s+\.jnl+.jnl.rst+g")
109
110LIST_SRCODV = \
111$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.cmd" | sort)
112
113LIST_SRCODV_RST = \
114$(shell echo "$(LIST_SRCODV)" | \
115        sed -e "s+../../src/test+source/manuals+g" \
116            -e "s+\.cmd+.cmd.rst+g")
117
118LIST_RST = \
119$(shell echo $(LIST_SRCSH_RST) \
120$(LIST_SRCIDL_RST) \
121$(LIST_SRCFERRET_RST) \
122$(LIST_SRCODV_RST) \
123$(LIST_SRCMATLAB_RST) | tr ' ' '\n' | sort | tr '\n' ' ')
124
125.PHONY : \
126help \
127clean \
128all
129
130help :
131        echo "$(LIST_RST)"
132        @echo "Following commands are available to build outputs :"
133        @echo "\$$ make -f makefile_non_sphinx clean"
134        @echo "\$$ make -f makefile_non_sphinx all"
135
136clean :
137        -@rm -f $(LIST_RST) 2> /dev/null
138        -@rm source/manuals/manuals_non_sphinx.rst 2> /dev/null
139
140
141all : \
142source/manuals/manuals_non_sphinx.rst
143
144source/manuals/manuals_non_sphinx.rst : \
145$(LIST_RST)
146        @echo ".. _manuals_non_sphinx:" > $@
147        @echo " " >> $@
148        @echo "non sphinx manuals" | tr [:print:] = >> $@
149        @echo "non sphinx manuals" >> $@
150        @echo "non sphinx manuals" | tr [:print:] = >> $@
151        @echo " " >> $@
152        @echo ".. toctree::" >> $@
153        @echo "   :maxdepth: 1" 1>> $@
154        @echo "   :glob:" 1>> $@
155        @echo " " >> $@
156        @for file in $(LIST_RST); \
157        do \
158           echo "   $$(basename $${file} .rst)"; \
159        done >> $@
160        @echo " " >> $@
161
162source/manuals/%.sh.rst : ../../adm/%.sh
163        @extract_rst.sh -i $< -l sh -o $@
164
165source/manuals/%.sh.rst : ../../adm/website/%.sh
166        @extract_rst.sh -i $< -l sh -o $@
167
168source/manuals/%.sh.rst : ../../src/%.sh
169        @extract_rst.sh -i $< -l sh -o $@
170
171source/manuals/%.sh.rst : ../../docs/docs_dev/%.sh
172        @extract_rst.sh -i $< -l sh -o $@
173
174source/manuals/makefile_non_sphinx.rst : ../../docs/docs_dev/makefile_non_sphinx
175        @extract_rst.sh -i $< -l sh -o $@
176
177source/manuals/Makefile.rst : ../../docs/docs_dev/Makefile
178        @extract_rst.sh -i $< -l sh -o $@
179
180source/manuals/%.pro.rst : ../../src/%.pro
181        @extract_rst.sh -i $< -l IDL -o $@
182
183source/manuals/%.pro.rst : ../../src/paper01/fig1/%.pro
184        @extract_rst.sh -i $< -l IDL -o $@
185
186source/manuals/%.pro.rst : ../../src/paper01/fig2/%.pro
187        @extract_rst.sh -i $< -l IDL -o $@
188
189source/manuals/%.pro.rst : ../../src/paper01/fig3/%.pro
190        @extract_rst.sh -i $< -l IDL -o $@
191
192source/manuals/%.pro.rst : ../../src/paper01/fig4/%.pro
193        @extract_rst.sh -i $< -l IDL -o $@
194
195source/manuals/%.pro.rst : ../../src/paper01/fig5/%.pro
196        @extract_rst.sh -i $< -l IDL -o $@
197
198source/manuals/%.pro.rst : ../../src/paper01/fig6/%.pro
199        @extract_rst.sh -i $< -l IDL -o $@
200
201source/manuals/%.pro.rst : ../../src/paper01/fig7/%.pro
202        @extract_rst.sh -i $< -l IDL -o $@
203
204source/manuals/%.pro.rst : ../../src/paper01/fig8/%.pro
205        @extract_rst.sh -i $< -l IDL -o $@
206
207source/manuals/%.pro.rst : ../../src/paper01/fig9/%.pro
208        @extract_rst.sh -i $< -l IDL -o $@
209
210source/manuals/%.pro.rst : ../../src/paper01/fig10/%.pro
211        @extract_rst.sh -i $< -l IDL -o $@
212
213source/manuals/%.pro.rst : ../../src/paper01/fig11/%.pro
214        @extract_rst.sh -i $< -l IDL -o $@
215
216source/manuals/%.pro.rst : ../../src/paper01/fig12/%.pro
217        @extract_rst.sh -i $< -l IDL -o $@
218
219source/manuals/%.pro.rst : ../../src/paper01/fig13/%.pro
220        @extract_rst.sh -i $< -l IDL -o $@
221
222source/manuals/%.pro.rst : ../../src/paper01/fig14/%.pro
223        @extract_rst.sh -i $< -l IDL -o $@
224
225source/manuals/%.pro.rst : ../../src/paper01/fig15/%.pro
226        @extract_rst.sh -i $< -l IDL -o $@
227
228source/manuals/%.pro.rst : ../../src/paper01/fig16/%.pro
229        @extract_rst.sh -i $< -l IDL -o $@
230
231source/manuals/%.m.rst : ../../src/%.m
232        @extract_rst.sh -i $< -l matlab -o $@
233
234source/manuals/%.m.rst : ../../src/test/%.m
235        @extract_rst.sh -i $< -l matlab -o $@
236
237source/manuals/%.jnl.rst : ../../src/test/%.jnl 
238        @extract_rst.sh -i $< -l ferret -o $@
239
240source/manuals/%.cmd.rst : ../../src/test/%.cmd
241        @extract_rst.sh -i $< -l sh -o $@
242
243%.sh.rst : %.sh
244        @extract_rst.sh -i $< -l sh -o $@
245
246%.pro.rst : %.pro
247        @extract_rst.sh -i $< -l IDL -o $@
248
249%.m.rst : %.m
250        @extract_rst.sh -i $< -l matlab -o $@
251
Note: See TracBrowser for help on using the repository browser.