#
# Alternatively, this file may be used under the terms of Open CASCADE
# commercial license or contractual agreement.
-#
-# Brief: This script compiles OCCT documents from *.md files to HTML pages
+
# =======================================================================
+# This script defines command gendoc compiling OCCT documents
+# from *.md files to HTML pages
+# =======================================================================
+
+# load auxiliary tools
+source [file join [file dirname [info script]] occaux.tcl]
# ======================================
# Common functions
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 {
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"} {
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
set PRODPATH ""
if { [string compare -nocase $generateProductsRefman "YES"] == 0 } {
- set PRODPATH [pwd]
+ set PRODPATH "$::env(PRODROOT)"
}
set ROOTDIR [OCCDoc_GetRootDir $PRODPATH]
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] } {
foreach tk [$module:toolkits] {
foreach pk [split [OCCDoc_GetPackagesList [OCCDoc_Locate $tk $productsPath]]] {
if { [llength $pk] != "{}" } {
- lappend filelist [OCCDoc_GetHeadersList "p" "pubinclude" "$pk" "$productsPath"]
+ lappend filelist [OCCDoc_GetHeadersList "p" "$pk" "$productsPath"]
}
}
}
puts $doxyFile "DOTFILE_DIRS = $outDir/html"
puts $doxyFile "DOT_PATH = $graphvizPath"
- puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetIncDir $productsPath]"
+ puts $doxyFile "INCLUDE_PATH = [OCCDoc_GetSourceDir $productsPath]"
# list of files to generate
set mainpage [OCCDoc_MakeMainPage $outDir $outDir/$name.dox $modules $productsPath]