Index: trunk/SRC/Documentation/xmldoc/docompileall.sh
===================================================================
--- trunk/SRC/Documentation/xmldoc/docompileall.sh	(revision 414)
+++ trunk/SRC/Documentation/xmldoc/docompileall.sh	(revision 415)
@@ -12,10 +12,10 @@
 # ::
 #
-# $ docompileall.sh -i indir
+# $ docompileall.sh -i indir -idl_dir idl_dir
 #
 # DESCRIPTION
 # ===========
 #
-# ``docompileall.sh`` scans indir to find .pro files  which define PRO or FUNCTION.
+# ``docompileall.sh`` scans indir to find .pro files which define PRO or FUNCTION.
 #
 # -i directory input
@@ -32,10 +32,10 @@
 #
 # for example, if you work at LOCEAN and work with default SAXO,
-# SAXO_DIR=/usr/home/smasson/SAXO_DIR/.
+# SAXO_DIR=/usr/home/smasson/SAXO_DIR.
 #
 # For working in progress, you should checkout SAXO on a personnal
 # directory and set SAXO_DIR to the working space.
 #
-# example for me : SAXO_DIR=${HOME}/SAXO_DIR_ws/
+# example for me : SAXO_DIR=${HOME}/SAXO_DIR_ws
 
 # EXAMPLES
@@ -46,5 +46,5 @@
 # ::
 #
-# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i ${HOME}/SAXO_DIR_ws/
+# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i ${HOME}/SAXO_DIR_ws/SRC/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/
 #
 # For VARAMMA in working space /usr/home/fplod/incas/varamma/varamma_ws/
@@ -52,12 +52,20 @@
 # ::
 #
-# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i /usr/home/fplod/incas/varamma/varamma_ws/
+# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i /usr/home/fplod/incas/varamma/varamma_ws/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/
 #
 #
 # For POST_IT in working space /usr/home/fplod/incas/post_it/post_it_ws/
-#
-# ::
-#
-# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i /usr/home/fplod/incas/post_it/post_it_ws/
+# with IDL 6.4
+#
+# ::
+#
+# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i /usr/home/fplod/incas/post_it/post_it_ws/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/
+#
+# For POST_IT in working space /usr/home/fplod/incas/post_it/post_it_ws/
+# with IDL 7.0
+#
+# ::
+#
+# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i /usr/home/fplod/incas/post_it/post_it_ws/ -idl_dir /usr/local_linux/idl/idl70/
 #
 # TODO
@@ -68,8 +76,20 @@
 # better handling on DEMO mode (ie information cant check)
 #	
+# be less sensible to multiple / and trailing / in indir and SAXO_DIR when
+# compare
+#
+# add a parameter excludedir to exclude unwanted files like ./tools/ in POST_IT.#
 # EVOLUTIONS
 # ==========
 #
 # $Id$
+#
+# - fplod 20091116T142010Z aedon.locean-ipsl.upmc.fr (Darwin)
+#   
+#   * remove dup if only SAXO
+#
+# - fplod 20091113T151637Z aedon.locean-ipsl.upmc.fr (Darwin)
+#
+#   * idl_dir in parameter
 #
 # - fplod 20091110T134500Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -93,7 +113,7 @@
 log=/tmp/$(basename ${command} .sh).log.${log_date}
 #
-usage=" Usage : ${command} -i indir"
-#
-minargcount=0 #++
+usage=" Usage : ${command} -i indir -idl_dir idl_dir"
+#
+minargcount=4 #++
 #echo " narg ${#}"
 if [ ${#} -lt ${minargcount} ]
@@ -106,6 +126,5 @@
 # default
 # default IDL command and directory
-idl_command=$(which idl)
-idl_dir=$(dirname ${idl_command})
+#idl_dir=/usr/local_linux/idl/idl64/ # overriding idl_dir for test ++
 #
 # default indir directory
@@ -120,4 +139,8 @@
  shift
  ;;
+ -idl_dir)
+ idl_dir=${2}
+ shift
+ ;;
  -h)
  echo "${usage}"
