- implementing the support for adding the QE version to the header of

INPUT_*.html|txt files; this is done by calling the helpdoc with the
  --version option

- printing the error message if the execution of xsltproc fails




git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12747 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
kokalj 2016-08-16 14:28:57 +00:00
parent 535580646f
commit ab27716fd7
2 changed files with 20 additions and 6 deletions

View File

@ -120,18 +120,29 @@ proc ::helpdoc::writeOutputs {} {
variable rbd_info
#$tree destroy
# TXT
puts $fid(txt) "This file has been created by helpdoc utility on [clock format [clock seconds]]"
puts ""
foreach fmt [array names fid] {
puts "File $head.$fmt has been written."
close $fid($fmt)
}
flush stdout
# run XSLTPROC
if { $xsltproc != "" } {
catch [list exec $xsltproc --stringparam current-date [clock format [clock seconds]] $head.xml > $head.html]
puts "File $head.html has been written."
puts -nonewline " Executing: $xsltproc --stringparam version \"$::opt(version)\" --stringparam current-date \"[clock format [clock seconds]]\" $head.xml > $head.html ..."
if { [catch [list exec $xsltproc --stringparam version "$::opt(version)" --stringparam current-date [clock format [clock seconds]] $head.xml > $head.html] errorMsg] } {
puts " \[Error\]"
puts "Execution of xsltproc failed with error message:\n\n$errorMsg"
} else {
puts " \[OK\]"
puts "File $head.html has been written."
}
}
# run ROBODOC

View File

@ -5,12 +5,15 @@ set var_chars_indent [expr 15 + 5]
switch -exact -- $tag {
input_description {
input_description {
if { [info exists ::opt(version)] && $::opt(version) ne {} } {
set arr(version) "(version: $::opt(version))"
}
printfNormalize [subst {
------------------------------------------------------------------------
INPUT FILE DESCRIPTION
Program: [arr program] / [arr package] / [arr distribution]
Program: [arr program] / [arr package] / [arr distribution] [arr version]
------------------------------------------------------------------------
}]
printf \n