diff --git a/adm/gendoc.tcl b/adm/gendoc.tcl index 87e02d5154..ec44d44673 100644 --- a/adm/gendoc.tcl +++ b/adm/gendoc.tcl @@ -166,7 +166,7 @@ proc gendoc {args} { if { $DOCTYPE_COMBO_FLAG != 1 } { set DOC_TYPE "REFMAN" set DOCTYPE_COMBO_FLAG 1 - if { [file exists [pwd]/src/VAS/Products.tcl] } { + if { [info exists env(PRODROOT)] && [file exists $::env(PRODROOT)/src/VAS/Products.tcl] } { set GENERATE_PRODUCTS_REFMAN "YES" } } else { @@ -190,13 +190,6 @@ proc gendoc {args} { puts "" } - if { $GENERATE_PRODUCTS_REFMAN == "YES" } { - if { [ lsearch $args_names "m" ] == -1 } { - puts "\nError: Cannot generate Reference Manual for the whole set of OCC Products." - puts "Aborting..." - return -1 - } - } } elseif {$arg_n == "v"} { set VERB_MODE "YES" } elseif {$arg_n == "ug"} { @@ -306,9 +299,8 @@ proc gendoc {args} { puts "" # Clean logfiles - set OUTDIR [OCCDoc_GetRootDir]/doc/ - set DOXYLOG $OUTDIR/doxygen_warnings_and_errors.log - set PDFLOG $OUTDIR/pdflatex_warnings_and_errors.log + set DOXYLOG [OCCDoc_GetRootDir]/doc/doxygen_warnings_and_errors.log + set PDFLOG [OCCDoc_GetRootDir]/doc/pdflatex_warnings_and_errors.log file delete -force $PDFLOG file delete -force $DOXYLOG @@ -338,7 +330,7 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s set PRODPATH "" if { [string compare -nocase $generateProductsRefman "YES"] == 0 } { - set PRODPATH [pwd] + set PRODPATH "$::env(PRODROOT)" } set ROOTDIR [OCCDoc_GetRootDir $PRODPATH] @@ -351,7 +343,7 @@ proc OCCDoc_Main {docType {docfiles {}} {modules {}} generatorMode verboseMode s set HTMLDIR $OUTDIR/overview/html set LATEXDIR $OUTDIR/overview/latex set DOXYFILE $OUTDIR/OCCT.cfg - + # Create or cleanup the output folders if { [string compare -nocase $generateProductsRefman "YES"] != 0 } { if { ![file exists $OUTDIR] } { diff --git a/adm/occaux.tcl b/adm/occaux.tcl index f732f0106b..ed3aaadcbc 100644 --- a/adm/occaux.tcl +++ b/adm/occaux.tcl @@ -531,6 +531,7 @@ proc OCCDoc_GetModulesList { {theProductsDir ""} } { source "[OCCDoc_GetSourceDir $theProductsDir]/VAS/Products.tcl" # load a command from this file set modules [VAS:Products] + set modules [lsearch -not -all -inline $modules "VAS"] } return $modules @@ -540,7 +541,7 @@ proc OCCDoc_GetModulesList { {theProductsDir ""} } { proc OCCDoc_GetHeadersList { theDesiredContent thePackageName {theProductsDir ""} } { # Get list of header files with path - set files_list [split [glob -nocomplain -type f -directory "[OCCDoc_GetIncDir $theProductsDir]" "${thePackageName}.hxx" "${thePackageName}_*.hxx"]] + set files_list [split [glob -nocomplain -type f -directory "[OCCDoc_GetSourceDir $theProductsDir]/$thePackageName" "${thePackageName}.hxx" "${thePackageName}_*.hxx"]] # Get content according to desired type ('p' for path and 'f' for filenames only) if { $theDesiredContent == "p" } { diff --git a/adm/templates/env.bat.in b/adm/templates/env.bat.in index 2f6b92c02c..6c9f154738 100644 --- a/adm/templates/env.bat.in +++ b/adm/templates/env.bat.in @@ -19,6 +19,7 @@ if exist "%~dp0custom.bat" ( ) if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%" +set "PRODROOT=" set "ORIGIN_PATH=%PATH%" diff --git a/adm/templates/env.build.bat.in b/adm/templates/env.build.bat.in index bee877308f..77de2fd32f 100644 --- a/adm/templates/env.build.bat.in +++ b/adm/templates/env.build.bat.in @@ -21,6 +21,7 @@ if exist "%~dp0custom.bat" ( ) if ["%CASROOT%"] == [""] set "CASROOT=%SCRIPTROOT%" +set "PRODROOT=" set "ORIGIN_PATH=%PATH%"