]> granicus.if.org Git - nethack/commitdiff
Guidebook.dat, one-page edition of Guidebook.txt
authorPatR <rankin@nethack.org>
Sat, 15 Feb 2020 02:15:25 +0000 (18:15 -0800)
committerPatR <rankin@nethack.org>
Sat, 15 Feb 2020 02:15:25 +0000 (18:15 -0800)
Update sys/unix/Makefile.doc to be able to build Guidebook.dat, an
unpaginated copy of the plain text Guidebook.  It's generated from
the 'roff source rather than by attempting to post-process the
regular text Guidebook.

No doubt there are easier ways to do this.

doc/Gbk-1pg-pfx.mn [new file with mode: 0644]
doc/Gbk-1pg-sfx.mn [new file with mode: 0644]
doc/fixes37.0
sys/unix/Makefile.doc

diff --git a/doc/Gbk-1pg-pfx.mn b/doc/Gbk-1pg-pfx.mn
new file mode 100644 (file)
index 0000000..f59f621
--- /dev/null
@@ -0,0 +1,3 @@
+.\" prefix to Guidebook.mn for 'roff version of Guidebook written as one page
+.
+.pl 12345v \" set page size of 12345 lines
diff --git a/doc/Gbk-1pg-sfx.mn b/doc/Gbk-1pg-sfx.mn
new file mode 100644 (file)
index 0000000..2773c08
--- /dev/null
@@ -0,0 +1,8 @@
+.\" suffux to Guidebook.mn for 'roff version of Guidebook written as one page
+.br
+.\" add a marker that precedes hundreds of blank lines which pad out the page
+EOF--EOF
+.
+.\" post process with "sed -e '/EOF--EOF/,12345D'" to remove trailing junk
+.\" (also removes Unix trademark footnote; that ought to be kept but the
+/\" generic "all trademarks are held by respective owners" is still present)
index e9f7e6fef72c78ef7974f8a3211667047a00f020..2288fd47a309ff314de19ab4ed14e162c3af0b15 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.99 $ $NHDT-Date: 1581726277 2020/02/15 00:24:37 $
+$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.100 $ $NHDT-Date: 1581732920 2020/02/15 02:15:20 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -162,6 +162,8 @@ added several new status conditions all of which are opt-in except
 
 Platform- and/or Interface-Specific New Features
 ------------------------------------------------
+teach unix/Makefile.doc how to make Guidebook.dat, an unpaginated copy of
+       Guidebook.txt
 
 
 NetHack Community Patches (or Variation) Included
index 2d2a2dd035a56496f6a38e834f16339491e73242..35666a5cc782361957bafe625f9dadf14527de48 100644 (file)
@@ -1,5 +1,5 @@
 #      NetHack Documentation Makefile.
-# NetHack 3.6  Makefile.doc    $NHDT-Date: 1540625947 2018/10/27 07:39:07 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.17 $
+# NetHack 3.6  Makefile.doc    $NHDT-Date: 1581732920 2020/02/15 02:15:20 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.20 $
 # Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
 # NetHack may be freely redistributed.  See license for details.
 
@@ -34,6 +34,8 @@ PSCMD = groff
 # GUIDECMD= $(GUIDE_PREFORMAT) | perl -pe 's/^(.mt)$$/.pl 4720v\n.in 0\n.po 8\n.ll 64m\n$$1/' | nroff -c -Tascii | $(COLCMD)
 #
 GUIDECMD = $(GUIDE_PREFORMAT) | nroff -c -Tascii | $(COLCMD)
+ONEPAGECMD = $(ONEPAGE_PREFORMAT) | nroff -c -Tascii | $(COLCMD) \
+       | sed -e '/EOF--EOF/,12345D'
 
 # Only generate output for the current configuration:
 NHGREP = $(MAKEDEFS) --grep --input - --output -
@@ -43,6 +45,9 @@ NHGREP = $(MAKEDEFS) --grep --input - --output -
 #NHGREP = cat
 
 GUIDE_PREFORMAT = cat Guidebook.mn | $(NHGREP) | tbl tmac.n -
+# for Guidebook.dat, unpaginated version of Guidebook.txt
+ONEPAGE_PREFORMAT = cat Gbk-1pg-pfx.mn Guidebook.mn Gbk-1pg-sfx.mn \
+       | $(NHGREP) | tbl tmac.n -
 
 # the basic guidebook
 Guidebook:     Guidebook.mn tmac.n tmac.nh
@@ -91,6 +96,9 @@ distrib: $(DISTRIB)
 
 Guidebook.txt  : Guidebook.mn tmac.n tmac.nh
        $(GUIDECMD) > Guidebook.txt
+Guidebook.dat  : Gbk-1pg-pfx.mn Gbk-1pg-sfx.mn Guidebook.mn tmac.n tmac.nh
+       $(ONEPAGECMD) > Guidebook.dat
+
 MAN2TXT = $(NHGREP) | nroff -man - | $(COLCMD)
 nethack.txt    : nethack.6
        cat nethack.6 | $(MAN2TXT) > nethack.txt
@@ -105,7 +113,7 @@ clean:
        -rm -f Guidebook.aux Guidebook.log
 
 spotless: clean
-       -rm -f Guidebook Guidebook.ps Guidebook.dvi
+       -rm -f Guidebook Guidebook.dat Guidebook.ps Guidebook.dvi
 
 maintainer-clean: spotless
        -rm -f $(DISTRIB)