mkfile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. < /sys/man/fonts
  2. LIB=/sys/lib/man
  3. default:V: check
  4. indices:V:
  5. for (i in [0-9]){
  6. $LIB/secindex $i > $i/INDEX
  7. $LIB/mkhtmlindex $i > $i/INDEX.html
  8. }
  9. mk lookindex
  10. $LIB/mksearchindex > searchindex # index for man2html searches
  11. permind:V:
  12. rm -f /sys/lib/man/permind/toc
  13. {
  14. echo .am TH
  15. echo .tm '\\$1' '\\$2' '\\n%'
  16. echo ..
  17. for (i in [0-9]){
  18. builtin cd $i
  19. for(j in [a-z0-9]*)
  20. switch($i/$j){
  21. case 1/tbl
  22. tbl $j
  23. case 1/eqn 3/realtime 6/auth
  24. eqn $j
  25. case 1/pic
  26. pic $j
  27. case 1/grap
  28. grap $j | pic
  29. case *
  30. cat $j
  31. }
  32. builtin cd ..
  33. }
  34. } | troff -$MAN > /dev/null >[2] /sys/lib/man/permind/toc
  35. builtin cd $LIB/permind
  36. rm -f out
  37. mk out > /dev/null >[2] /dev/null
  38. old-check:V: checksource
  39. awk -f $LIB/checkman.awk [0-9]/* | sed '/\/(cda|av|midi|pub|weather|service\.9net|isdn)(\/|\))/d'
  40. punccheck:
  41. grep -n '^\.[IB][^PRIB].+[.;,:]$' [0-9]/* | grep -v '\.\.\.'
  42. check:V: indices checksource
  43. awk -f $LIB/checkman.awk [0-9]/*
  44. checksource:QV:
  45. sam -d >[2]/dev/null <<'!'
  46. f input
  47. < cat [0-9]/[0-9a-z]*
  48. B output
  49. b input
  50. ,x/^\.SH SOURCE/ .,/^\.SH/ x g/^\.B/t "output
  51. b output
  52. ,x/^\.B.? / d
  53. ,x/ .*/d
  54. ,s/.+/if(! test -f & \&\& ! test -d &) echo no such SOURCE file '&'/g
  55. ,>rc
  56. !
  57. lookindex:V:
  58. builtin cd $LIB/lookman
  59. mkindex
  60. print.out:V: permind
  61. {
  62. {echo -n $FONTS; cat $LIB/title} | troff
  63. {echo -n $FONTS; cat $LIB/trademarks} | troff -ms
  64. {echo -n $FONTS; echo ' '} | troff
  65. {echo -n $FONTS; cat $LIB/preface4} | troff -ms
  66. {echo -n $FONTS; echo ' '} | troff
  67. {echo -n $FONTS; cat $LIB/preface3} | troff -ms
  68. {echo -n $FONTS; echo ' '} | troff
  69. {echo -n $FONTS; cat $LIB/preface} | troff -ms
  70. {echo -n $FONTS; echo ' '} | troff
  71. {
  72. for (i in [0-9]){
  73. builtin cd $i
  74. for(j in [a-z0-9]*)
  75. switch($i/$j){
  76. case 1/tbl
  77. tbl $j
  78. case 1/eqn 6/auth
  79. eqn $j
  80. case 1/pic
  81. pic $j
  82. case 1/grap
  83. grap $j | pic
  84. case *
  85. cat $j
  86. }
  87. builtin cd ..
  88. }
  89. } | troff -$MAN
  90. {echo -n $FONTS; echo ' '} | troff
  91. {echo -n $FONTS; echo ' '} | troff
  92. cat $LIB/permind/out
  93. {echo -n $FONTS; echo ' '} | troff
  94. {echo -n $FONTS; echo ' '} | troff
  95. {echo -n $FONTS; cat $LIB/colophon} | troff
  96. } > print.out
  97. clean:V:
  98. rm -f man.out