*** empty log message ***
authorhanda <handa>
Fri, 20 Jun 2003 13:14:24 +0000 (13:14 +0000)
committerhanda <handa>
Fri, 20 Jun 2003 13:14:24 +0000 (13:14 +0000)
Makefile.am
utils/mkman.rb
utils/run-latex.sh

index dcfca58..00a1446 100644 (file)
@@ -126,9 +126,11 @@ doxyfile-man.usr: doxyfile
          < $< >$@
 
 %/html/index.html: doxyfile-html.% ${SRCFILES} m17nlib.css
+       rm -rf `dirname $@`
        ${DOXYGEN} $<
 
 %/latex/refman.tex: doxyfile-latex.% ${UTILPATH}/refman-filter.awk ${SRCFILES}
+       rm -rf `dirname $@`
        ${DOXYGEN} $<; \
        awk -f ${UTILPATH}/refman-filter.awk < $@ > temp; \
        mv temp $@
@@ -146,6 +148,12 @@ dev/latex/refman.ps: dev/latex/refman.tex ${UTILPATH}/run-latex.sh ${LATEX_DEV}
        emacs -batch -q -l ${UTILPATH}/mokuji.el -f write-mokuji dev
 
 doxyhead.txt: sample.c ${UTILPATH}/mkheaderlist.rb
+
+%/man/man3/m17nIntro.3m: doxyfile-man.% ${SRCFILES}
+       rm -rf `dirname $@`
+       ${DOXYGEN} $<
+
+man/man3m/m17nIntro.3m: usr/man/man3/m17nIntro.3m sample.c ${UTILPATH}/mkman.rb 
        -${DOXYGEN} -g doxytemp
        echo "INPUT = sample.c" >> doxytemp
        echo "GENERATE_LATEX = NO" >> doxytemp
@@ -154,15 +162,9 @@ doxyhead.txt: sample.c ${UTILPATH}/mkheaderlist.rb
        echo "MAN_OUTPUT = sample" >> doxytemp
        echo "OPTIMIZE_OUTPUT_FOR_C  = yes" >> doxytemp
        ${DOXYGEN} doxytemp
-       (cd sample/man3; ruby ${UTILPATH}/mkheaderlist.rb) > $@
-       rm -rf doxytemp sample
-
-%/man/man3/m17nIntro.3m: doxyfile-man.% ${SRCFILES}
-       ${DOXYGEN} $<
-
-man/man3m/m17nIntro.3m: usr/man/man3/m17nIntro.3m doxyhead.txt ${UTILPATH}/mkman.rb 
        [ -d "man/man3m" ] || mkdir -p man/man3m
        ruby ${UTILPATH}/mkman.rb usr
+       rm -rf doxytemp sample
 
 man/ja/man3m/m17nIntro.3m: ja/man/man3/m17nIntro.3m doxyhead.txt ${UTILPATH}/mkman.rb 
        [ -d "man/ja/man3m" ] || mkdir -p man/ja/man3m
index 64d539d..a503b24 100644 (file)
@@ -5,21 +5,56 @@
 
 usr_or_ja=$*[0]
 
-currentdir = Dir.pwd+"/"
-$doxywork = currentdir+"doxywork/"
-$srcman3 = currentdir+usr_or_ja+"/man/man3/"
+#
+# Setting up directory names.
+#
+
+$currentdir = Dir.pwd+"/"
+$doxywork = $currentdir+"doxywork/"
+$srcman3 = $currentdir+usr_or_ja+"/man/man3/"
 if usr_or_ja == "usr"
-  $dstman3m = currentdir+"/man/man3m/"
+  $dstman3m = $currentdir+"/man/man3m/"
 else
-  $dstman3m = currentdir+"/man/ja/man3m/"
+  $dstman3m = $currentdir+"/man/ja/man3m/"
 end
+$sampledir="sample/man3/"
+
+#
+# Extra information about header strings Doxygen generates in a man file.
+#
+
+def nextheader(text,index)
+  header = text[index+1..text.size].find{|i| i =~ /\.S(S|H)/} 
+  return header
+  end
+
+grouptext = open($sampledir+"SampleGroup.3","r").readlines.reverse
+
+fd = grouptext.index(grouptext.find{|i| i =~ /SampleFunction/})
+$fdheader = nextheader(grouptext,fd)
+
+restofthetext =  grouptext[fd+1..grouptext.size]
+
+fl = restofthetext.index(restofthetext.find{|i| i =~ /SampleFunction/})
+$flheader = nextheader(restofthetext,fl)
+
+dd = grouptext.index(grouptext.find{|i| i =~ /long group document/})
+$ddheader = nextheader(grouptext,dd)
 
-headertexts = open("doxyhead.txt","r").readlines
- $fdheader = headertexts[0]
- $flheader = headertexts[1]
- $ddheader = headertexts[2]
- $fielddheader = headertexts[3]
- $fieldlheader = headertexts[4]
+####
+structext = open($sampledir+"SampleStructure.3","r").readlines.reverse
+
+fieldd = structext.index(structext.find{|i| i =~ /SampleField/})
+$fielddheader = nextheader(structext,fieldd)
+
+restofstructext =  structext[fieldd+1..structext.size]
+
+fieldl = restofstructext.index(restofstructext.find{|i| i =~ /SampleField/})
+$fieldlheader = nextheader(restofstructext, fieldl)
+
+#
+# Main work
+#
 
 ####  to find data structure documentation files and rewriting them 
 
@@ -419,7 +454,3 @@ unless FileTest.directory? filename
 
 end
 }
-
-Dir.chdir($doxywork)
-
-Dir.open(".").each{|f|  File.delete(f) if FileTest.file?(f)}
index 1eff8ef..8a167b4 100755 (executable)
@@ -11,7 +11,7 @@ if [ "$2" = "ja" ] ; then
   LATEX=platex
   PAPER='-t a4'
 else
-  LATEX=latex
+  LATEX=platex
 fi
 ${LATEX} refman.tex
 if [ "$2" = "ja" ] ; then