source: trunk/docs/docs_dev/makefile_non_sphinx @ 157

Last change on this file since 157 was 157, checked in by pinsard, 12 years ago

first step of a better usage of sphinx for doc dev

  • Property svn:executable set to *
File size: 5.1 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:`build_doc`
16#
17# :ref:`Makefile`
18#
19# :ref:`extract_rst.sh`
20#
21# TODO
22# ====
23#
24# check man_troff
25#
26# improve dependencies
27#
28# EVOLUTIONS
29# ==========
30#
31# $Id$
32#
33# $URL$
34#
35# - fplod 20120306
36#
37#   * creation from adm/makefile
38#
39#-
40#
41LIST_SRCSH = \
42$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.sh" ; \
43        echo "Makefile"; \
44        echo "makefile_non_sphinx" \
45        | sort)
46
47LIST_SRCSH_RST = \
48$(shell echo "$(LIST_SRCSH)" | \
49        sed -e "s+../../adm/website+source/manuals/+g" \
50            -e "s+../../adm+source/manuals/+g" \
51            -e "s+../../src+source/manuals/+g" \
52            -e "s+../../docs/docs_dev+source/manuals/+g" \
53            -e "s+Makefile+source/manuals/Makefile.rst+g" \
54            -e "s+makefile_non_sphinx+source/manuals/makefile_non_sphinx.rst+g" \
55            -e "s+\.sh+.sh.rst+g")
56
57
58LIST_SRCIDL = \
59$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.pro" | sort)
60
61LIST_SRCIDL_RST = \
62$(shell echo "$(LIST_SRCIDL)" | \
63        sed -e "s+../../src+source/manuals/+g" \
64            -e "s+../../src/paper01/fig1+source/manuals/paper01/fig1+g" \
65            -e "s+../../src/paper01/fig2+source/manuals/paper01/fig2+g" \
66            -e "s+../../src/paper01/fig3+source/manuals/paper01/fig3+g" \
67            -e "s+../../src/paper01/fig4+source/manuals/paper01/fig4+g" \
68            -e "s+../../src/paper01/fig5+source/manuals/paper01/fig5+g" \
69            -e "s+../../src/paper01/fig6+source/manuals/paper01/fig6+g" \
70            -e "s+../../src/paper01/fig7+source/manuals/paper01/fig7+g" \
71            -e "s+../../src/paper01/fig8+source/manuals/paper01/fig8+g" \
72            -e "s+../../src/paper01/fig9+source/manuals/paper01/fig9+g" \
73            -e "s+../../src/paper01/fig10+source/manuals/paper01/fig10+g" \
74            -e "s+../../src/paper01/fig11+source/manuals/paper01/fig11+g" \
75            -e "s+../../src/paper01/fig12+source/manuals/paper01/fig12+g" \
76            -e "s+../../src/paper01/fig13+source/manuals/paper01/fig13+g" \
77            -e "s+../../src/paper01/fig14+source/manuals/paper01/fig14+g" \
78            -e "s+../../src/paper01/fig15+source/manuals/paper01/fig15+g" \
79            -e "s+../../src/paper01/fig16+source/manuals/paper01/fig16+g" \
80            -e "s+\.pro+.pro.rst+g")
81
82LIST_SRCMATLAB = \
83$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.m" | sort)
84
85LIST_SRCMATLAB_RST = \
86$(shell echo "$(LIST_SRCMATLAB)" | \
87        sed -e "s+../../test+source/manuals/+g" \
88            -e "s+../../src+source/manuals/+g" \
89            -e "s+\.m+.m.rst+g")
90
91LIST_SRCFERRET = \
92$(DIRSRC)/test/read.jnl
93
94LIST_SRCFERRET_RST = \
95$(shell echo "$(LIST_SRCFERRET)" | \
96        sed -e "s+../../src/test/+source/manuals/+g" \
97            -e "s+\.jnl+.jnl.rst+g")
98
99LIST_SRCODV = \
100$(DIRSRC)/test/read.cmd
101
102LIST_SRCODV_RST = \
103$(shell echo "$(LIST_SRCODV)" | \
104        sed -e "s+../../src/test/+source/manuals/+g" \
105            -e "s+\.cmd+.cmd.rst+g")
106
107LIST_RST = \
108$(LIST_SRCSH_RST) \
109$(LIST_SRCIDL_RST) \
110$(LIST_SRCFERRET_RST) \
111$(LIST_SRCODV_RST) \
112$(LIST_SRCMATLAB_RST)
113
114.PHONY : \
115help \
116clean \
117all
118
119help :
120        echo "$(LIST_SRCSH_RST)"
121        @echo "Following commands are available to build outputs :"
122        @echo "\$$ make -f makefile_non_sphinx clean"
123        @echo "\$$ make -f makefile_non_sphinx all"
124
125clean :
126        -@rm -f $(LIST_RST) 2> /dev/null
127        -@rm source/manuals/manuals_non_sphinx.rst 2> /dev/null
128
129
130all : \
131source/manuals/manuals_non_sphinx.rst \
132$(LIST_SRCSH_RST) \
133$(LIST_SRCIDL_RST) \
134$(LIST_SRCMATLAB_RST) \
135$(LIST_SRCIDL_RST)
136
137source/manuals/manuals_non_sphinx.rst :
138        @echo ".. _manuals_non_sphinx:" > $@
139        @echo " " >> $@
140        @echo "non sphinx manuals" | tr [:print:] = >> $@
141        @echo "non sphinx manuals" >> $@
142        @echo "non sphinx manuals" | tr [:print:] = >> $@
143        @echo " " >> $@
144        @echo ".. toctree::" >> $@
145        @echo "   :maxdepth: 1" 1>> $@
146        @echo "   :glob:" 1>> $@
147        @echo " " >> $@
148        @for file in $(LIST_RST); \
149        do \
150           echo "   $$(basename $${file} .rst)"; \
151        done >> $@
152        @echo " " >> $@
153
154source/manuals/%.sh.rst : ../../adm/%.sh
155        @extract_rst.sh -i $< -l sh -o $@
156
157source/manuals/%.sh.rst : ../../adm/website%.sh
158        @extract_rst.sh -i $< -l sh -o $@
159
160source/manuals/%.sh.rst : ../../src/%.sh
161        @extract_rst.sh -i $< -l sh -o $@
162
163source/manuals/%.sh.rst : ../../docs/docs_dev/%.sh
164        @extract_rst.sh -i $< -l sh -o $@
165
166source/manuals/makefile_non_sphinx.rst : ../../docs/docs_dev/makefile_non_sphinx
167        @extract_rst.sh -i $< -l sh -o $@
168
169source/manuals/Makefile.rst : ../../docs/docs_dev/Makefile
170        @extract_rst.sh -i $< -l sh -o $@
171
172source/manuals/%.pro.rst : ../../src/%.pro
173        @extract_rst.sh -i $< -l IDL -o $@
174
175source/manuals/%.m.rst : ../../src/%.m
176        @extract_rst.sh -i $< -l matlab -o $@
177
178source/manuals/%.m.rst : ../../test/%.m
179        @extract_rst.sh -i $< -l matlab -o $@
180
181source/manuals/%.jnl.rst : ../../test/%.jnl 
182        @extract_rst.sh -i $< -l ferret -o $@
183
184source/manuals/%.cmd.rst : ../../test/%.cmd
185        @extract_rst.sh -i $< -l sh -o $@
186
187%.sh.rst : %.sh
188        @extract_rst.sh -i $< -l sh -o $@
189
190%.pro.rst : %.pro
191        @extract_rst.sh -i $< -l IDL -o $@
192
193%.m.rst : %.m
194        @extract_rst.sh -i $< -l matlab -o $@
195
196%.jnl.rst : %.jnl
197        @extract_rst.sh -i $< -l ferret -o $@
198
Note: See TracBrowser for help on using the repository browser.