Index: trunk/SRC/Documentation/xmldoc/doidldoc.sh
===================================================================
--- trunk/SRC/Documentation/xmldoc/doidldoc.sh	(revision 412)
+++ trunk/SRC/Documentation/xmldoc/doidldoc.sh	(revision 413)
@@ -1,4 +1,3 @@
 #! /bin/sh
-#
 #+
 #
@@ -11,5 +10,5 @@
 # ========
 #
-# ``doidldoc.sh -i indir -t title -o outdir -idldoc_version idldoc_version -idldoc_dir idldoc_dir``
+# ``doidldoc.sh -i indir -t title -o outdir -idl_dir idl_dir -idldoc_version idldoc_version -idldoc_dir idldoc_dir``
 #
 # DESCRIPTION
@@ -61,6 +60,6 @@
 # ::
 #
-# $ cd SAXO_ws/SRC/Documentation/xmldoc/
-# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i ../.. -t "SAXO Documentation" -o ./idldoc_html_output/
+# $ cd SAXO_DIR_ws/SRC/Documentation/xmldoc/
+# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i ../.. -t "SAXO Documentation" -o ./idldoc_html_output/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/
 #
 # To produce VARAMMA HTML outputs :
@@ -68,27 +67,16 @@
 #
 # $ cd /usr/home/fplod/incas/varamma/varamma_ws/
-# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i . -t "VARAMMA Documentation" -o /tmp/idldoc_html_output/
-#
+# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i . -t "VARAMMA Documentation" -o /tmp/idldoc_html_output/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/
+#
+# To produce POST_IT HTML outputs :
+# ::
+#
+# $ cd /usr/home/fplod/incas/post_it/post_it_ws/
+# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i . -t "POST_IT/Documentation" -o /tmp/idldoc_html_output/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/
+#
+
 # TODO
 # ====
 #
-# ++ pb PATH introduire SAXO_PATH
-# can be solved with:
-# ::
-#
-# $ export PATH=${HOME}/SAXO_DIR/SRC/Documentation/xmldoc/:${PATH}
-#
-# ++ pb avec IDL_DIR pas tjs positionné
-# can be solved for linux with
-# ::
-#
-# $ export IDL_DIR=/usr/local_linux/idl/
-#
-# or for MacOSX with
-# ::
-#
-# $ export IDL_DIR=/usr/local_macosx/idl//idl_6.2/idl_6.2/
-#
-#
 # ++ choix de la version de idldoc et consequences sur assistant
 #
@@ -105,4 +93,10 @@
 #
 # $Id$
+#
+# - fplod 20091112T084225Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * bug fix if indir is set to '.'
+#   * idl_dir in parameter
+#   * path of local commands
 #
 # - fplod 20091110T151839Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -196,8 +190,9 @@
 idldoc_version="2.0"
 unset command_dir
-
+# default IDL command and directory
+#idl_dir=/usr/local_linux/idl/idl64/  # overriding idl_dir for test ++
 #idldoc_dir="/usr/home/fplod/src/idldoc-3.1.1/" # overriding idldoc_dir for test ++
 #
-minargcount=4
+minargcount=6
 if [ ${#} -lt ${minargcount} ]
 then
@@ -213,4 +208,9 @@
  indir=${2}
  shift
+ case ${indir} in
+ .)
+  indir=$(pwd)
+  ;;
+ esac
  ;;
  -t)
@@ -228,4 +228,8 @@
  -idldoc_version)
  idldoc_version=${2}
+ shift
+ ;;
+ -idl_dir)
+ idl_dir=${2}
  shift
  ;;
@@ -283,4 +287,5 @@
  ;;
 esac
+#
 # launch IDL with the file built above
 export IDL_STARTUP=${pro}
@@ -366,5 +371,5 @@
 # replace <pro>ginette</pro> by a sequence like
 # <a href="./ginette.html">ginette</a>
-pro2href.sh -i ${outputtmp} -r ${outputtmp} -e pro
+${SAXO_DIR}/SRC/Documentation/xmldoc/pro2href.sh -i ${outputtmp} -r ${outputtmp} -e pro
 status=${?}
 if [ ${status} -ne 0 ]
@@ -375,5 +380,5 @@
 # replace <proidl>ginette</proidl> by a sequence like
 # <a href="./ginette.html">ginette</a>
-pro2href.sh -i ${outputtmp} -r ${IDL_DIR}/help/online_help -e proidl
+${SAXO_DIR}/SRC/Documentation/xmldoc/pro2href.sh -i ${outputtmp} -r ${idl_dir}/help/online_help -e proidl
 status=${?}
 if [ ${status} -ne 0 ]
@@ -411,5 +416,5 @@
 read a
 # launch IDL with the file built above
-IDL_STARTUP=${pro};${IDL_DIR}/bin/idl
+IDL_STARTUP=${pro};${idl_dir}/bin/idl
 /bin/rm ${pro}
 # In order to do not have to many revision in svn, we modify some
@@ -461,5 +466,5 @@
 # replace <pro>ginette</pro> by a sequence like
 # <a href="./ginette.html">ginette</a>
-pro2href.sh -i ${outputtmp} -r ${outputtmp} -e pro
+${SAXO_DIR}/SRC/Documentation/xmldoc/pro2href.sh -i ${outputtmp} -r ${outputtmp} -e pro
 status=${?}
 if [ ${status} -ne 0 ]
@@ -470,5 +475,5 @@
 # replace <proidl>ginette</proidl> by a sequence like
 # <a href="./ginette.html">ginette</a>
-pro2href.sh -i ${outputtmp} -r ${IDL_DIR}/help/online_help -e proidl
+${SAXO_DIR}/SRC/Documentation/xmldoc/pro2href.sh -i ${outputtmp} -r ${idl_dir}/help/online_help -e proidl
 status=${?}
 if [ ${status} -ne 0 ]
@@ -503,5 +508,5 @@
  if [ ${nhtml} -ne 2 ]
 	 then
-	 echo "ERROR there is not 2 $( basename ${i} .pro ).html files"
+	 echo "ERROR there is no 2 $( basename ${i} .pro ).html files"
 	 find ../.. -name $( basename ${i} .pro ).html
 	 echo
