Completely rewrote Makefile. Fixed up man2ps script and wrote manpage
authorJeff Bigler <jcb@mit.edu>
Fri, 6 Sep 1996 17:16:30 +0000 (17:16 +0000)
committerJeff Bigler <jcb@mit.edu>
Fri, 6 Sep 1996 17:16:30 +0000 (17:16 +0000)
for it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9040 dc483132-0cff-0310-8789-dd5450dbe970

doc/ChangeLog
doc/Makefile
doc/man2ps
doc/man2ps.M [new file with mode: 0644]

index d37beef661093b3c1387ec34b33773bc036cded3..7f6c416f14004ef7b12cde2a310b272b7ba70e59 100644 (file)
@@ -1,3 +1,23 @@
+Fri Sep  6 12:59:43 1996  Jeff Bigler  <jcb@viola.cygnus.com>
+
+       * man2ps: shell script to create postscript include files for
+       user's guide.
+
+       * man2ps.M: man page for above shell script
+
+       * build.texinfo: this is now included by cyg-install.texinfo
+       (which should eventually replace install.texi.)
+
+       * definitions.texinfo: added flags "MIT" and "CYGNUS".
+
+       * cyg-install.texinfo: added @ifset and @ifclear sections to
+       separate MIT-specific and Cygnus-specific sections.
+
+       * admin.texinfo: added @ifset and @ifclear sections as with
+       cyg-install.texinfo
+
+       * Makefile: rewrote entire contents of file.
+
 Fri Sep  6 01:22:56 1996  Theodore Y. Ts'o  <tytso@mit.edu>
 
        * build.texinfo: Remove --enable options which are no longer
index dfbc9430f74a75b0f9fb24dec1c5a799be14b6cd..0603cba9730b89326524ab45b5f6c4d01d2d72b0 100644 (file)
@@ -1,15 +1,68 @@
-.SUFFIXES: .texi .dvi .ps .info
+SRCDIR=../src
+DVI=texi2dvi
+DVIPS=dvips -o "$@.ps"
+INFO=makeinfo
+HTML=texi2html
+RM=rm -f
+TAR=tar -chvf
+GZIP=gzip -9
+MANPS=./man2ps
+all:: admin-guide-full install-guide-full user-guide-full tgz
 
-all:: install.info  install.dvi
+admin-guide-full:: admin-guide admin-guide-info admin-guide-html
 
-.texi.dvi:
-       texi2dvi $*.texi
+admin-guide::
+       $(DVI) admin.texinfo
+       $(DVIPS) admin
 
+admin-guide-html::
+       $(HTML) admin.texinfo
 
-.texi.info:
-       makeinfo $*.texi
+admin-guide-info::
+       $(INFO) admin.texinfo
 
+install-guide-full:: install-guide install-guide-info install-guide-html
 
-clean:: 
-       rm -f *.log *.info *.dvi *.aux *.toc *.cp *.fn *.vr *.tp *.ky \
-               *.pg *.ps *.info-?
+install-guide::
+       $(DVI) cyg-install.texinfo
+       $(DVIPS) install
+
+install-guide-html::
+       $(HTML) cyg-install.texinfo             
+
+install-guide-info::
+       $(INFO) cyg-install.texinfo
+
+user-guide-full:: user-guide user-guide-info user-guide-html
+
+user-guide::
+       $(DVI) user-guide.texinfo
+       $(MANPS) $(SRCDIR)/appl/gssftp/ftp/ftp.M $(SRCDIR)/clients/kdestroy/kdestroy.M $(SRCDIR)/clients/kinit/kinit.M $(SRCDIR)/clients/klist/klist.M $(SRCDIR)/clients/ksu/ksu.M $(SRCDIR)/appl/bsd/rcp.M $(SRCDIR)/appl/bsd/rlogin.M $(SRCDIR)/appl/bsd/rsh.M $(SRCDIR)/appl/telnet/telnet/telnet.1
+       $(DVIPS) user-guide
+
+user-guide-info::
+       $(INFO) user-guide.texinfo
+
+user-guide-html::
+       $(HTML) user-guide.texinfo              
+
+clean:: clean-all
+
+clean-all:: clean-tex clean-backup clean-final clean-tarfiles
+
+clean-final::
+       $(RM) *.ps *.info *.info-? *.html
+
+clean-tex::
+       $(RM) *.aux *.cp *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr
+
+clean-backup::
+       $(RM) *~ #*
+
+clean-tarfiles::
+       $(RM) *.tar *.tar.gz *.tgz
+
+tgz::
+       $(TAR) krb5-docs.tar admin.texinfo build.texinfo copyright.texinfo definitions.texinfo document-list.texinfo glossary.texinfo cyg-install.texinfo texinfo.tex user-guide.texinfo *-guide.ps *.info *.info-? *.html
+       $(GZIP) krb5-docs.tar
+       $(MV) krb5-docs.tar.gz krb5-docs.tgz
index 33162d402285f4258eea36ceda579e79a4b2ed2b..a42260fc1ca72c28512404fdc325427ec83250a1 100644 (file)
@@ -2,41 +2,43 @@
 
 com=`basename $0`
 files=$*
