Index: branches/DEV_r1879_FCM/ADM/DOC_SCRIPTS/extract_rst.sh
===================================================================
--- branches/DEV_r1879_FCM/ADM/DOC_SCRIPTS/extract_rst.sh	(revision 2157)
+++ branches/DEV_r1879_FCM/ADM/DOC_SCRIPTS/extract_rst.sh	(revision 2157)
@@ -0,0 +1,312 @@
+#! /bin/sh
+set -x
+#+
+#
+# ==========
+# extract.sh
+# ==========
+#
+# -----------------------------------------
+# extract ReStructuredText from source file
+# -----------------------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ``extract_rst.sh -i filein -l language -o fileout``
+#
+# DESCRIPTION
+# ===========
+#
+# ``extract_rst.sh`` extracts ReST comments from the file given in argument
+#
+# -i  input file
+# -o  output file (ReST)
+# -l  language
+#
+# Comment block (start, end) identification depends on language :
+#
+#  *F90*
+#   FORTRAN source free form
+#  *fortran*
+#   FORTRAN source fixed form
+#  *sh*
+#   shell scripts
+#  *IDL*
+#   IDL source
+#  *xml*
+#   XML and XSL
+#  *dot*
+#   graphviz files
+#  *php*
+#   PHP files
+#  *matlab*
+#   matlab or octave files
+#
+# EXAMPLES
+# ========
+#
+# To extract ReST comments of this shell script::
+#
+#  $ extract_rst.sh -i extract_rst.sh -l sh -o extract_rst.sh.rst
+#  iii : rst lines of extract_rst.sh are in extract_rst.sh.rst
+#
+# You can produce HTML file from this new file::
+#
+#  $ rst2html.py --input-encoding=ISO-8859-15 extract_rst.sh.rst \
+#    /usr/temp/${LOGNAME}/extract_rst.sh.html
+#
+# You can produce PDF file from this new file::
+#
+#  $ rst2newlatex.py --input-encoding=ISO-8859-15 extract_rst.sh.rst \
+#    /usr/temp/${LOGNAME}/extract_rst.sh.tex
+#  $ pdflatex extract_rst.sh.tex
+#
+# Of course beware of consistency of path on links.
+#
+# CAUTIONS
+# ========
+#
+# Becaue of poor implementation of Standard FORTRAN in cpp (prepocessing)
+# within gfortran and g95, ReST comments might induce trouble in
+# FORTRAN sources.
+#
+# For example following line is pointed out be gfortran with
+# ``error: unterminated comment``.
+# This is because ``/*`` is the beginning of a C style comment !!
+# ::
+#
+#      !    **MEAN** = sum( *X*\ (:) )/*ntime*
+#
+#
+#
+# One can modify this ReST line with
+# ::
+#
+#      !    **MEAN** = sum( *X*\ (:) ) / *ntime*
+#
+# TODO
+# ====
+#
+# check parameters
+#
+# log
+#
+# add perl
+#
+# SEE ALSO
+# ========
+#
+# ReStructuredText_
+#
+# .. _ReStructuredText: http://docutils.sourceforge.net/rst.html
+#
+# Docutils_
+#
+# .. _Docutils: http://docutils.sourceforge.net/
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+# - fplod 2009-04-20T08:13:37Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add CAUTIONS paragraph to warn about possible FORTRAN compiling problem
+#
+# - fplod 2009-04-03T14:53:18Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * usage of tr instead of sed to remove ``\r``
+#     due to difference between ``/sw/bin/sed`` and ``/usr/bin/sed`` (the last
+#     one do not work coorectly on ``\r`` interpertation ie: remove the first occurence of
+#     ``r``)
+#
+# - fplod 2009-02-10T10:46:23Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add language fortran for FORTRAN source in fixed form
+#
+# - fplod 2009-01-05T11:41:33Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * remove \\r (CRLF) from file before awk and sed (otherwise ReST block
+#     was not found in "ISO-8859 text, with CRLF line terminators" files
+#
+# - fplod 2008-12-22T10:37:37Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add matlab (octave)
+#
+# - fplod 2008-09-17T13:40:37Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add php language
+#
+# - fplod 2008-09-08T09:34:04Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add F90 language
+#
+# - fplod 2008-08-08T08:28:30Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add KML files (with other XML files)
+#   * add parameters ``-i`` ``-l`` ``-o``
+#
+# - fplod 200807
+#
+#   * creation
+#
+#-
+#
+system=$(uname)
+case "${system}" in
+   AIX|IRIX64)
+      echo " www : no specific posix checking"
+   ;;
+   *)
+      set -o posix
+   ;;
+esac
+unset system
+#
+command=$(basename ${0})
+log_date=$(date -u +"%Y%m%dT%H%M%SZ")
+log=/tmp/$(basename ${command} .sh).log.${log_date}
+#
+usage=" Usage : ${command} -i filein -l language -o fileout"
+#
+minargcount=6
+#echo " narg ${#}"
+if [ ${#} -lt ${minargcount} ]
+then
+   echo "eee : not enought arguments"
+   echo "${usage}"
+   exit 1
+fi
+#
+# default
+# n.a.
+#
+while [ ! -z "${1}" ]
+do
+   case ${1} in
+      -i)
+         filein=${2}
+         shift
+      ;;
+      -o)
+         fileout=${2}
+         shift
+      ;;
+      -l)
+         language=${2}
+         shift
+      ;;
+      -h)
+         echo "${usage}"
+         exit 0
+      ;;
+      *)
+         echo "eee : unknown option ${1}"
+         echo "${usage}"
+         exit 1
+      ;;
+   esac
+   # next flag
+   shift
+done
+#
+set -u
+#
+# ++ check param
+#
+case "${language}" in
+   fortran)
+      awkblockstart="^C\+$"
+      awkblockend="^C-$"
+      sedblockstart="^C+$"
+      sedblockend="^C-$"
+      comment="^C"
+   ;;
+   F90)
+      awkblockstart="^!\+$"
+      awkblockend="^!-$"
+      sedblockstart="^!+$"
+      sedblockend="^!-$"
+      comment="^!"
+   ;;
+   IDL)
+      awkblockstart="^;\+$"
+      awkblockend="^;-$"
+      sedblockstart="^;+$"
+      sedblockend="^;-$"
+      comment="^;"
+   ;;
+   xml)
+      awkblockstart="^<!--rst$"
+      awkblockend="-->$"
+      sedblockstart="^<!--rst$"
+      sedblockend="-->$"
+      comment=""
+   ;;
+   sh)
+      # iii : awk '/^\#\+/,/^\#\-/' $file
+      awkblockstart="^\#\+$"
+      awkblockend="^\#\-$"
+      sedblockstart="^#+"
+      sedblockend="^#-"
+      comment="^#"
+   ;;
+   dot|php)
+      awkblockstart="^\/\*rst$"
+      awkblockend="*\/"
+      sedblockstart="^\/\*rst$"
+      sedblockend="^\*\/"
+      comment=""
+   ;;
+   matlab)
+      awkblockstart="^%\+$"
+      awkblockend="^%-$"
+      sedblockstart="^%+$"
+      sedblockend="^%-$"
+      comment="^%"
+   ;;
+   *)
+      echo "eee : ${language} not implemented"
+      exit 1
+   ;;
+esac
+#
+# just in case suppress \r at the end of lines
+tr -d '\r' < ${filein} > /tmp/${$}_0
+#
+# put rst blocks in one temporary file
+#awk '/^;+/,/^;-/' a.pro | sed -e "/^;+$/d" -e "/^;-$/d" -e "s/^;//"
+cmdawk="awk '/${awkblockstart}/,/${awkblockend}/' /tmp/${$}_0 > /tmp/${$}_1" #++
+eval ${cmdawk}
+if [ ! -s /tmp/${$}_1 ]
+then
+   rm /tmp/${$}_0 /tmp/${$}_1
+   echo "iii : no rst comments in ${filein}"
+   exit 1
+fi
+#
+# suppress begin and end of each block
+sedcmd="sed -e \"/${sedblockstart}/d\" -e \"/${sedblockend}/d\" /tmp/${$}_1 > /tmp/${$}_2"
+eval ${sedcmd}
+#
+# suppress comment at the beginning of each line
+if [ "${comment}" != "" ]
+then
+   sedcmd="sed -e \"s/${comment}//\" /tmp/${$}_2 > /tmp/${$}_3"
+   eval ${sedcmd}
+   # suppress first blank
+   cp /tmp/${$}_3 /tmp/${$}_2
+   sed -e "s/^ //" /tmp/${$}_2 > /tmp/${$}_3
+   cp /tmp/${$}_3 ${fileout}
+else
+   cp /tmp/${$}_2 ${fileout}
+fi
+#
+echo "iii : rst lines of ${filein} are in ${fileout}"
+#
+# clean
+rm /tmp/${$}_0 /tmp/${$}_1 /tmp/${$}_2 /tmp/${$}_3 2> /dev/null
+#
+# exit
+exit 0
Index: branches/DEV_r1879_FCM/ADM/DOC_SCRIPTS/install.sh
===================================================================
--- branches/DEV_r1879_FCM/ADM/DOC_SCRIPTS/install.sh	(revision 2157)
+++ branches/DEV_r1879_FCM/ADM/DOC_SCRIPTS/install.sh	(revision 2157)
@@ -0,0 +1,193 @@
+#!/bin/sh -x
+#+
+#
+# ==========
+# install.sh
+# ==========
+#
+# ----------------------------------------------
+# publication of HTML files and associated files
+# ----------------------------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ install.sh -w dirwww -p dirpublish -u urlpublish -l login
+#
+# DESCRIPTION
+# ===========
+#
+# publication (rsync) of dirwww content on dirpublish given in argument
+#
+# If the host of publication is cerbere.locean-ipsl.upmc.fr, a specific update
+# is launched.
+#
+# -w  input directort
+# -p  output directory
+# -u  output url
+# -l  login used to access on output url
+#
+# If needed, existing directories might be removed before (to erase obsolete
+# files), using ncftp tool :
+#
+# For example, to clean directory on LOCEAN web server ::
+#
+#  $ ncftp -u fplod www.locean-ipsl.upmc.fr
+#  ncftp> cd fplod
+#  ncftp> rm -f pageperso/.DS_Store
+#  ncftp> rm -rf pageperso
+#  ncftp> exit
+#
+# EXAMPLES
+# ========
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: install.sh 101 2010-04-26 12:12:15Z pinsard $
+#
+# - fplod 2008-09-16T15:24:26Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * comments in ReStructured Text
+#
+# - fplod 2008-06-17T09:10:19Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add -l parameter only used in specific case at LOCEAN when user
+#     parameter of persoweb must be different tthan login (ex: acmo vs fplod)
+#   * replace http://www.lodyc.jussieu.fr/info_reseau/persoweb/?fastupdate=1&user=${user}" by
+#     http://intranet.locean-ipsl.upmc.fr/persoweb/?fastupdate=1&user=${user}
+#
+# - fplod 2008-03-28T10:26:58Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * new personnal webpages policy at LOCEAN so new command and new parameter (-u)
+#
+# - fplod 2007-09-28T09:30:43Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * parametrisation and translation
+#
+# - smasson 2007-06-07T16:43:42Z arete.locean-ipsl.upmc.fr (Darwin)
+#
+#   * can give the answer with input parameters
+#
+# - fplod 2007-04-26T11:51:42Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#-
+system=$(uname)
+case "${system}" in
+   AIX|IRIX64)
+      echo " www : no specific posix checking"
+   ;;
+   *)
+      set -o posix
+   ;;
+esac
+unset system
+#
+command=$(basename ${0})
+log_date=$(date -u +"%Y%m%dT%H%M%SZ")
+log=/tmp/$(basename ${command} .sh).log.${log_date}
+#
+usage=" Usage : ${command} -w dirwww -p dirpublish -u urlpublish -l login"
+#
+minargcount=4
+#echo " narg ${#}"
+if [ ${#} -lt ${minargcount} ]
+then
+   echo "eee : not enought arguments"
+   echo "${usage}"
+   exit 1
+fi
+unset minargcount
+#
+# default
+dirpublish="none"
+urlpublish="none"
+login="none"
+#
+while [ ! -z "${1}" ]
+do
+   case ${1} in
+      -w)
+         dirwww=${2}
+         shift
+      ;;
+      -p)
+         dirpublish=${2}
+         shift
+      ;;
+      -u)
+         urlpublish=${2}
+         shift
+      ;;
+      -l)
+         login=${2}
+         shift
+      ;;
+   esac
+   # next flag
+   shift
+done
+#
+set -u
+#
+# ++ check directories
+#
+answer=${1:-" "}
+case ${answer} in
+   y|Y|n|N)
+   ;;
+   *)
+      if [ "${dirpublish}" != "none" ]
+      then
+         echo "Do you want to install on ${dirpublish} (y|[n]) ?"
+         read answer
+      fi
+      if [ "${urlpublish}" != "none" ]
+      then
+         echo "Do you want to install on ${urlpublish} (y|[n]) ?"
+         read answer
+      fi
+   ;;
+esac
+#
+case  ${answer} in
+   y|Y)
+      if [ "${dirpublish}" != "none" ]
+      then
+         # copy of ${dirwww} on $dirpublish
+         echo "iii : update of ${dirpublish}"
+         rsync -av --exclude=".DS_Store" -e ssh ${dirwww}/ ${dirpublish}
+         # detect if in dirpublish following this pattern [USER@]HOST:SRC, HOST
+         # is cerbere.locean-ipsl.upmc.fr. If so, a specific update is launched
+         userhost=${dirpublish%%:*}
+         host=${userhost##*@}
+         if [ ${login} = "none" ]
+         then
+            user=${userhost%%@*}
+         else
+            user=${login}
+         fi
+         if [ "${host}" = "cerbere.locean-ipsl.upmc.fr" ]
+         then
+            wget -q "http://intranet.locean-ipsl.upmc.fr/persoweb/?fastupdate=1&user=${user}" -O /dev/null
+         fi
+      else
+         # urlpublish=http://www.locean-ipsl.upmc.fr/~ginette/produit
+         dirpublish=${urlpublish##*~}
+         cd ${dirwww}
+         #lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} skyros.locean-ipsl.upmc.fr
+         lftp -e "mirror -R . ${dirpublish};quit" -u ${LOGNAME} localhost
+         # pour acmo a la main ++
+         #++lftp -e 'mirror -R . acmo/nouveaux/;quit' -u fplod www.locean-ipsl.upmc.fr
+         # ++ log
+      fi
+   ;;
+   *)
+      echo "no update of ${dirpublish} or ${urlpublish}"
+   ;;
+esac
+#
+# normal exit
+exit 0
Index: branches/DEV_r1879_FCM/ADM/DOC_SCRIPTS/makefile
===================================================================
--- branches/DEV_r1879_FCM/ADM/DOC_SCRIPTS/makefile	(revision 2157)
+++ branches/DEV_r1879_FCM/ADM/DOC_SCRIPTS/makefile	(revision 2157)
@@ -0,0 +1,335 @@
+#+
+#
+# ========
+# makefile
+# ========
+#
+# ---------------------------------------
+# generation of documentation of superbib
+# ---------------------------------------
+#
+# TODO
+# ====
+#
+# add -W to sphinx command when encoding problems are solved
+#
+# usage of sphinx/source/Makefile
+#
+# revision of manual section of php and xsl
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: makefile 101 2010-04-26 12:12:15Z pinsard $
+#
+# - fplod 20100419T145702Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * remove rest2web (sphinx is prefered)
+#
+# - fplod 20100323T135104Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * remove one pdf and html
+#
+# - 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
+#
+# - fplod 20100310T182201Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * usage of sphinx (for the first time !) not yet ok ...
+#
+# - fplod 20100310T091541Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add man_troff with shell scripts possible now with docutils 0.6
+#     can be test with
+#      $ man -M ../doc//manuals/man bibopa.sh
+#
+# - fplod 2009-05-13T14:08:49Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * implicit rules
+#
+#     nb : may be will only work wih GNU make
+#     but easier to update : only one line to add in thi makefile when
+#     a new file is added in $(DIRSRC) directory
+#
+#   * rst2latex usage of manuals_many.sty and manual_one.sty (for TOC and parindent)
+#   * bug fix for PDF manual (missing one pdf2latex)
+#
+# - fplod 2008-10-28T10:59:44Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * add newpage directive
+#     (thanks to http://docutils.sourceforge.net/docs/user/latex.html)
+#
+# - fplod 2008-09-17T09:16:08Z aedon.locean-ipsl.upmc.fr (Darwin)
+#   * add xsl files
+#
+# - fplod 2008-09-16T14:59:02Z aedon.locean-ipsl.upmc.fr (Darwin)
+#   * creation
+#
+# SEE ALSO
+# ========
+#
+# extract_rst.sh_
+#
+# .. _extract_rst.sh: ../extract_rst.sh.html
+#
+#-
+#
+PRODUCT = \
+NEMO_UTIL
+
+PRODUCTNAME = \
+$$(echo $(PRODUCT) | tr [:lower:] [:upper:])
+
+DIRSRC = \
+../../NEMOGCM/TOOLS/COMPILE
+
+DIRADM = \
+./
+
+DIRTMP = \
+./
+
+DIRDESIGN = \
+./design/
+
+DIRWWW = \
+./doc/
+
+URLPUBLISH = \
+http://192.168.0.12/~rblod/$(PRODUCT)
+
+LIST_SRCSH = $(wildcard $(DIRSRC)/*.sh) \
+$(DIRSRC)/../../CONFIG/makenemo \
+$(DIRSRC)/../maketools
+
+LIST_SRCSH_RST = $(addprefix $(DIRTMP)/, $(notdir $(addsuffix .rst,$(LIST_SRCSH))))
+
+LIST_SRCSH_R2W = $(addprefix $(DIRTMP)/rest2web_tmpdir/, $(notdir $(addsuffix .txt,$(LIST_SRCSH))))
+
+LIST_SRCSH_TROFF = $(addprefix $(DIRWWW)/manuals/man/man1/, $(notdir $(addsuffix .1,$(LIST_SRCSH))))
+
+LIST_SRCSH_HTML = $(adprefix $(DIRWWW)/manuals/html/many/, $(notdir $(addsuffix .html,$(LIST_SRCSH))))
+
+LIST_SRCSH_PDF = $(addprefix $(DIRSRC)+$(DIRWWW)/manuals/pdf/many/,$(notdir $(addsuffix .pdf,$(LIST_SRCSH))))
+
+RST2MAN = \
+rst2man.py
+
+RST2HTML = \
+rst2html.py
+
+RST2LATEX = \
+rst2latex.py
+
+RST2LATEX_OPTIONS_MANY = \
+--documentclass=article \
+--stylesheet=manuals_many.sty \
+--traceback \
+--use-verbatim-when-possible
+
+.PHONY : \
+help \
+before \
+clean \
+cleantmp \
+design \
+htmllinkcheckb \
+htmllinkchecka \
+spellcheck \
+all \
+man \
+man_troff \
+man_html \
+man_html_many \
+man_html_sphinx \
+man_pdf \
+man_pdf_many \
+man_pdf_sphinx
+
+help :
+	@echo "Prepare output directories :"
+	@echo "\$$ make before"
+	@echo ""
+	@echo "Following commands are available to build outputs :"
+	@echo "\$$ make all"
+	@echo " "
+	@echo "Check links before installation : "
+	@echo "\$$ make htmllinkcheckb"
+	@echo " "
+	@echo "Last step = installation"
+	@echo "\$$ make install"
+	@echo " "
+	@echo "Check links after installation : "
+	@echo "\$$ make htmllinkchecka"
+	@echo " "
+
+before :
+	@mkdir -p $(DIRWWW)/manuals/man/man1/
+	@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/many/
+	@mkdir -p $(DIRWWW)/manuals/pdf/sphinx/
+	@mkdir -p $(DIRTMP)/sphinx_tmpdir/doctrees/
+	@mkdir -p $(DIRTMP)/rest2web_tmpdir/
+
+install :
+	@install.sh -w $(DIRWWW) -u $(URLPUBLISH)
+
+clean : \
+cleantmp
+	-@rm -fr $(DIRWWW)/
+	-@rm -fr $(DIRWWW)/manuals/man/
+	-@rm -fr $(DIRWWW)/manuals/html/
+	-@rm -fr $(DIRWWW)/manuals/pdf/
+
+cleantmp :
+	-@rm -f $(DIRTMP)/all.xml
+	-@rm -f $(DIRTMP)/*.rst
+	-@rm -f $(DIRTMP)/*.tex
+	-@rm -rf $(DIRTMP)/rest2web_tmpdir/
+	-@rm -f $(DIRTMP)/rest2web.log
+	-@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 : \
+$(DIRDESIGN)/images/$(PRODUCT)_fulldependencies.png \
+$(DIRDESIGN)/images/$(PRODUCT)_fulldependencies.svg
+
+htmllinkcheckb :
+	@linkchecker.sh -d $(DIRWWW)/manuals/html/
+
+htmllinkchecka :
+	@linkchecker.sh -u $(URLPUBLISH)
+
+spellcheck :
+	@++aspell --mode=sgml --master=francais -c \
+	$(DIRSRC)/$(PRODUCT).xml
+
+all : \
+SPECIAL_RST \
+man_troff \
+man_html \
+man_pdf
+
+man_troff : \
+$(LIST_SRCSH_TROFF) 
+
+man_html : \
+man_html_many \
+man_html_sphinx
+
+man_html_many : \
+$(DIRWWW)/manuals/html/many/index.html \
+$(LIST_SRCSH_HTML) 
+
+man_html_sphinx : \
+$(DIRADM)/sphinx/conf.py \
+$(DIRTMP)/sphinx_tmpdir/index.rst \
+$(LIST_SRCSH_RST) 
+	@cp $(LIST_SRCSH_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_many : \
+$(LIST_SRCSH_PHP) 
+
+man_pdf_sphinx : \
+$(DIRADM)/sphinx/conf.py \
+$(DIRTMP)/sphinx_tmpdir/index.rst \
+$(LIST_SRCSH_RST) 
+	@cp $(LIST_SRCSH_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 \
+	$< $@
+
+$(DIRTMP)/index_many.rst :
+	@echo "$(PRODUCTNAME) manuals" | tr [:print:] = > $@
+	@echo "$(PRODUCTNAME) manuals" >> $@
+	@echo "$(PRODUCTNAME) manuals" | tr [:print:] = >> $@
+	@echo " " >> $@
+	@echo "Shell scripts" >> $@
+	@echo "Shell scripts" | tr [:print:] = >> $@
+	@for file in $(LIST_SRCSH); do echo " ";echo "$$(basename $${file})_"; echo " "; echo ".. _$$(basename $${file}) : $$(basename $${file}).html"; done >> $@
+
+$(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 " " >> $@
+
+$(DIRWWW)/manuals/man/man1/%.1:$(DIRTMP)/%.rst
+	@$(RST2MAN) --input-encoding=ISO-8859-15 --strict \
+	$< $@
+
+$(DIRWWW)/manuals/html/many/%.html:$(DIRTMP)/%.rst
+	@$(RST2HTML) --input-encoding=ISO-8859-15 --strict \
+	$< $@
+
+$(DIRWWW)/manuals/pdf/many/%.pdf : $(DIRTMP)/%.tex
+	@-pdflatex -output-directory $(DIRWWW)/manuals/pdf/many/ $<
+	@-pdflatex -output-directory $(DIRWWW)/manuals/pdf/many/ $<
+
+$(DIRTMP)/%.tex : $(DIRTMP)/%.rst
+	@$(RST2LATEX) $(RST2LATEX_OPTIONS_MANY) --input-encoding=ISO-8859-15 --strict \
+	$< $@
+
+$(DIRTMP)/%.sh.rst : $(DIRSRC)/%.sh 
+	@$(DIRADM)/extract_rst.sh -i $< -l sh -o $@
+
+SPECIAL_RST : $(DIRTMP)/makenemo.rst $(DIRTMP)/maketools.rst
+
+$(DIRTMP)/makenemo.rst : $(DIRSRC)/../../CONFIG/makenemo
+	@$(DIRADM)/extract_rst.sh -i $< -l sh -o $@
+$(DIRTMP)/maketools.rst : $(DIRSRC)/../maketools
+	@$(DIRADM)/extract_rst.sh -i $< -l sh -o $@
+
+
+$(DIRDESIGN)/images/%.png : $(DIRDESIGN)/images/%.svg
+	@convert $< $@
+
+$(DIRDESIGN)/images/%.svg : $(DIRDESIGN)/%.dot
+	@dot -Tsvg -o $@ $<
+
+$(DIRDESIGN)/$(PRODUCT)_fulldependencies.dot : \
+./makefile
+	@makeppgraph --graphviz --output=$@
