Author: mvidner Date: Mon Jul 28 10:10:23 2008 New Revision: 49440 URL: http://svn.opensuse.org/viewcvs/yast?rev=49440&view=rev Log: Made it easier to troubleshoot by using a real config file instead of a pipe, pointed out the log (bnc#412465). Modified: trunk/devtools/doxygen/ydoxygen Modified: trunk/devtools/doxygen/ydoxygen URL: http://svn.opensuse.org/viewcvs/yast/trunk/devtools/doxygen/ydoxygen?rev=49440&r1=49439&r2=49440&view=diff ============================================================================== --- trunk/devtools/doxygen/ydoxygen (original) +++ trunk/devtools/doxygen/ydoxygen Mon Jul 28 10:10:23 2008 @@ -33,7 +33,7 @@ =item B<-d>, B<--debug> Show what is substituted. -Write doxygen.log and doxygen.conf. +Keep doxygen.conf. =item I<param>=I<value> @@ -108,15 +108,9 @@ # open input file open (IN, "<$template") or die "Cannot open $template: $!"; -# open output - pipe -# man perlipc -$SIG{PIPE} = 'IGNORE'; -my $run_doxygen = "|doxygen -"; -if ($debug) -{ - $run_doxygen = "|tee doxygen.conf ". $run_doxygen; -} -open (OUT, $run_doxygen) or die "can't fork doxygen: $!"; +# open output +my $conf = "doxygen.conf"; +open (OUT, ">$conf") or die "Cannot open $conf for writing: $!"; # $_ holds the whole definition of a parameter # that may be split over multiple lines @@ -153,9 +147,28 @@ $_ = "$param$ws= $value"; } - print OUT "$_\n" or die "can't write to doxygen: $!"; + print OUT "$_\n" or die "Cannot write to $conf: $!"; $_ = ""; # this line does not continue } -close(OUT) or die "can't close pipe to doxygen: status=$?"; +close(OUT) or die "Cannot close $conf: $!"; close(IN); + +# config is ready, run it: +my $doxygen = "doxygen"; +print "$doxygen $conf\n"; +system($doxygen, $conf); + +if ($? == -1) { + die "Cannot run $doxygen: $!"; +} +elsif ($? & 127) { + my $s = $? & 127; + die "$doxygen died with signal $s"; +} +elsif ($? != 0) { + my $e = $? >> 8; + die "$doxygen exited with value $e, see doxygen.log"; +} + +unlink $conf unless $debug; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org