-docdir=`pwd`
-mandir=$docdir/man
 
-cd $mandir
+if [ "$files" = "" ]; then
+    echo "\aUsage: $com file [file2 ...]"
+    exit 1
+fi
 
 for file in $files
 do
-    troff -C -man -Tps $mandir/man?/$file.? | grops -g > $file.ps
+    filename=`basename $file | awk -F. '{print $1}'`
+    troff -C -man -Tps $filename | grops -g > $filename.ps
 
-    pages=`grep '%%Pages\:' $file.ps | awk '{print $2}'`
+    pages=`grep '%%Pages\:' $filename.ps | awk '{print $2}'`
     pp=$(($pages - 1))
 
-    echo $file': '$pages' pages'
+    echo $filename': '$pages' pages'
 
     if [ -e csplit ]; then
-        csplit -k $file.ps /Page:/ \{$pp\}
+        csplit -k $filename.ps /Page:/ \{$pp\}
 
         counter=0
 
         for number in `ls xx*`
         do
-            cat xx00 > $docdir/$file$counter.ps
-            echo '.7 dup scale' >> $docdir/$file$counter.ps
-            cat $number >> $docdir/$file$counter.ps
+            cat xx00 > $filename$counter.ps
+            echo '.7 dup scale' >> $filename$counter.ps
+            cat $number >> $filename$counter.ps
             if [ $counter != $pages ];
                 then
-                echo '%%Trailer' >> $docdir/$file$counter.ps
-                echo 'end' >> $docdir/$file$counter.ps
-                echo '%%EOF' >> $docdir/$file$counter.ps
+                echo '%%Trailer' >> $filename$counter.ps
+                echo 'end' >> $filename$counter.ps
+                echo '%%EOF' >> $filename$counter.ps
             fi
             counter=$(($counter + 1))
         done
 
-        rm $file.ps $docdir/$file'0.ps' xx*
+        rm $filename.ps $filename'0.ps' xx*
     else
-        echo "\aCan't find the csplit command.  You'll have to split $file.ps manually."
+        echo "\aCan't find the csplit command.  You'll have to split $filename.ps manually."
     fi
 done
diff --git a/doc/man2ps.M b/doc/man2ps.M
new file mode 100644 (file)
index 0000000..dc4e4ad
--- /dev/null
@@ -0,0 +1,44 @@
+.TH MAN2PS 1
+.SH NAME
+man2ps \- create individual PostScript files for each page of a man page
+.SH SYNOPSIS
+.B man2ps
+.I file
+[\fIfile2\fP [\fI...\fP]]
+.SH DESCRIPTION
+.B man2ps
+is a bourne shell script that turns a man page into a set of PostScript
+files, for inclusion in a document.
+.B man2ps
+converts the man page to a PostScript file using
+.IR troff (1), 
+and then uses the
+.IR csplit (1)
+command to split the file into individual pages.
+.B man2ps
+inserts the PostScript command:
+.sp
+.nf
+.in +.5i
+\&.7 dup scale
+.in -.5i
+.fi
+.sp
+at the beginning of each page, so that the pages will fit onto a page in
+a standard size reference manual (7"x9.25").
+.PP
+The files created by
+.B man2ps
+have the same name as the command, with a sequential number and the
+string ".ps" appended.  For example, running
+.B man2ps
+on the file "kinit.M" would produce the PostScript files "kinit1.ps",
+"kinit2.ps", ...
+.SH SEE ALSO
+troff(1), csplit(1)
+.SH BUGS
+.B man2ps
+fails if the
+.I csplit
+command is not in the user's path.
+