@@ -141,13 +164,24 @@
 fi
 #
+# ++ test si IDL (car GDL inutilisable)
+application=${idl_dir}/bin/idl
+#
+# start to write IDL commands file
 cat <<EOF > /tmp/docompileall${$}.pro
-; test DEMO mode
-demo_on=LMGR(/DEMO)
-IF demo_on EQ 1 THEN BEGIN
- exit 
-ENDIF
 .reset_session
 ;
+; Add SAXO sources to IDL path
 !path = expand_path('+' + '${SAXO_DIR}/SRC/') + ':' + expand_path('+' + !dir)
+EOF
+#
+# if indir is equal to SAXO_DIR/SRC there is no need to add it in IDL path
+if [ "${indir}" != "${SAXO_DIR}/SRC/" ]
+then
+ cat <<EOF >> /tmp/docompileall${$}.pro
+!path = expand_path('+' + '${indir}') + ':' + !path
+EOF
+fi
+#
+cat <<EOF >> /tmp/docompileall${$}.pro
 resolve_all, resolve_either='def_myuniquetmpdir', skip_routines = ['xxx2ps','trends', 'label_gmt']
 resolve_all, resolve_either = 'find', skip_routines = ['xxx2ps','trends', 'label_gmt']
@@ -168,6 +202,4 @@
 EOF
 #
-more /tmp/docompileall${$}.pro
-read a
 # find .pro files
 list_files=$(find ${indir} -name "*.pro" | grep -iv label_gmt | grep -iv report)
@@ -194,6 +226,7 @@
 echo "exit" >> /tmp/docompileall${$}.pro
 #
-IDL_STARTUP=/tmp/docompileall${$}.pro
-${idl_command} &> /tmp/docompileallerr_${$}
+#more /tmp/docompileall${$}.pro 
+export IDL_STARTUP=/tmp/docompileall${$}.pro
+${application} &> /tmp/docompileallerr_${$}
 grep -i "error" /tmp/docompileallerr_${$}
 # grep -q "Compilation error(s)" /tmp/docompileallerr_${$}
Index: trunk/SRC/Documentation/xmldoc/doidldoc.sh
===================================================================
--- trunk/SRC/Documentation/xmldoc/doidldoc.sh	(revision 414)
+++ trunk/SRC/Documentation/xmldoc/doidldoc.sh	(revision 415)
@@ -20,4 +20,5 @@
 # -t title
 # -o directory output
+# -idl_dir idl_dir
 # -idldoc_version idldoc_version
 # -idldoc_dir idldoc_dir
@@ -63,4 +64,10 @@
 # $ ${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 GEOMAG HTML outputs :
+# ::
+#
+# $ cd /usr/home/fplod/incas/geomag/geomag_ws/
+# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i . -t "GEOMAG Documentation" -o /usr/work/incas/${LOGNAME}/geomag/idldoc_html_output/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/
+#
 # To produce VARAMMA HTML outputs :
 # ::
@@ -73,5 +80,5 @@
 #
 # $ 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/
+# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh -i . -t "POST_IT/Documentation" -o /usr/work/incas/${LOGNAME}/idldoc_html_output/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/
 #
 
@@ -93,4 +100,9 @@
 #
 # $Id$
+#
+# - fplod 20091112T101526Z zeus.locean-ipsl.upmc.fr (Linux)
+#
+#   * replace mv by cp -r because mv may no works accross filesystems
+#   * add chek on outdir
 #
 # - fplod 20091112T084225Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -248,9 +260,26 @@
 set -u
 #
+# check for outir
+if [ ! -d ${outdir} ]
+then
+ echo "eee : outdir (${outdir}) not found"
+ exit 1
+fi
+# check for permission access on outdir
+if [ ! -x ${outdir} ]
+then
+ echo " eee : ${outdir} not reachable"
+ exit 1
+ fi
+#
+# check for write permission on outdir
+if [ ! -w ${outdir} ]
+then
+ echo " eee : ${outdir} not writable"
+ exit 1
+fi
+#
 # ++ test si IDL (car GDL inutilisable)
