📄 beta.mex
字号:
.LS 4cd /usr/src/manvi Printfile.LERedefine.L DESTHOSTto be the name of your doctools host.Redefine.L DESTDIRto be the name of the directory in which you want to put the sources..LPDo the remote copy:.LS 4make pinstall.LEThis should have worked,but just to be sure,perform one more sanity check.On the release machine:.LS 4cd CLONEDIRdu.LEOn your doctools host:.LS 4cd DESTDIRdu.LEDo the sources in both directories occupy the same amount of storage?.LPThere's one last check you need to make before you pring the manual.You need to run.L checknron all the source files:.LS 4make checknr.LEThis will give warnings about dubious.L troffinstructions.Most of the source files should generate relatively few warnings,and many of the warnings will not,in fact,indicate errors.You should soon get a feel for which warnings need to be investigated.Keep a list of files to investigate,and make any necessary fixes.When you're satified with these fixes,you're finally ready to start printing the manual!.H C "Printing the Manual".H 2 "Preparation".LPStart by making each section of the manual a single documentby concatenating the pages in each section:.LS 4cd DESTDIRmake man.LEThis target will generate files called.L .man . \fIsection\fP.LPGenerate PostScript images of these files:.LS 4make PS.LEThis target will generate files called.L .PS . \fIsection\fPThese are the files that will actually be printed.The.L PStarget will also generate the pagination file.L pag.PS ..H 2 "Verify the Pagination".LPThe pagination sheets consist of diagrams of each page of the manual.Each sheet contains eighty to ninety small page diagrams.A page number appears on each diagram,and man page names appear on diagramsthat mark the beginnings of man pages..LPPrint.L pag.PS :.LS 4lpr pag.PS.LEReview the printed copy very, very carefully!Check for pages out of order (especially in section 3),missing and duplicate pages,and bad page numbering.Make sure,too,that when a section ends on an odd page number,there is a blank,even-numbered page immediately following it..LPDraw a diagonal slash through the page diagrams correspondingto blank pages.Circle the page numbers on the diagrams of pageson which no page number should be printed..LPNote:There will be more than enough page diagrams at the end of thepagination sheet to account for the index.After you print the index,and decide that it's correct,go through and mark the page numbers on all the index page diagrams.This is tiring,but important.You can then cross out the remaining page diagrams at the end..LPIf you find pagination problems,you're going to have to fix them and backtrack enough steps to recover the errors.This is frustrating and thoroughly unpleasant,especially if you have to reprint entire sections..H 2 "Print Manual Sections".LPOnce you've ironed out the pagination problems,you're at last ready to start printing.A good strategy is to print the smaller sections first,so that major errors can be caught before much printing hasbeen done:.LS 4lpr -s -P\fIprinter\fP \fIsection\fP.PS.LELeaf through the printed copy and put yellow stickieson pages which contain errors.Especially important are errors which affect pagination,such as bad page breaks,bad size changes which alter vertical spacingand incomplete pages.Note any other technical or formatting errors as well..LPFix errors which affect pagination first,and then make any other fixes you think necessary..LPNote:Edit the clones when you make fixes!Do not work on the release machine!.LPIf you've found pagination problems,you'll have to redo some steps..LPNote:A pagination botch in one section will affect all subsequent sections.In this case,a major reprint is unavoidable..H 2 "Make Patches".LPIn the case of errors which don't affect pagination,it's possible to replace the bad pages with patches,instead of reprinting the whole manual.After you've made all the fixes you find necessary,you can write shell scripts to generate the patch pagesfor each section and to number them correctly:.LS 4cd DESTDIRvi \fIsection\fP.sh.LEUse this template to write your script:.LS 4#! /bin/sht() {tbl $1 | troff -msunman -rC1 -rD1 -rP$2}t \fIpatchpage\fP \fIpagenumber\fP.LE.I patchpageis the name of the source file for the man page you wantto reprint and.I pagenumberis the number given to the first page of.I patchpage .Include an invocation of the shell function.L tfor each of the man pages in.I sectionyou want to reprint.Now run the script:.LS 4cd man\fIsection\fPsh ../\fIsection\fP.sh.LEWrite and run this script for each of the sectionsin which you have pages to patch..H 2 "Fold in the Patch Pages".LPOnce you've printed all your patch pages,you'll need to fold them into the manual.Replace the stickied pages with their patches.Double-check to make sure the page numbering is correct!Watch for errors.(You may have to patch the patches!)Remember to insert blank sheets at the ends of sectionswhich end on odd-numbered pages.Write page numbers in blue pencil on these blank sheets,and insert colored sheets where tabs will go in the finished manual..LPDon't forget to print the index!.LS 4lpr -s -P\fIprinter\fP index.PS.LEReview the printed copy of the index and sticky any unnacceptableerrors..H 2 "A Final Review".LPBy now,you should be looking at an enormous pile of paper.You need to one last major sanity check.Yes,you guessed it.Leaf through the entire manual.Verify that the page numbering correlates with the paginationsheet.Check page ordering and completeness.Keep an eye out for greivous errors,and put stickies on them..H 2 "More Patches".LPWhen you've gone through the entire document,print any final patches you think necessary,and fold them in.Again,be careful about page numbering..H 2 "Print the Cover Sheet".LPNow all your manual needs is a cover sheet..LS 4cd DESTDIRvi cover.mex.LEYou need to update the part number and dash level,the revision level and the revision date.The dash level is 01 for an alpha release,greater than 01 and less than 10 for a beta releaseand 10 for an.SM FCSrelease..LPNobody knows why..LPThe revision level is 1 for an alpha release,51 for a beta releaseand A for an.SM FCSrelease..LPNobody knows why..LPPrint the cover sheet:.LS 4troff -Tlw -mex cover.mex.LE.H 2 "Deliver the Document".LPYou are now ready to send the hellish thing out the door.Stack the manual neatly in a box,section by section.Check the page numbers at the beginnings and ends of sectionsagainst the pagination sheet.Review the pagination sheet itself for completeness and order.Do the printer a favor:Number the pages of the pagination sheet,put a paper clip on them,and put them in the box on top of the document..LPDeliver it to the production department.Now it's their problem!.LP.H C "Final Housekeeping".LPI hate to tell you this,but you're not finished yet.Yes,there's some final housekeeping still left to do..H 2 "Move Changed Pages Back to the Release Machine".LPYou've undoubtedly made changes to some of the pages sinceyou cloned the sources.Now you have to move them back to the release machine..H 2 "Make Lists of Pages Changed Since the Clone".LPThe first step in this is to make lists of pages changedsince the clone and put them in files called.L Mutantclones \fIsection\fP:.LS 4cd man\fIsection\fPls -lt > Mutantclones\fIsection\fPvi Mutantclones\fIsection\fP.LEDelete.L Mutantclones \fIsection\fPitself from the list.Find the start of that part ofthe list bearing the date of the clone.Delete these and all entries below it:.LS 4dG.LENow,in order to strip away all butthe desired filename from the file,type.LS 4:%s/.*[0-9][0-9] //.LESort the list.position the cursor on the first line of the file andtype:.LS 4!G.LEAt the prompt,type.LS 4sort.LEfollowed by.SM RETURN .Review the list visually to make sure there are no spurious entries..LPGenerate such a list for each section..H 2 "Copy the Lists to the Release Machine".LPNow you need to copy these lists to the release machine:.LS 4cd DESTDIRforeach i (1 2 3 4 5 6 7 8)cd man$ircp Mutantclones$i \fIrelease-machine\fP:/tmpcd ..end.LE.H 2 "\fLsid\fP".LPNow use.L sidto fix the.SM SCCSid lines:.LS 4foreach i (1 2 3 4 5 6 7 8)cd man$isid `cat Mutantclones$i`cd ..end.LEVerify this process:.LS 4foreach i (1 2 3 4 5 6 7 8)cd man$igrep 'SMI' * | morecd ..end.LEIf you still see any bad.SM SCCSid lines,.L vithe offending files and fix them..H 2 "Check out the Files Modified Since the Clone".LPNow you need to go to the release machineand check out all the files that have been modified since theclone:.LS 4cd /usr/src/manforeach i (1 2 3 4 5 6 7 8)cd man$isccs edit -s `cat /tmp/Mutantclones$i`cd ..end.LE.H 2 "Copy the Files from Your Doctools Host".LPNow you're ready to copy the files back.Return to your doctools host:.LS 4foreach i (1 2 3 4 5 6 7 8)cd man$ircp * \fIrelease-machine\fP:/usr/src/man/man$icd ..end.LEAfter a remote copy of that magnitudeyou need to do a sanity check.Go back to the release machine.For each of the files you copied,display the number of lines of difference betweenyour modified copy of a file and the version of the filewhich you originally cloned:.LS 4foreach i ( 1 2 3 4 5 6 7 8 )cd man$iforeach j (`cat /tmp/Mutantclones$i`)echo -n "$j " >>! /tmp/diffs.listsccs diffs $j | wc -l >>! /tmp/diffs.listendcd ..end.LEIf there are less than five lines of difference,you should investigate.It's possible that the changes you made didn't get copied correctly.If there are more than one hundred lines of difference,you're probably missing something.Investigate in this case, too.You may have to try copying a file again,or you may have to reconstruct your changes..H 2 "Check the Files In".LPIf you're satisfied that the copy was successful,you're ready to check the files in:.LS 4cd /usr/src/manforeach i (1 2 3 4 5 6 7 8)cd man$isccs delget -s -y"\fIcomment\fP" `cat /tmp/Mutantclones$i`cd ..end.LE.I commentshould probably indicate that the modifications you made werelast-minute changes for the build..LPOne more sanity check:.LS 4cd man\fIsection\fPsccs tell.LEIf there's anything left checked out,investigate and fix it.Do this in each section..H 2 "Test \fLcatman\fP".LPThere's one final test you have to do.You need to run some tests to assure that.L catmanwill work properly..LP.L catmanproduces formatted versions of the man pages("cat files")that take up space.During testing,though,there's no need to do that time-consuming formatting.You can trick catman into generating dummy cat filesthat won't take up much space and will be easy to clean up..H 2 "Create \fLcat\fP\fIsection\fP Directories".LPCreate.L cat \fIsection\fPdirectories in.L /usr/src/man ,create a test directory,and make symbolic links from the.L cat \fIsection\fPdirectories to your test directory:.LS 4cd /usr/src/manmkdir cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 mkdir /tmp/catforeach i (1 2 3 4 5 6 7 8)ln -s /tmp/cat cat$iend.LE.H 2 "\fLNroff\fP".LPThere should be a file called.L Nroffin.L /usr/src/man/bin.It should consist of one line:.LS 4head -1 $2.LE.H 2 "Run \fLcatman\fP".LPYou can trick.L catmaninto using thisscript instead of the usual.L nroff :.LS 4cd /usr/src/man/binmv Nroff nroffcatman.LENote:You may have to adjust the argument number.L $2 ) (if you get this error message:.LS 4Bad number format.LEIf you get errors from.L catman ,.L "sccs get"the offending files,and try again..LP.L catmanshould in all likelihood give error messages only about bad.L .soreferences.These are usually references to files the names of which havebeen changed.These should be easy to fix.Other,more cryptical error messages may take some investigating..H 2 "Test \fLwhatis\fP".LPYou still need to run.L catmanonce more,to test the.L whatisdatabase:.LS 4catman -wmore /usr/man/whatis.LEThe bad entries should appear at the top.They indicate problems with the.SM NAMElines of certain pages.It should usually be apparent which files are the sources of the dreck..L vithese files and fix those .SM NAMElines!.H 2 "Cleanup".LPWhen you're finally satisfied that.L catmanwill work properly,clean up after yourself:.LS 4cd /usr/src/man/binmv nroff Nroffcd ..rm cat?rm -r /tmp/cat.LE.H 2 "Recover".LPNow,you are well and truly finished with the build..LPFollow these final instructions very carefully:.LP.SM "LEAVE THE OFFICE" !Go out and indulge wholeheartedly in your favorite vice.Sleep late tomorrow.Repeat for a week.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -