20 if {[
catch {
package require cmdline} ERROR]} {
21 puts "$ERROR\n If you are running this script on tclsh, you can fix this by installing 'tcllib'"
27 set usage "USAGE: $::argv0"
29 set tcl_path [
file dirname [
info script]]
30 set repo_path [
file normalize $tcl_path/../../..]
35 if {[
catch {
array set options [
cmdline::getoptions ::argv $parameters $usage]}] || $::argc != 0 } {
41 lassign [
GetVer .] version commit
43 Msg Info "Creating doxygen documentation for tag $version"
47 set doxygen_conf "./doxygen/doxygen.conf"
48 if {[
file exists $doxygen_conf] == 0 } {
50 set doxygen_conf "./Hog/Templates/doxygen.conf"
51 Msg Info "Running doxygen with ./Hog/Templates/doxygen.conf..."
53 Msg Info "Running doxygen with $doxygen_conf..."
58 Msg Warning "It seems that you are using Doxygen version [
Execute doxygen --version]. We recommend Doxygen version 1.9.1 or higher"
60 set conffile [open $doxygen_conf r+]
64 set conf_read [read $conffile]
65 foreach line [
split $conf_read \n] {
66 if {[
string match "#*" [
string trim $line]]} {
67 append buf_tmp "\n$line"
68 }
elseif {[
string first "PROJECT_NUMBER" $line] != -1} {
70 append buf_tmp "\nPROJECT_NUMBER = $version"
72 append buf_tmp "\n$line"
76 append buf_tmp "\nPROJECT_NUMBER = $version"
80 set buf_tmp [
string range $buf_tmp 1 end]
82 set doxygen_conf_out ".doxygen.conf"
83 set outfile [open $doxygen_conf_out w+]
84 puts -nonewline $outfile $buf_tmp
87 Execute doxygen $doxygen_conf_out
88 file delete $doxygen_conf_out
91 Msg Error "Cannot find Doxygen version 1.8.13 or higher"