Index: /trunk/adm/extract_rst.sh
===================================================================
--- /trunk/adm/extract_rst.sh	(revision 73)
+++ /trunk/adm/extract_rst.sh	(revision 74)
@@ -215,4 +215,5 @@
  ;;
  *)
+  echo "eee : unknown option ${1}"
   echo "${usage}"
   exit 1
Index: /trunk/adm/makefile
===================================================================
--- /trunk/adm/makefile	(revision 73)
+++ /trunk/adm/makefile	(revision 74)
@@ -19,4 +19,9 @@
 #
 # $Id$
+#
+# - fplod 20100325T114658Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add sphinx for HTML and PDF productions
+#   * remove html_one and pdf_one
 #
 # - fplod 20100310T111645Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -123,21 +128,21 @@
 LIST_SRCSH_RST = \
 $(shell echo "$(LIST_SRCSH)" | \
-        sed -e "s+$(DIRSRC)+$(DIRTMP)+g" \
-            -e "s+\.sh+.sh.rst+g")
+	sed -e "s+$(DIRSRC)+$(DIRTMP)+g" \
+	    -e "s+\.sh+.sh.rst+g")
 
 LIST_SRCSH_TROFF = \
 $(shell echo "$(LIST_SRCSH)" | \
-        sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/man/man1/+g" \
-            -e "s+\.sh+.sh.1+g")
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/man/man1/+g" \
+	    -e "s+\.sh+.sh.1+g")
 
 LIST_SRCSH_HTML = \
 $(shell echo "$(LIST_SRCSH)" | \
-        sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
-            -e "s+\.sh+.sh.html+g")
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
+	    -e "s+\.sh+.sh.html+g")
 
 LIST_SRCSH_PDF = \
 $(shell echo "$(LIST_SRCSH)" | \
-        sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
-            -e "s+\.sh+.sh.pdf+g")
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
+	    -e "s+\.sh+.sh.pdf+g")
 
 LIST_SRCMATLAB = \
@@ -169,22 +174,22 @@
 LIST_SRCMATLAB_RST = \
 $(shell echo "$(LIST_SRCMATLAB)" | \
-        sed -e "s+$(DIRSRC)/mode_sahelien+$(DIRTMP)+g" \
-            -e "s+$(DIRSRC)/SIMULS_IRCAAM+$(DIRTMP)+g" \
-            -e "s+$(DIRSRC)+$(DIRTMP)+g" \
-            -e "s+\.m+.m.rst+g")
+	sed -e "s+$(DIRSRC)/mode_sahelien+$(DIRTMP)+g" \
+	    -e "s+$(DIRSRC)/SIMULS_IRCAAM+$(DIRTMP)+g" \
+	    -e "s+$(DIRSRC)+$(DIRTMP)+g" \
+	    -e "s+\.m+.m.rst+g")
 
 LIST_SRCMATLAB_HTML = \
 $(shell echo "$(LIST_SRCMATLAB)" | \
-        sed -e "s+$(DIRSRC)/mode_sahelien/+$(DIRWWW)/manuals/html/many/+g" \
-            -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRWWW)/manuals/html/many/+g" \
-            -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
-            -e "s+\.m+.m.html+g")
+	sed -e "s+$(DIRSRC)/mode_sahelien/+$(DIRWWW)/manuals/html/many/+g" \
+	    -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRWWW)/manuals/html/many/+g" \
+	    -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
+	    -e "s+\.m+.m.html+g")
 
 LIST_SRCMATLAB_PDF = \
 $(shell echo "$(LIST_SRCMATLAB)" | \
-        sed -e "s+$(DIRSRC)/mode_sahelien/+$(DIRWWW)/manuals/pdf/many/+g" \
-            -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRWWW)/manuals/pdf/many/+g" \
-            -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
-            -e "s+\.m+.m.pdf+g")
+	sed -e "s+$(DIRSRC)/mode_sahelien/+$(DIRWWW)/manuals/pdf/many/+g" \
+	    -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRWWW)/manuals/pdf/many/+g" \
+	    -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
+	    -e "s+\.m+.m.pdf+g")
 
 LIST_SRCFORTRAN = \
