Index: /trunk/adm/makefile
===================================================================
--- /trunk/adm/makefile	(revision 98)
+++ /trunk/adm/makefile	(revision 99)
@@ -12,8 +12,4 @@
 # ====
 #
-# ++ amélioration de la page index avec sphinx ou rest2web
-#
-# sphinx output
-#
 # add -W to sphinx command when encoding problems are solved
 #
@@ -32,10 +28,10 @@
 #
 # - fplod 20100311T143131Z aedon.locean-ipsl.upmc.fr (Darwin)
-#   
+#
 #   * add rest2web (alternative to sphinx)
 #
 # - fplod 20100310T190253Z aedon.locean-ipsl.upmc.fr (Darwin)
 #
-#   * add php and xsl files to man_troff 
+#   * add php and xsl files to man_troff
 #
 # - fplod 20100310T182201Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -44,5 +40,5 @@
 #
 # - fplod 20100310T091541Z aedon.locean-ipsl.upmc.fr (Darwin)
-#   
+#
 #   * add man_troff with shell scripts possible now with docutils 0.6
 #     can be test with
@@ -109,27 +105,27 @@
 LIST_SRCPHP_RST = \
 $(shell echo "$(LIST_SRCPHP)" | \
-	sed -e "s+$(DIRSRC)+$(DIRTMP)/sphinx_tmpdir/source+g" \
-            -e "s+\.php+.php.rst+g")
+	sed -e "s+$(DIRSRC)+$(DIRTMP)/+g" \
+	    -e "s+\.php+.php.rst+g")
 
 LIST_SRCPHP_R2W = \
 $(shell echo "$(LIST_SRCPHP)" | \
 	sed -e "s+$(DIRSRC)+$(DIRTMP)/rest2web_tmpdir+g" \
-            -e "s+\.php+.php.txt+g")
+	    -e "s+\.php+.php.txt+g")
 
 
 LIST_SRCPHP_TROFF = \
 $(shell echo "$(LIST_SRCPHP)" | \
-        sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/man/man1/+g" \
-            -e "s+\.php+.php.1+g")
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/man/man1/+g" \
+	    -e "s+\.php+.php.1+g")
 
 LIST_SRCPHP_HTML = \
 $(shell echo "$(LIST_SRCPHP)" | \
-        sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
-            -e "s+\.php+.php.html+g")
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
+	    -e "s+\.php+.php.html+g")
 
 LIST_SRCPHP_PDF = \
 $(shell echo "$(LIST_SRCPHP)" | \
-        sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
-            -e "s+\.php+.php.pdf+g")
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
+	    -e "s+\.php+.php.pdf+g")
 
 LIST_SRCXSL = \
@@ -152,26 +148,26 @@
 LIST_SRCXSL_RST = \
 $(shell echo "$(LIST_SRCXSL)" | \
-        sed -e "s+$(DIRSRC)+$(DIRTMP)/sphinx_tmpdir/source+g" \
-            -e "s+\.xsl+.xsl.rst+g")
+	sed -e "s+$(DIRSRC)+$(DIRTMP)+g" \
+	    -e "s+\.xsl+.xsl.rst+g")
 
 LIST_SRCXSL_R2W = \
 $(shell echo "$(LIST_SRCXSL)" | \
-        sed -e "s+$(DIRSRC)+$(DIRTMP)/rest2web_tmpdir+g" \
-            -e "s+\.xsl+.xsl.txt+g")
+	sed -e "s+$(DIRSRC)+$(DIRTMP)/rest2web_tmpdir+g" \
+	    -e "s+\.xsl+.xsl.txt+g")
 
 LIST_SRCXSL_TROFF = \
 $(shell echo "$(LIST_SRCXSL)" | \
-        sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/man/man1/+g" \
-            -e "s+\.xsl+.xsl.1+g")
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/man/man1/+g" \
+	    -e "s+\.xsl+.xsl.1+g")
 
 LIST_SRCXSL_HTML = \
 $(shell echo "$(LIST_SRCXSL)" | \
-        sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
-            -e "s+\.xsl+.xsl.html+g")
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/html/many/+g" \
+	    -e "s+\.xsl+.xsl.html+g")
 
 LIST_SRCXSL_PDF = \
 $(shell echo "$(LIST_SRCXSL)" | \
-        sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
-            -e "s+\.xsl+.xsl.pdf+g")
+	sed -e "s+$(DIRSRC)+$(DIRWWW)/manuals/pdf/many/+g" \
+	    -e "s+\.xsl+.xsl.pdf+g")
 
 LIST_SRCSH = \
@@ -186,26 +182,26 @@
 LIST_SRCSH_RST = \
 $(shell echo "$(LIST_SRCSH)" | \
-        sed -e "s+$(DIRSRC)+$(DIRTMP)/sphinx_tmpdir/source+g" \
-            -e "s+\.sh+.sh.rst+g")
+	sed -e "s+$(DIRSRC)+$(DIRTMP)+g" \
+	    -e "s+\.sh+.sh.rst+g")
 
 LIST_SRCSH_R2W = \
 $(shell echo "$(LIST_SRCSH)" | \
-        sed -e "s+$(DIRSRC)+$(DIRTMP)/rest2web_tmpdir+g" \
-            -e "s+\.sh+.sh.txt+g")
+	sed -e "s+$(DIRSRC)+$(DIRTMP)/rest2web_tmpdir+g" \
+	    -e "s+\.sh+.sh.txt+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")
 
 REST2WEB = \
