ref: 05f2965980e0dbf014c40c7b3e2492cbe140e87c
parent: 28465682cf7707532583d3a386991b39c683ee1c
author: Jacob Moody <moody@posixcafe.org>
date: Sat Jan 4 21:35:00 EST 2025
/sys/doc: add mk clean Add a mk clean to remove all generated files, and add pdf generation to subdirs missing it.
--- a/sys/doc/fs/mkfile
+++ b/sys/doc/fs/mkfile
@@ -30,4 +30,4 @@
{echo $FONTS; tbl $OBJ } | eqn | htmlroff -ms -mhtml >$target
clean:V:
- rm -f fs.^(html trout ps pdf)
+ rm -f fs.^(html trout ps pdf) p10.png pa1.png
--- a/sys/doc/il/mkfile
+++ b/sys/doc/il/mkfile
@@ -1,9 +1,15 @@
</sys/doc/fonts
+all:V: il.ps il.pdf
+
il.ps:D: il.ms transition.pic
{echo $FONTS; cat il.ms} | pic | troff -ms | lp -dstdout >il.ps
../cleanps il.ps
+%.pdf:D: %.ps
+ cat ../docfonts $stem.ps >_$stem.ps
+ # distill _$stem.ps && mv _$stem.pdf $stem.pdf
+ ps2pdf _$stem.ps $stem.pdf && rm -f _$stem.ps
+
il.html:D: il.ms transition.pic
pic il.ms | htmlroff -ms -mhtml >il.html
-
--- a/sys/doc/mkfile
+++ b/sys/doc/mkfile
@@ -43,6 +43,8 @@
colophon\
nupas/nupas\
nssec\
+ fossil\
+ backup\
ALLPS=${ALL:%=%.ps}
HTML=${ALL:%=%.html} release3.html release4.html
@@ -51,7 +53,7 @@
DIRS=`{mkdirlist $ALL}
NAMES=$FILES $DIRS
-all:V: ${FILES:%=%.ps} dirs
+all:V: ${FILES:%=%.pdf} dirs
dirs:V:
for(i in $DIRS) @{
@@ -136,3 +138,11 @@
$IGN:QV:
# nothing
+clean:V:
+ clean=`{
+ for(i in $ALLPS $PDF){
+ echo $i
+ } | grep -v 'acme|venti|fig.\.ps'
+ }
+ rm -f $clean
+ @{ cd fs && mk clean }
--- a/sys/doc/sam/mkfile
+++ b/sys/doc/sam/mkfile
@@ -1,19 +1,21 @@
</sys/doc/fonts
-default:V: sam.ps sam.tut.out
+default:V: sam.ps sam.pdf
sam.ps:D: sam.ms fig1.ps fig2.ps fig3.ps fig4.ps fig5.pic fig6.pic fig7.pic refs
{echo $FONTS; cat sam.ms refs} | pic | tbl | troff -ms -mpictures | lp -dstdout >sam.ps
../cleanps sam.ps
+%.pdf:D: %.ps
+ cat ../docfonts $stem.ps >_$stem.ps
+ # distill _$stem.ps && mv _$stem.pdf $stem.pdf
+ ps2pdf _$stem.ps $stem.pdf && rm -f _$stem.ps
+
sam.trout:D: sam.ms fig1.ps fig2.ps fig3.ps fig4.ps fig5.pic fig6.pic fig7.pic refs
{echo $FONTS; cat sam.ms refs} | pic | tbl | troff -ms -mpictures >sam.trout
sam.html:D: sam.ms fig1.ps fig2.ps fig3.ps fig4.ps fig5.pic fig6.pic fig7.pic refs
pic sam.ms refs | tbl | htmlroff -ms -mhtml >sam.html
-
-sam.tut.out:D: sam.tut
- troff -ms sam.tut > sam.tut.out
clean:V:
rm -f sam.ps
--
⑨