@@ -194,23 +199,23 @@
 LIST_SRCFORTRAN_RST = \
 $(shell echo "$(LIST_SRCFORTRAN)" | \
-        sed -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRTMP)+g" \
-            -e "s+$(DIRSRC)+$(DIRTMP)+g" \
-            -e "s+\.F90+.F90.rst+g" \
-            -e "s+\.f+.f.rst+g")
+	sed -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRTMP)+g" \
+	    -e "s+$(DIRSRC)+$(DIRTMP)+g" \
+	    -e "s+\.F90+.F90.rst+g" \
+	    -e "s+\.f+.f.rst+g")
 
 LIST_SRCFORTRAN_HTML = \
 $(shell echo "$(LIST_SRCFORTRAN)" | \
-        sed -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRWWW)/manuals/html/many/+g" \
-            -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
-            -e "s+\.F90+.F90.html+g" \
-            -e "s+\.f+.f.html+g")
+	sed -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRWWW)/manuals/html/many/+g" \
+	    -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
+	    -e "s+\.F90+.F90.html+g" \
+	    -e "s+\.f+.f.html+g")
 
 LIST_SRCFORTRAN_PDF = \
 $(shell echo "$(LIST_SRCFORTRAN)" | \
-        sed -e "s+$(DIRSRC)/mode_sahelien/+$(DIRWWW)/manuals/pdf/many/+g" \
-            -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRWWW)/manuals/pdf/many/+g" \
-            -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
-            -e "s+\.F90+.F90.pdf+g" \
-            -e "s+\.f+.f.pdf+g")
+	sed -e "s+$(DIRSRC)/mode_sahelien/+$(DIRWWW)/manuals/pdf/many/+g" \
+	    -e "s+$(DIRSRC)/SIMULS_IRCAAM/+$(DIRWWW)/manuals/pdf/many/+g" \
+	    -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
+	    -e "s+\.F90+.F90.pdf+g" \
+	    -e "s+\.f+.f.pdf+g")
 
 RST2MAN = \
@@ -222,12 +227,4 @@
 RST2LATEX = \
 rst2latex.py
-
-RST2LATEX_OPTIONS_ONE = \
---documentclass=book \
---stylesheet=manual_one.sty \
---use-latex-toc \
---section-numbering \
---traceback \
---use-verbatim-when-possible
 
 RST2LATEX_OPTIONS_MANY = \
@@ -249,9 +246,9 @@
 man_troff \
 man_html \
-man_html_one \
 man_html_many \
+man_html_sphinx \
 man_pdf \
-man_pdf_one \
-man_pdf_many
+man_pdf_many \
+man_pdf_sphinx
 
 help :
@@ -274,8 +271,8 @@
 before :
 	@mkdir -p $(DIRWWW)/manuals/man/man1/
-	@mkdir -p $(DIRWWW)/manuals/html/one/
 	@mkdir -p $(DIRWWW)/manuals/html/many/
-	@mkdir -p $(DIRWWW)/manuals/pdf/one/
 	@mkdir -p $(DIRWWW)/manuals/pdf/many/
+	@mkdir -p $(DIRWWW)/manuals/pdf/sphinx/
+	@mkdir -p $(DIRTMP)/sphinx_tmpdir/doctrees/
 
 install_all : \
