< $< >$@
%/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 $@
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
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
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
end
}
-
-Dir.chdir($doxywork)
-
-Dir.open(".").each{|f| File.delete(f) if FileTest.file?(f)}