-application=idl
-#
-# memorize current directory
-memopwd=$(pwd) # should be <working space>/SRC/Documentation/xmldoc
+application=${idl_dir}/bin/idl
 #
 # build a IDL file to launch idldoc
@@ -315,6 +344,6 @@
  # build the .pro file name
  bfile=$(basename ${file_html} .html)
- # retrieve the path of html file relative to memopwd (so relative to
- # output). This path will be used in "Source" link.
+ # retrieve the path of html file relative to output. 
+ # This path will be used in "Source" link.
  nblev2=$(dirname ${file_html} | sed -e "s@/\$@@" | awk -F "/" '{print NF}')
  difflev=$((${nblev2} - ${nblev1}))
@@ -413,6 +442,4 @@
  ;;
 esac
-more ${pro}
-read a
 # launch IDL with the file built above
 IDL_STARTUP=${pro};${idl_dir}/bin/idl
@@ -464,4 +491,5 @@
  mv ${file_html}_modify ${file_html}
 done
+#
 # replace <pro>ginette</pro> by a sequence like
 # <a href="./ginette.html">ginette</a>
@@ -516,6 +544,5 @@
 fi
 # copy of temporary outputs on final directory
-# ++ if transform
-mv ${outputtmp} ${outdir}
+cp -r ${outputtmp}/* ${outdir}
 echo "iii : look at ${outdir}/index.html"
 echo "iii : you can see idldoc log file in ${idldoc_log}"
Index: trunk/SRC/Documentation/xmldoc/pro2href.sh
===================================================================
--- trunk/SRC/Documentation/xmldoc/pro2href.sh	(revision 414)
+++ trunk/SRC/Documentation/xmldoc/pro2href.sh	(revision 415)
@@ -1,5 +1,7 @@
 #! /bin/sh
 #
-# module :
+# DESCRIPTION
+# =========== 
+#
 # replace <element>ginette</element> by a sequence like with element given
 # in argument <a href="./ginette.html">ginette</a>
@@ -10,6 +12,8 @@
 # see call in savesaxo.sh
 #
-# update :
+# EVOLUTIONS
+# ==========
 # $Id$
+#
 # fplod 2007-08-21T09:06:58Z aedon.locean-ipsl.upmc.fr (Darwin)
 # add -e (element) parameter to define element syntax like
@@ -37,5 +41,5 @@
 set -o posix
 command=$(basename ${0} .sh)
-log_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
+log_date=$(date -u +"%Y%m%dT%H%M%SZ")
 log=/tmp/${command}.${log_date}
 #
Index: trunk/SRC/Documentation/xmldoc/savesaxo.sh
===================================================================
--- trunk/SRC/Documentation/xmldoc/savesaxo.sh	(revision 414)
+++ trunk/SRC/Documentation/xmldoc/savesaxo.sh	(revision 415)
@@ -11,4 +11,8 @@
 #
 # $Id$
+#
+# - fplod 20091112T101551Z zeus.locean-ipsl.upmc.fr (Linux)
+#
+#   * add check on doidldoc.sh status
 #
 # - fplod 20091112T091437Z aedon.locean-ipsl.upmc.fr (Darwin)
@@ -270,5 +274,5 @@
 if  [ ${doidldoc} -eq 1 ]
 then
-#
+    #
     # build HTML idldoc outputs
     ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh \
@@ -276,5 +280,11 @@
     -o ../idldoc_html_output/ 
     -idl_dir ${idl_dir}
-#
+    doidldoc_html=${?}
+    if [ ${doidldoc_html} -ne 0 ]
+    then
+     echo "eee : pb with doidldoc html"
+     exit 1
+    fi
+    #
     # build a idl file to launch idldoc
     output=../idldoc_assistant_output/
