Changeset 415


Ignore:
Timestamp:
11/18/09 12:18:52 (15 years ago)
Author:
pinsard
Message:

documentations tools improvements

Location:
trunk/SRC/Documentation/xmldoc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Documentation/xmldoc/docompileall.sh

    r412 r415  
    1212# :: 
    1313# 
    14 # $ docompileall.sh -i indir 
     14# $ docompileall.sh -i indir -idl_dir idl_dir 
    1515# 
    1616# DESCRIPTION 
    1717# =========== 
    1818# 
    19 # ``docompileall.sh`` scans indir to find .pro files  which define PRO or FUNCTION. 
     19# ``docompileall.sh`` scans indir to find .pro files which define PRO or FUNCTION. 
    2020# 
    2121# -i directory input 
     
    3232# 
    3333# for example, if you work at LOCEAN and work with default SAXO, 
    34 # SAXO_DIR=/usr/home/smasson/SAXO_DIR/. 
     34# SAXO_DIR=/usr/home/smasson/SAXO_DIR. 
    3535# 
    3636# For working in progress, you should checkout SAXO on a personnal 
    3737# directory and set SAXO_DIR to the working space. 
    3838# 
    39 # example for me : SAXO_DIR=${HOME}/SAXO_DIR_ws/ 
     39# example for me : SAXO_DIR=${HOME}/SAXO_DIR_ws 
    4040 
    4141# EXAMPLES 
     
    4646# :: 
    4747# 
    48 # $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i ${HOME}/SAXO_DIR_ws/ 
     48# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i ${HOME}/SAXO_DIR_ws/SRC/ -idl_dir /usr/local_linux/idl/idl_6.4/idl/ 
    4949# 
    5050# For VARAMMA in working space /usr/home/fplod/incas/varamma/varamma_ws/ 
     
    5252# :: 
    5353# 
    54 # $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i /usr/home/fplod/incas/varamma/varamma_ws/ 
     54# $ ${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/ 
    5555# 
    5656# 
    5757# For POST_IT in working space /usr/home/fplod/incas/post_it/post_it_ws/ 
    58 # 
    59 # :: 
    60 # 
    61 # $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i /usr/home/fplod/incas/post_it/post_it_ws/ 
     58# with IDL 6.4 
     59# 
     60# :: 
     61# 
     62# $ ${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/ 
     63# 
     64# For POST_IT in working space /usr/home/fplod/incas/post_it/post_it_ws/ 
     65# with IDL 7.0 
     66# 
     67# :: 
     68# 
     69# $ ${SAXO_DIR}/SRC/Documentation/xmldoc/docompileall.sh -i /usr/home/fplod/incas/post_it/post_it_ws/ -idl_dir /usr/local_linux/idl/idl70/ 
    6270# 
    6371# TODO 
     
    6876# better handling on DEMO mode (ie information cant check) 
    6977#        
     78# be less sensible to multiple / and trailing / in indir and SAXO_DIR when 
     79# compare 
     80# 
     81# add a parameter excludedir to exclude unwanted files like ./tools/ in POST_IT.# 
    7082# EVOLUTIONS 
    7183# ========== 
    7284# 
    7385# $Id$ 
     86# 
     87# - fplod 20091116T142010Z aedon.locean-ipsl.upmc.fr (Darwin) 
     88#    
     89#   * remove dup if only SAXO 
     90# 
     91# - fplod 20091113T151637Z aedon.locean-ipsl.upmc.fr (Darwin) 
     92# 
     93#   * idl_dir in parameter 
    7494# 
    7595# - fplod 20091110T134500Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    93113log=/tmp/$(basename ${command} .sh).log.${log_date} 
    94114# 
    95 usage=" Usage : ${command} -i indir" 
    96 # 
    97 minargcount=0 #++ 
     115usage=" Usage : ${command} -i indir -idl_dir idl_dir" 
     116# 
     117minargcount=4 #++ 
    98118#echo " narg ${#}" 
    99119if [ ${#} -lt ${minargcount} ] 
     
    106126# default 
    107127# default IDL command and directory 
    108 idl_command=$(which idl) 
    109 idl_dir=$(dirname ${idl_command}) 
     128#idl_dir=/usr/local_linux/idl/idl64/ # overriding idl_dir for test ++ 
    110129# 
    111130# default indir directory 
     
    120139 shift 
    121140 ;; 
     141 -idl_dir) 
     142 idl_dir=${2} 
     143 shift 
     144 ;; 
    122145 -h) 
    123146 echo "${usage}" 
     
    141164fi 
    142165# 
     166# ++ test si IDL (car GDL inutilisable) 
     167application=${idl_dir}/bin/idl 
     168# 
     169# start to write IDL commands file 
    143170cat <<EOF > /tmp/docompileall${$}.pro 
    144 ; test DEMO mode 
    145 demo_on=LMGR(/DEMO) 
    146 IF demo_on EQ 1 THEN BEGIN 
    147  exit  
    148 ENDIF 
    149171.reset_session 
    150172; 
     173; Add SAXO sources to IDL path 
    151174!path = expand_path('+' + '${SAXO_DIR}/SRC/') + ':' + expand_path('+' + !dir) 
     175EOF 
     176# 
     177# if indir is equal to SAXO_DIR/SRC there is no need to add it in IDL path 
     178if [ "${indir}" != "${SAXO_DIR}/SRC/" ] 
     179then 
     180 cat <<EOF >> /tmp/docompileall${$}.pro 
     181!path = expand_path('+' + '${indir}') + ':' + !path 
     182EOF 
     183fi 
     184# 
     185cat <<EOF >> /tmp/docompileall${$}.pro 
    152186resolve_all, resolve_either='def_myuniquetmpdir', skip_routines = ['xxx2ps','trends', 'label_gmt'] 
    153187resolve_all, resolve_either = 'find', skip_routines = ['xxx2ps','trends', 'label_gmt'] 
     
    168202EOF 
    169203# 
    170 more /tmp/docompileall${$}.pro 
    171 read a 
    172204# find .pro files 
    173205list_files=$(find ${indir} -name "*.pro" | grep -iv label_gmt | grep -iv report) 
     
    194226echo "exit" >> /tmp/docompileall${$}.pro 
    195227# 
    196 IDL_STARTUP=/tmp/docompileall${$}.pro 
    197 ${idl_command} &> /tmp/docompileallerr_${$} 
     228#more /tmp/docompileall${$}.pro  
     229export IDL_STARTUP=/tmp/docompileall${$}.pro 
     230${application} &> /tmp/docompileallerr_${$} 
    198231grep -i "error" /tmp/docompileallerr_${$} 
    199232# grep -q "Compilation error(s)" /tmp/docompileallerr_${$} 
  • trunk/SRC/Documentation/xmldoc/doidldoc.sh

    r413 r415  
    2020# -t title 
    2121# -o directory output 
     22# -idl_dir idl_dir 
    2223# -idldoc_version idldoc_version 
    2324# -idldoc_dir idldoc_dir 
     
    6364# $ ${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/ 
    6465# 
     66# To produce GEOMAG HTML outputs : 
     67# :: 
     68# 
     69# $ cd /usr/home/fplod/incas/geomag/geomag_ws/ 
     70# $ ${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/ 
     71# 
    6572# To produce VARAMMA HTML outputs : 
    6673# :: 
     
    7380# 
    7481# $ cd /usr/home/fplod/incas/post_it/post_it_ws/ 
    75 # $ ${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/ 
     82# $ ${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/ 
    7683# 
    7784 
     
    93100# 
    94101# $Id$ 
     102# 
     103# - fplod 20091112T101526Z zeus.locean-ipsl.upmc.fr (Linux) 
     104# 
     105#   * replace mv by cp -r because mv may no works accross filesystems 
     106#   * add chek on outdir 
    95107# 
    96108# - fplod 20091112T084225Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    248260set -u 
    249261# 
     262# check for outir 
     263if [ ! -d ${outdir} ] 
     264then 
     265 echo "eee : outdir (${outdir}) not found" 
     266 exit 1 
     267fi 
     268# check for permission access on outdir 
     269if [ ! -x ${outdir} ] 
     270then 
     271 echo " eee : ${outdir} not reachable" 
     272 exit 1 
     273 fi 
     274# 
     275# check for write permission on outdir 
     276if [ ! -w ${outdir} ] 
     277then 
     278 echo " eee : ${outdir} not writable" 
     279 exit 1 
     280fi 
     281# 
    250282# ++ test si IDL (car GDL inutilisable) 
    251 application=idl 
    252 # 
    253 # memorize current directory 
    254 memopwd=$(pwd) # should be <working space>/SRC/Documentation/xmldoc 
     283application=${idl_dir}/bin/idl 
    255284# 
    256285# build a IDL file to launch idldoc 
     
    315344 # build the .pro file name 
    316345 bfile=$(basename ${file_html} .html) 
    317  # retrieve the path of html file relative to memopwd (so relative to 
    318  # output). This path will be used in "Source" link. 
     346 # retrieve the path of html file relative to output.  
     347 # This path will be used in "Source" link. 
    319348 nblev2=$(dirname ${file_html} | sed -e "s@/\$@@" | awk -F "/" '{print NF}') 
    320349 difflev=$((${nblev2} - ${nblev1})) 
     
    413442 ;; 
    414443esac 
    415 more ${pro} 
    416 read a 
    417444# launch IDL with the file built above 
    418445IDL_STARTUP=${pro};${idl_dir}/bin/idl 
     
    464491 mv ${file_html}_modify ${file_html} 
    465492done 
     493# 
    466494# replace <pro>ginette</pro> by a sequence like 
    467495# <a href="./ginette.html">ginette</a> 
     
    516544fi 
    517545# copy of temporary outputs on final directory 
    518 # ++ if transform 
    519 mv ${outputtmp} ${outdir} 
     546cp -r ${outputtmp}/* ${outdir} 
    520547echo "iii : look at ${outdir}/index.html" 
    521548echo "iii : you can see idldoc log file in ${idldoc_log}" 
  • trunk/SRC/Documentation/xmldoc/pro2href.sh

    r262 r415  
    11#! /bin/sh 
    22# 
    3 # module : 
     3# DESCRIPTION 
     4# ===========  
     5# 
    46# replace <element>ginette</element> by a sequence like with element given 
    57# in argument <a href="./ginette.html">ginette</a> 
     
    1012# see call in savesaxo.sh 
    1113# 
    12 # update : 
     14# EVOLUTIONS 
     15# ========== 
    1316# $Id$ 
     17# 
    1418# fplod 2007-08-21T09:06:58Z aedon.locean-ipsl.upmc.fr (Darwin) 
    1519# add -e (element) parameter to define element syntax like 
     
    3741set -o posix 
    3842command=$(basename ${0} .sh) 
    39 log_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") 
     43log_date=$(date -u +"%Y%m%dT%H%M%SZ") 
    4044log=/tmp/${command}.${log_date} 
    4145# 
  • trunk/SRC/Documentation/xmldoc/savesaxo.sh

    r413 r415  
    1111# 
    1212# $Id$ 
     13# 
     14# - fplod 20091112T101551Z zeus.locean-ipsl.upmc.fr (Linux) 
     15# 
     16#   * add check on doidldoc.sh status 
    1317# 
    1418# - fplod 20091112T091437Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    270274if  [ ${doidldoc} -eq 1 ] 
    271275then 
    272 # 
     276    # 
    273277    # build HTML idldoc outputs 
    274278    ${SAXO_DIR}/SRC/Documentation/xmldoc/doidldoc.sh \ 
     
    276280    -o ../idldoc_html_output/  
    277281    -idl_dir ${idl_dir} 
    278 # 
     282    doidldoc_html=${?} 
     283    if [ ${doidldoc_html} -ne 0 ] 
     284    then 
     285     echo "eee : pb with doidldoc html" 
     286     exit 1 
     287    fi 
     288    # 
    279289    # build a idl file to launch idldoc 
    280290    output=../idldoc_assistant_output/ 
Note: See TracChangeset for help on using the changeset viewer.