From 05f2965980e0dbf014c40c7b3e2492cbe140e87c Mon Sep 17 00:00:00 2001 From: Jacob Moody Date: Sun, 5 Jan 2025 02:35:00 +0000 Subject: [PATCH] /sys/doc: add mk clean Add a mk clean to remove all generated files, and add pdf generation to subdirs missing it. --- sys/doc/fs/mkfile | 2 +- sys/doc/il/mkfile | 8 +++++++- sys/doc/mkfile | 12 +++++++++++- sys/doc/sam/mkfile | 10 ++++++---- 4 files changed, 25 insertions(+), 7 deletions(-) diff --git a/sys/doc/fs/mkfile b/sys/doc/fs/mkfile index 4450d9ea7..d135bcd0c 100644 --- a/sys/doc/fs/mkfile +++ b/sys/doc/fs/mkfile @@ -30,4 +30,4 @@ fs.html:D: $OBJ {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 diff --git a/sys/doc/il/mkfile b/sys/doc/il/mkfile index b6c15985f..50f67952c 100644 --- a/sys/doc/il/mkfile +++ b/sys/doc/il/mkfile @@ -1,9 +1,15 @@ 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 - diff --git a/sys/doc/mkfile b/sys/doc/mkfile index 51dda6302..96897d910 100644 --- a/sys/doc/mkfile +++ b/sys/doc/mkfile @@ -43,6 +43,8 @@ ALL=\ colophon\ nupas/nupas\ nssec\ + fossil\ + backup\ ALLPS=${ALL:%=%.ps} HTML=${ALL:%=%.html} release3.html release4.html @@ -51,7 +53,7 @@ FILES=`{mkfilelist $ALL} 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=${IGNHTML:%=%.html} ${IGNHTML:%=%.install} $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 } diff --git a/sys/doc/sam/mkfile b/sys/doc/sam/mkfile index 26de1d431..473e77d2e 100644 --- a/sys/doc/sam/mkfile +++ b/sys/doc/sam/mkfile @@ -1,19 +1,21 @@ 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