@@ -302,10 +299,9 @@
 	-@rm -f $(DIRTMP)/links.rst*
 	-@rm -f $(DIRTMP)/*.tex
-	-@rm -f $(DIRWWW)/manuals/pdf/one/*.aux
-	-@rm -f $(DIRWWW)/manuals/pdf/one/*.log
-	-@rm -f $(DIRWWW)/manuals/pdf/one/*.out
 	-@rm -f $(DIRWWW)/manuals/pdf/many/*.aux
 	-@rm -f $(DIRWWW)/manuals/pdf/many/*.log
 	-@rm -f $(DIRWWW)/manuals/pdf/many/*.out
+	-@rm -fr $(DIRTMP)/sphinx_tmpdir/
+	-@rm -f $(DIRTMP)/sphinx_*.log
 
 design : \
@@ -332,9 +328,6 @@
 
 man_html : \
-man_html_one \
-man_html_many
-
-man_html_one : \
-$(DIRWWW)/manuals/html/one/index.html
+man_html_many \
+man_html_sphinx
 
 man_html_many : \
@@ -344,10 +337,22 @@
 $(LIST_SRCFORTRAN_HTML)
 
+man_html_sphinx : \
+$(DIRADM)/sphinx/conf.py \
+$(DIRTMP)/sphinx_tmpdir/index.rst \
+$(LIST_SRCSH_RST) \
+$(LIST_SRCMATLAB_RST) \
+$(LIST_SRCFORTRAN_RST)
+	@cp $(LIST_SRCSH_RST) $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_SRCMATLAB_RST) $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_SRCFORTRAN_RST) $(DIRTMP)/sphinx_tmpdir/
+	@sphinx-build -b html -c $(DIRADM)/sphinx \
+	    -d $(DIRTMP)/sphinx_tmpdir/doctrees \
+	    -w $(DIRTMP)/sphinx_html.log \
+	    $(DIRTMP)/sphinx_tmpdir/ \
+	    $(DIRWWW)/manuals/html/sphinx/
+
 man_pdf : \
-man_pdf_one \
-man_pdf_many
-
-man_pdf_one : \
-$(DIRWWW)/manuals/pdf/one/$(PRODUCT)_manuals.pdf \
+man_pdf_many \
+man_pdf_sphinx
 
 man_pdf_many : \
@@ -356,88 +361,26 @@
 $(LIST_SRCFORTRAN_PDF)
 
+man_pdf_sphinx : \
+$(DIRADM)/sphinx/conf.py \
+$(DIRTMP)/sphinx_tmpdir/index.rst \
+$(LIST_SRCSH_PDF) \
+$(LIST_SRCMATLAB_PDF) \
+$(LIST_SRCFORTRAN_PDF)
+	@cp $(LIST_SRCSH_RST) $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_SRCMATLAB_RST) $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_SRCFORTRAN_RST) $(DIRTMP)/sphinx_tmpdir/
+	@sphinx-build -b latex -c $(DIRADM)/sphinx \
+	    -d $(DIRTMP)/sphinx_tmpdir/doctrees \
+	    -w $(DIRTMP)/sphinx_pdf.log \
+	    $(DIRTMP)/sphinx_tmpdir/ \
+	    $(DIRTMP)/sphinx_tmpdir/latex_output
+	cd $(DIRTMP)/sphinx_tmpdir/latex_output/; make all-pdf
+	cp $(DIRTMP)/sphinx_tmpdir/latex_output/*.pdf \
+	   $(DIRWWW)/manuals/pdf/sphinx/
+
 $(DIRWWW)/manuals/html/many/index.html : \
 $(DIRTMP)/index_many.rst
 	@$(RST2HTML) --input-encoding=ISO-8859-15 --strict \
 	$< $@
-
-$(DIRWWW)/manuals/html/one/index.html : \
-$(DIRTMP)/$(PRODUCT)_manuals.rst
-	@$(RST2HTML) --input-encoding=ISO-8859-15 --strict \
-	$< $@
-
-$(DIRWWW)/manuals/pdf/one/$(PRODUCT)_manuals.pdf : \
-$(DIRTMP)/$(PRODUCT)_manuals.tex
-	@-pdflatex -output-directory $(DIRWWW)/manuals/pdf/one/ $<
-	@-pdflatex -output-directory $(DIRWWW)/manuals/pdf/one/ $<
-
-$(DIRTMP)/$(PRODUCT)_manuals.tex : \
-$(DIRTMP)/$(PRODUCT)_manuals.rst
-	@$(RST2LATEX) $(RST2LATEX_OPTIONS_ONE) --input-encoding=ISO-8859-15 --strict \
-	$< $@
-
-$(DIRTMP)/$(PRODUCT)_manuals.rst : \
-$(DIRTMP)/index_one.rst \
-$(LIST_SRCSH_RST) \
-$(LIST_SRCMATLAB_RST) \
-$(LIST_SRCFORTRAN_RST)
-	@cat $(DIRTMP)/index_one.rst > ${DIRTMP}/$(PRODUCT)_manuals.rst1
-	@echo "Shell scripts" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1
-	@echo "=============" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1
-	@for file in $(LIST_SRCSH); \
-	do echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo ".. _$$(basename $${file}) :" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo "$$(basename $${file})" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo "$$(basename $${file} | tr [:print:] -)" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1 ; \
-	 echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 sed -e "s/^==*$$/-----------------/" \
-	-e "s/^--*$$/~~~~~~~~~~~~~~~~~~~~/" \
-	 ${DIRTMP}/$$(basename $${file}).rst >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	done
-	@echo "MATLAB scripts" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1
-	@echo "==============" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1
-	@for file in $(LIST_SRCMATLAB); \
-	do echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo ".. _$$(basename $${file}) :" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo "$$(basename $${file})" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 echo "$$(basename $${file} | tr [:print:] -)" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1 ; \
-	 echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	 sed -e "s/^==*$$/-----------------/" \
-	 -e "s/^--*$$/~~~~~~~~~~~~~~~~~~~~/" \
-	 ${DIRTMP}/$$(basename $${file}).rst >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	done
-	@echo "Fortran Sources" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1
-	@echo "===============" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1
-	@for file in $(LIST_SRCFORTRAN); \
-	do echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	echo ".. _$$(basename $${file}) :" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	echo "$$(basename $${file})" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	echo "$$(basename $${file} | tr [:print:] -)" >> ${DIRTMP}/$(PRODUCT)_manuals.rst1 ; \
-	echo " " >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	sed -e "s/^==*$$/-----------------/" \
-	-e "s/^--*$$/~~~~~~~~~~~~~~~~~~~~/" \
-	${DIRTMP}/$$(basename $${file}).rst >> ${DIRTMP}/$(PRODUCT)_manuals.rst1; \
-	done
-	@grep "\.\. _.*: .*$$" ${DIRTMP}/$(PRODUCT)_manuals.rst1 > \
-	${DIRTMP}/links.rst
-	@sed -e "s/^ *//" ${DIRTMP}/links.rst | sort -u > ${DIRTMP}/links.rst2
-	@sed -e "/\.\. _.*: .*$$/d" ${DIRTMP}/$(PRODUCT)_manuals.rst1 > \
-	${DIRTMP}/$(PRODUCT)_manuals.rst2
-	@cp ${DIRTMP}/$(PRODUCT)_manuals.rst2 $@
-
-$(DIRTMP)/index_one.rst :
-	@echo "=================" >> $@
-	@echo "$(PRODUCTNAME) manuals" >> $@
-	@echo "=================" >> $@
-	@echo " " >> $@
-	@echo ".. contents:: Table of Contents" >> $@
-	@echo "  :depth: 2" >> $@
-	@echo ".. section-numbering::" >> $@
-	@echo " " >> $@
 
 $(DIRTMP)/index_many.rst :
