source: trunk/docs/docs_dev/makefile_non_sphinx @ 2

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

import of project infrastructure (to be cont.)

  • Property svn:executable set to *
File size: 3.7 KB
Line 
1#+
2# .. _makefile_non_sphinx:
3#
4# ===================
5# makefile_non_sphinx
6# ===================
7#
8# DESCRIPTION
9# ===========
10#
11# génération des manuels à partir des fichiers non assimilables directement
12# par sphinx
13#
14# SEE ALSO
15# ========
16#
17# :ref:`builddoc`
18#
19# :ref:`Makefile`
20#
21# :ref:`extract_rst.sh <fptools:extract_rst.sh>`
22#
23# :ref:`for_doc.sh`
24#
25# TODO
26# ====
27#
28# improve dependencies
29#
30# autodoc not ok may be see  autodoc-process-docstring
31#
32# sort pb within index_manuals for matlab scripts because severals
33# directories. and for probably the same reason no next/previous
34# continuation
35#
36# IDL and matlab in man_troff
37#
38# EVOLUTIONS
39# ==========
40#
41# $Id: makefile_non_sphinx 532 2012-04-18 12:44:46Z pinsard $
42#
43# $URL$
44#
45# - fplod 20120424
46#   
47#   * creation
48#
49#-
50#
51LIST_SRCSH = \
52$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.sh"; \
53        echo "Makefile"; \
54        echo "makefile_non_sphinx" \
55        | sort)
56
57LIST_SRCSH_RST = \
58        $(shell echo "$(LIST_SRCSH)" | \
59        sed -e "s+../../adm+source/manuals/+g" \
60        -e "s+../../src+source/manuals/+g" \
61        -e "s+../../docs/docs_dev+source/manuals/+g" \
62        -e "s+Makefile+source/manuals/Makefile.rst+g" \
63        -e "s+makefile_non_sphinx+source/manuals/makefile_non_sphinx.rst+g" \
64        -e "s+\.sh+.sh.rst+g")
65
66LIST_SRCIDL = \
67$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.pro" | sort)
68
69LIST_SRCIDL_RST = \
70$(shell echo "$(LIST_SRCIDL)" | \
71        sed -e "s+\.\./\.\./src+source/manuals/+g" \
72            -e "s+\.\./\.\.+source/manuals/+g" \
73            -e "s+\.pro+.pro.rst+g")
74
75LIST_SRCMATLAB = \
76$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.m" | \
77        grep -v external_matlab | sort)
78
79LIST_SRCMATLAB_RST = \
80$(shell echo "$(LIST_SRCMATLAB)" | \
81        sed \
82            -e "s+../../src/+source/manuals/+g" \
83            -e "s+\.m+.m.rst+g")
84
85LIST_SRCFERRET = \
86$(shell find ../.. ! \( -name '.svn' -prune \) -name "*.jnl" | sort)
87
88LIST_SRCFERRET_RST = \
89$(shell echo "$(LIST_SRCFERRET)" | \
90        sed -e "s+../../src/+source/manuals/+g" \
91            -e "s+\.jnl+.jnl.rst+g")
92
93LIST_RST = \
94$(shell echo $(LIST_SRCSH_RST) \
95$(LIST_SRCIDL_RST) \
96$(LIST_SRCFERRET_RST) \
97$(LIST_SRCODV_RST) \
98$(LIST_SRCMATLAB_RST) | tr ' ' '\n' | sort | tr '\n' ' ')
99
100.PHONY : \
101help \
102clean \
103all
104
105help :
106        @echo "Following commands are available to build outputs :"
107        @echo "\$$ make -f makefile_non_sphinx clean"
108        @echo "\$$ make -f makefile_non_sphinx all"
109
110clean :
111        -@rm source/manuals/myimage*.png
112        -@rm $(LIST_RST) 2> /dev/null
113        -@rm source/manuals/manuals_non_sphinx.rst 2> /dev/null
114
115all : \
116source/manuals/manuals_non_sphinx.rst \
117$(LIST_RST)
118        @for_doc.sh
119
120source/manuals/manuals_non_sphinx.rst : \
121$(LIST_RST)
122        @echo ".. _manuals_non_sphinx:" > $@
123        @echo " " >> $@
124        @echo " " >> $@
125        @echo "non sphinx manuals" | tr [:print:] = >> $@
126        @echo "non sphinx manuals" >> $@
127        @echo "non sphinx manuals" | tr [:print:] = >> $@
128        @echo " " >> $@
129        @echo ".. toctree::" >> $@
130        @echo "   :maxdepth: 1" >> $@
131        @echo "   :glob:" >> $@
132        @echo " " >> $@
133        @echo $(LIST_RST)
134        @for file in $(LIST_RST); \
135        do \
136                echo "   $$(basename $${file} .rst)"; \
137                echo " "; \
138        done >> $@
139        @echo " " >> $@
140
141source/manuals/%.sh.rst : ../../src/%.sh
142        @extract_rst.sh -i $< -l sh -o $@
143
144source/manuals/%.sh.rst : ../../adm/%.sh
145        @extract_rst.sh -i $< -l sh -o $@
146
147source/manuals/makefile_non_sphinx.rst : ../../docs/docs_dev/makefile_non_sphinx
148        @extract_rst.sh -i $< -l sh -o $@
149
150source/manuals/Makefile.rst : ../../docs/docs_dev/Makefile
151        @extract_rst.sh -i $< -l sh -o $@
152
153source/manuals/%.pro.rst : ../../src/%.pro
154        @extract_rst.sh -i $< -l IDL -o $@
155
156source/manuals/%.pro.rst : ../../%.pro
157        @extract_rst.sh -i $< -l IDL -o $@
158
159source/manuals/%.m.rst : ../../src/%.m
160        @extract_rst.sh -i $< -l matlab -o $@
161
162source/manuals/%.jnl.rst : ../../src/%.jnl 
163        @extract_rst.sh -i $< -l ferret -o $@
Note: See TracBrowser for help on using the repository browser.