@@ -264,12 +260,11 @@
 before :
 	@mkdir -p $(DIRWWW)/manuals/man/man1/
-	@mkdir -p $(DIRWWW)/manuals/html/one/
 	@mkdir -p $(DIRWWW)/manuals/html/many/
 	@mkdir -p $(DIRWWW)/manuals/html/rest2web/
 	@mkdir -p $(DIRWWW)/manuals/html/rest2web/css/
 	@mkdir -p $(DIRWWW)/manuals/html/sphinx/
-	@mkdir -p $(DIRWWW)/manuals/pdf/one/
 	@mkdir -p $(DIRWWW)/manuals/pdf/many/
-	@mkdir -p $(DIRTMP)/sphinx_tmpdir/source/
+	@mkdir -p $(DIRWWW)/manuals/pdf/sphinx/
+	@mkdir -p $(DIRTMP)/sphinx_tmpdir/doctrees/
 	@mkdir -p $(DIRTMP)/rest2web_tmpdir/
 
@@ -286,14 +281,13 @@
 cleantmp :
 	-@rm -f $(DIRTMP)/all.xml
-	-@rm -rf $(DIRTMP)/sphinx_tmpdir/
+	-@rm -f $(DIRTMP)/*.rst
+	-@rm -f $(DIRTMP)/*.tex
 	-@rm -rf $(DIRTMP)/rest2web_tmpdir/
 	-@rm -f $(DIRTMP)/rest2web.log
-	-@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 -rf $(DIRTMP)/sphinx_tmpdir/
+	-@rm -f $(DIRTMP)/sphinx_*.log
 
 design : \
@@ -347,46 +341,22 @@
 	python $(REST2WEB) $(DIRADM)/rest2web/superbib_site.ini -v
 
-man_text_sphinx : \
+man_html_sphinx : \
 $(DIRADM)/sphinx/conf.py \
-$(DIRADM)/sphinx/Makefile \
+$(DIRTMP)/sphinx_tmpdir/index.rst \
 $(LIST_SRCSH_RST) \
 $(LIST_SRCXSL_RST) \
 $(LIST_SRCPHP_RST)
-	echo "sphinx text ++ experimental"
-	mkdir -p $(DIRWWW)/manuals/text/sphinx/
-	sphinx-build -b text -a -E -c $(DIRADM)/sphinx \
-	-w $(DIRTMP)/sphinx.log \
-	$(DIRTMP)/sphinx_tmpdir/source \
-	$(DIRWWW)/manuals/text/sphinx/
-
-man_html_sphinx : \
-$(DIRADM)/sphinx/conf.py \
-$(DIRADM)/sphinx/Makefile \
-$(DIRADM)/sphinx/source/contents.rst \
-$(LIST_SRCSH_RST) \
-$(LIST_SRCXSL_RST) \
-$(LIST_SRCPHP_RST)
-	cp $(DIRADM)/sphinx/source/contents.rst $(DIRTMP)/sphinx_tmpdir/source/
-	sphinx-build -b html -a -E -c $(DIRADM)/sphinx \
-	-d build/doctrees \
-	-w $(DIRTMP)/sphinx.log \
-	$(DIRTMP)/sphinx_tmpdir/source \
-	$(DIRWWW)/manuals/html/sphinx/
+	@cp $(LIST_SRCSH_RST) $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_SRCXSL_RST) $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_SRCPHP_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_many \
 man_pdf_sphinx
-
-man_pdf_sphinx : \
-$(DIRADM)/sphinx/conf.py \
-$(DIRADM)/sphinx/Makefile \
-$(LIST_SRCSH_RST) \
-$(LIST_SRCXSL_RST) \
-$(LIST_SRCPHP_RST)
-	sphinx-build -b latex -a -E -c $(DIRADM)/sphinx \
-	-d build/doctrees \
-	-w $(DIRTMP)/sphinx.log \
-	$(DIRTMP)/sphinx_tmpdir/source \
-	$(DIRWWW)/manuals/pdf/sphinx/
 
 man_pdf_many : \
@@ -395,4 +365,22 @@
 $(LIST_SRCPHP_PHP)
 
+man_pdf_sphinx : \
+$(DIRADM)/sphinx/conf.py \
+$(DIRTMP)/sphinx_tmpdir/index.rst \
+$(LIST_SRCSH_RST) \
+$(LIST_SRCXSL_RST) \
+$(LIST_SRCPHP_RST)
+	@cp $(LIST_SRCSH_RST) $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_SRCXSL_RST) $(DIRTMP)/sphinx_tmpdir/
+	@cp $(LIST_SRCPHP_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
@@ -400,18 +388,8 @@
 	$< $@
 
-$(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)/index_many.rst :
-	@echo "===================" >> $@
-	@echo "$(PRODUCTNAME) tools" >> $@
-	@echo "===================" >> $@
+	@echo "$(PRODUCTNAME) manuals" | tr [:print:] = >> $@
+	@echo "$(PRODUCTNAME) manuals" >> $@
+	@echo "$(PRODUCTNAME) manuals" | tr [:print:] = >> $@
 	@echo " " >> $@
 	@echo "Shell scripts" >> $@
@@ -427,5 +405,51 @@
 	@for file in $(LIST_SRCPHP); do echo " ";echo "$$(basename $${file})_"; echo " "; echo ".. _$$(basename $${file}) : $$(basename $${file}).html"; done >> $@
 
-$(DIRTMP)/rest2web_tmpdir/%.txt: $(DIRTMP)/sphinx_tmpdir/source/%.rst
+$(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 "XSL scripts" >> $@
+	@echo "XSL scripts" | tr [:print:] = >> $@
+	@echo ".. toctree::" >> $@
+	@echo "   :maxdepth: 1" 1>> $@
+	@echo "   :glob:" 1>> $@
+	@echo " " >> $@
+	@for file in $(LIST_SRCXSL); \
+	do \
+	   echo "   $$(basename $${file})"; \
+	done >> $@
+	@echo " " >> $@
+	@echo "PHP scripts" >> $@
+	@echo "PHP scripts" | tr [:print:] = >> $@
+	@echo ".. toctree::" >> $@
+	@echo "   :maxdepth: 1" 1>> $@
+	@echo "   :glob:" 1>> $@
+	@echo " " >> $@
+	@for file in $(LIST_SRCPHP); \
+	do \
+	   echo "   $$(basename $${file})"; \
+	done >> $@
+	@echo " " >> $@
+	@echo "Indices and tables" >> $@
+	@echo "Indices and tables" | tr [:print:] = >> $@
+	@echo "* :ref:\`search\`" >> $@
+	@echo " " >> $@
+
+
+$(DIRTMP)/rest2web_tmpdir/%.txt: $(DIRTMP)/%.rst
 	@sed -e "/^#/d" \
  	     -e "s+@file@+$$(basename $< .rst)+" \
@@ -434,9 +458,9 @@
 	@rm $(DIRTMP)/restindex
 
-$(DIRWWW)/manuals/man/man1/%.1:$(DIRTMP)/sphinx_tmpdir/source/%.rst
+$(DIRWWW)/manuals/man/man1/%.1:$(DIRTMP)/%.rst
 	@$(RST2MAN) --input-encoding=ISO-8859-15 --strict \
 	$< $@
 
-$(DIRWWW)/manuals/html/many/%.html:$(DIRTMP)/sphinx_tmpdir/source/%.rst
+$(DIRWWW)/manuals/html/many/%.html:$(DIRTMP)/%.rst
 	@$(RST2HTML) --input-encoding=ISO-8859-15 --strict \
 	$< $@
@@ -446,15 +470,15 @@
 	@-pdflatex -output-directory $(DIRWWW)/manuals/pdf/many/ $<
 
-$(DIRTMP)/%.tex : $(DIRTMP)/sphinx_tmpdir/source/%.rst
+$(DIRTMP)/%.tex : $(DIRTMP)/%.rst
 	@$(RST2LATEX) $(RST2LATEX_OPTIONS_MANY) --input-encoding=ISO-8859-15 --strict \
 	$< $@
 
-$(DIRTMP)/sphinx_tmpdir/source/%.sh.rst : $(DIRSRC)/%.sh
+$(DIRTMP)/%.sh.rst : $(DIRSRC)/%.sh
 	@$(DIRADM)/extract_rst.sh -i $< -l sh -o $@
 
-$(DIRTMP)/sphinx_tmpdir/source/%.xsl.rst : $(DIRSRC)/%.xsl
+$(DIRTMP)/%.xsl.rst : $(DIRSRC)/%.xsl
 	@$(DIRADM)/extract_rst.sh -i $< -l xml -o $@
 
-$(DIRTMP)/sphinx_tmpdir/source/%.php.rst : $(DIRSRC)/%.php
+$(DIRTMP)/%.php.rst : $(DIRSRC)/%.php
 	@$(DIRADM)/extract_rst.sh -i $< -l php -o $@
 
Index: /trunk/adm/sphinx/conf.py
===================================================================
--- /trunk/adm/sphinx/conf.py	(revision 98)
+++ /trunk/adm/sphinx/conf.py	(revision 99)
@@ -38,5 +38,5 @@
 
 # The master toctree document.
-master_doc = 'contents'
+master_doc = 'index'
 
 # General information about the project.
@@ -62,5 +62,5 @@
 # Else, today_fmt is used as the format for a strftime call.
 #today_fmt = '%B %d, %Y'
-today_fmt = '%Y%d%B'
+today_fmt = '%Y%m%d'
 
 # List of documents that shouldn't be included in the build.
@@ -154,5 +154,5 @@
 
 # If true, links to the reST sources are added to the pages.
-html_show_sourcelink = False 
+html_show_sourcelink = False
 
 # If true, an OpenSearch description file will be output, and all pages will