@@ -474,4 +417,49 @@
 	@echo " " >> $@
 
+$(DIRTMP)/sphinx_tmpdir/index.rst :
+	@echo ".. _index:" >> $@
+	@echo " " >> $@
+	@echo "$(PRODUCTNAME) manuals" | tr [:print:] = >> $@
+	@echo "$(PRODUCTNAME) manuals" >> $@
+	@echo "$(PRODUCTNAME) manuals" | tr [:print:] = >> $@
+	@echo " " >> $@
+	@echo "Shell scripts" >> $@
+	@echo "Shell scripts" | tr [:print:] = >> $@
+	@echo ".. toctree::" >> $@
+	@echo "   :maxdepth: 1" 1>> $@
+	@echo "   :glob:" 1>> $@
+	@echo " " >> $@
+	@for file in $(LIST_SRCSH); \
+	do \
+	   echo "   $$(basename $${file})"; \
+	done >> $@
+	@echo " " >> $@
+	@echo "MATLAB scripts" >> $@
+	@echo "MATLAB scripts" | tr [:print:] = >> $@
+	@echo ".. toctree::" >> $@
+	@echo "   :maxdepth: 1" 1>> $@
+	@echo "   :glob:" 1>> $@
+	@echo " " >> $@
+	@for file in $(LIST_SRCMATLAB); \
+	do \
+	   echo "   $$(basename $${file})"; \
+	done >> $@
+	@echo " " >> $@
+	@echo "Fortran Sources" >> $@
+	@echo "Fortran Sources" | tr [:print:] = >> $@
+	@echo ".. toctree::" >> $@
+	@echo "   :maxdepth: 1" 1>> $@
+	@echo "   :glob:" 1>> $@
+	@echo " " >> $@
+	@for file in $(LIST_SRCFORTRAN); \
+	do \
+	   echo "   $$(basename $${file})"; \
+	done >> $@
+	@echo " " >> $@
+	@echo "Indices and tables" >> $@
+	@echo "Indices and tables" | tr [:print:] = >> $@
+	@echo "* :ref:\`search\`" >> $@
+	@echo " " >> $@
+
 $(DIRWWW)/manuals/man/man1/%.1:$(DIRTMP)/%.rst
 	@$(RST2MAN) --input-encoding=ISO-8859-15 --strict \
