21 if {[
catch {
package require cmdline} ERROR]} {
22 puts "$ERROR\n If you are running this script on tclsh, you can fix this by installing 'tcllib'"
28 set usage "USAGE: $::argv0"
30 source ./Hog/Tcl/hog.tcl
31 set tcl_path [
file dirname [
info script]]
32 set repo_path [
file normalize $tcl_path/../../..]
36 if {[
catch {
array set options [
cmdline::getoptions ::argv $parameters $usage]}] || $::argc != 0} {
42 lassign [
GetVer .] version commit
44 Msg Info "Creating doxygen documentation for tag $version"
48 set doxygen_conf "./doxygen/doxygen.conf"
49 if {[
file exists $doxygen_conf] == 0} {
51 set doxygen_conf "./Hog/Templates/doxygen.conf"
52 Msg Info "Running doxygen with ./Hog/Templates/doxygen.conf..."
54 Msg Info "Running doxygen with $doxygen_conf..."
59 Msg Warning "It seems that you are using Doxygen version [
Execute doxygen --version]. We recommend Doxygen version 1.9.1 or higher"
61 set conffile [open $doxygen_conf r+]
65 set conf_read [read $conffile]
66 foreach line [
split $conf_read \n] {
67 if {[
string match "#*" [
string trim $line]]} {
68 append buf_tmp "\n$line"
69 }
elseif {[
string first "PROJECT_NUMBER" $line] != -1} {
71 append buf_tmp "\nPROJECT_NUMBER = $version"
73 append buf_tmp "\n$line"
77 append buf_tmp "\nPROJECT_NUMBER = $version"
81 set buf_tmp [
string range $buf_tmp 1 end]
83 set doxygen_conf_out ".doxygen.conf"
84 set outfile [open $doxygen_conf_out w+]
85 puts -nonewline $outfile $buf_tmp
88 Execute doxygen $doxygen_conf_out
89 file delete $doxygen_conf_out
92 Msg Error "Cannot find Doxygen version 1.8.13 or higher"