Debian Codegraph @

doc/man/mandefs

raw
1 #ident $Revision: 1.1.1.1 $
2 #
3 # Common definitions for man page Makefiles
4 #
5
6 include $(ROOT)/usr/include/make/commondefs
7 #include $(PRODUCTDEFS)
8 #include $(RELEASEDEFS)
9
10 MMDOC = sh $(DEPTH)/tools/mmdoc
11 MPATH = $(DEPTH)/macros
12 GETNAMES = nawk -f $(DEPTH)/tools/getnames
13 ADDINST = nawk -f $(DEPTH)/tools/addinst
14
15 # Global version and (published) date values for man page footers. Can override
16 # for a particular directory by reassigning after the inclusion of mandefs.
17 VERSION = Version 1.0
18 DATE = August 1991
19
20 #
21 # directories - these may exist under some or all of the man sections
22 # and correspond to option man pages
23 # we list them all here once
24
25 OPTIONS=standard nfs dwb trans ftn emacs pascal pl1 5080 ada t3270 pfa diags \
26 x11 xt noship sna sna_3770 sna_3270 sna_server sna_lu6.2 spaceball \
27 x25 netvis netman softpc c++ sna_lu0-3 bsdlpr 4DDN dgl gpib slip \
28 nonstandard libil pca t3270dft vc nqs seiko5500 vfr bvo tcp3270 \
29 smt sqa fddi fddivis c cmplrs dbx edge ld efast cdrom gltools \
30 moregltools imagetools imgtools gldebug libsphere audio eoe ido \
31 distgen libblas showcase video debug dat imagevision tokenring \
32 inventor
33
34 # Change /pubs/tools symbolic name to $(MPATH) in .so's
35 FIXPUBS = sed 's:^\.so[ ]*/pubs/tools/:.so $(MPATH)/:'
36
37 # Convert .TH lines to all uppercase when making online pages (mostly
38 # for GL man pages). If line is .TH \*(}x, don't uppercase it.
39 THTOUPPER = \
40 sed '/^\.TH[^}]*$$/y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'
41
42 # Add string definitions containing VERSION, DATE, and RELEASE (only
43 # the portion after the "-", if it exists) to man page input. Also
44 # define strings with print date (i.e. "now"), last modified date of
45 # input file, and result of "sum <input file>".
46 ADDSTRINGS = awk 'BEGIN { \
47 first = 1; \
48 if (split("$(RELEASE)", r, "-") > 1) \
49 release = r[2]; \
50 else \
51 release="$(RELEASE)"; \
52 } \
53 first == 1 && $$0 !~ /^'"'"'\\"/ { \
54 print ".ds Vn $(VERSION)"; \
55 print ".ds Dt $(DATE)"; \
56 print ".ds Re Release", release; \
57 print ".ds Dp '"`date '+%b %d %H:%M'`"'"; \
58 print ".ds Dm '"`ls -l $< | cut -c42-53`"'"; \
59 print ".ds Xs '"`sum $<`"'"; \
60 first = 0; \
61 } \
62 { print }'
63
64 # If page doesn't start with a magic '\", add a default one.
65 ADDMAGIC = ( case `head -1 $<` in \
66 "'\\\""*) ;; \
67 *) echo "'\\\"macro stdmacro" ;; \
68 esac ; cat $< ) | $(FIXPUBS) | $(ADDSTRINGS)
69
70 # If GL page starts '\"!, second line is assumed to contain '\"macro stdmacro,
71 # and it is changed to '\"macro mn; if page doesn't start with '\",
72 # '\"macro mn is added (if it's not there already). Only use the "mn"
73 # macros for hardcopy; online man pages use stdmacro like all other man pages.
74 ADDGLMAGIC = ( case `head -1 $<` in \
75 "'\\\"macro mn") cat $< ;; \
76 "'\\\""!*) sed '2 s/stdmacro/mn/' $< ;; \
77 *) echo "'\\\"macro mn" ; cat $< ;; \
78 esac ) | $(FIXPUBS) | $(ADDSTRINGS)
79
80 RUNMMDOC = TMMACRO=$(MPATH) PATH=$(DEPTH)/tools:$$PATH \
81 OTHERFILES="$(MPATH)/Op $(LANGOPT) $(MPATH)/localmacs" \
82 $(MMDOC) $(MMFLAGS)
83
84
85 LEGALBASE = [0-z+,%-]*#
86 LEGALSUF1 = [1-7]#
87 LEGALSUF2 = [1-7][a-z]*#
88 LEGALSUF3 = [1-7]X11#
89 LEGALSUF4 = [1-7]Xt#
90 LEGALNAME1= $(LEGALBASE).$(LEGALSUF1)#
91 LEGALNAME2= $(LEGALBASE).$(LEGALSUF2)#
92 LEGALNAME3= $(LEGALBASE).$(LEGALSUF3)#
93 LEGALNAME4= $(LEGALBASE).$(LEGALSUF4)#
94 LISTLEGAL = find . \( -name '$(LEGALNAME1)' -o -name '$(LEGALNAME2)' \
95 -o -name '$(LEGALNAME3)' -o -name '$(LEGALNAME4)' \) -print \
96 | sed -e 's/^..//' -e '/\//d'
97
98 #
99 # The following defintions are release-note specific.
100 #
101
102 # File that should be included before each chapter is formatted
103 CHAPHEAD = Templates/cFront
104
105 # Files that should be included before each appendix is formatted
106 APPDXHEAD = Templates/cFront Templates/aFront
107
108 # Between start and end put file names for generating
109 # the TC files in the right order.
110
111 BASE = ch*#
112 CHAPSUF = cmm#
113 APPSUF = amm#
114
115 LEGALCHAP = $(BASE).$(CHAPSUF)
116 LEGALAPP = $(BASE).$(APPSUF)
117 RELNOTES = find . \( -name '$(LEGALCHAP)' -o -name '$(LEGALAPP)' \) -print \
118 | sed -e 's/^..//' -e '/\//d' | sort
119
120 TCFILES = ToC/TC.start ToC/ch*.TC ToC/TC.end
121
122 MMFILES = `$(RELNOTES)`
123
124 IXFILES = Index/ch*.IX
125
126 CHAP_PP = pic $(CHAPHEAD) $? | tbl
127 APP_PP = pic $(APPDXHEAD) $? | tbl
128
129 # these should to be macros, so they can be overridden
130 # psview is for 3.3 systems; xpsview for 4.0
131 PSVIEWOPTS = -F1.2 -0,2-6,11
132 PSVIEW = psview
133 # this scale and geom works to show 6x9 pages on a 1280x1024
134 # display.
135 XPSVIEWOPTS = -wp -skipc -sc 1.1 -maxp 1200000 -geom 800x1020 -
136 XPSVIEW = xpsview
137
138 # this can be used under X for previewing
139 DITVIEW = xditview -geom 640x950 -
140