From: Miek Gieben Date: Mon, 25 Apr 2005 13:30:31 +0000 (+0000) Subject: should work X-Git-Tag: release-0.50~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=746e886c79afa4464acb4954af7edcf19b577175;p=thirdparty%2Fldns.git should work --- diff --git a/doc/doxyparse.pl b/doc/doxyparse.pl index 207f6c5e..0f9493e9 100755 --- a/doc/doxyparse.pl +++ b/doc/doxyparse.pl @@ -53,8 +53,6 @@ FITNESS FOR A PARTICULAR PURPOSE. \\fBRFC1035\\fR, \\fBRFC4033\\fR, \\fBRFC4034\\fR, \\fBRFC4035\\fR. "; - - getopts("m:",\%options); # if -m manpage file is given process that file # parse the file which tells us what manpages go together @@ -79,6 +77,10 @@ if (defined $options{'m'}) { # 0 - somewhere in the file # 1 - in a doxygen par +# create our pwd +mkdir "man"; +mkdir "man/man$MAN_SECTION"; + $state = 0; while(<>) { chomp; @@ -128,26 +130,30 @@ foreach (keys %manpages) { $a = $manpages{$_}; $filename = @$a[0]; + $filename = "man/man$MAN_SECTION/$filename.$MAN_SECTION"; + print $filename,"\n"; + open (MAN, ">$filename") or die "Can not open $filename"; - print $MAN_HEADER; + print MAN $MAN_HEADER; - print ".SH NAME\n"; - print join ", ", @$a; - print "\n\n"; + print MAN ".SH NAME\n"; + print MAN join ", ", @$a; + print MAN "\n\n"; - print ".SH SYNOPSIS\n"; - print "#include \n"; - print ".PP\n"; + print MAN ".SH SYNOPSIS\n"; + print MAN "#include \n"; + print MAN ".PP\n"; foreach $function (@$a) { - print $return{$function}, " ", $function; - print "(", $api{$function},");\n"; - print ".PP\n"; + print MAN $return{$function}, " ", $function; + print MAN "(", $api{$function},");\n"; + print MAN ".PP\n"; } - print "\n.SH DESCRIPTION\n"; + print MAN "\n.SH DESCRIPTION\n"; foreach $function (@$a) { - print "\\fI", $function, "\\fR", ":"; - print $description{$function}; - print "\n.PP\n"; + print MAN "\\fI", $function, "\\fR", ":"; + print MAN $description{$function}; + print MAN "\n.PP\n"; } - print $MAN_FOOTER; + print MAN $MAN_FOOTER; + close(MAN); }