bsd.doc.mk (d2893b161bbea64e099654c0dd78073cfb5667b0) bsd.doc.mk (b382ba4fb114aa213e4f3599b9f15fd3f14f82fb)
1# from: @(#)bsd.doc.mk 5.3 (Berkeley) 1/2/91
2# $FreeBSD$
3#
4# The include file <bsd.doc.mk> handles installing BSD troff documents.
5#
6#
7# +++ variables +++
8#

--- 12 unchanged lines hidden (view full) ---

21BIB?= bib
22EQN?= eqn -T${PRINTERDEVICE}
23GREMLIN?= grn
24GRIND?= vgrind -f
25INDXBIB?= indxbib
26PIC?= pic
27REFER?= refer
28.if ${PRINTERDEVICE} == "ascii"
1# from: @(#)bsd.doc.mk 5.3 (Berkeley) 1/2/91
2# $FreeBSD$
3#
4# The include file <bsd.doc.mk> handles installing BSD troff documents.
5#
6#
7# +++ variables +++
8#

--- 12 unchanged lines hidden (view full) ---

21BIB?= bib
22EQN?= eqn -T${PRINTERDEVICE}
23GREMLIN?= grn
24GRIND?= vgrind -f
25INDXBIB?= indxbib
26PIC?= pic
27REFER?= refer
28.if ${PRINTERDEVICE} == "ascii"
29ROFF?= groff -mtty-char ${TRFLAGS} ${MACROS} -o${PAGES}
29ROFF?= groff -mtty-char ${TRFLAGS} ${MACROS} -o${PAGES}
30.else
31ROFF?= groff ${TRFLAGS} ${MACROS} -o${PAGES}
32.endif
33SOELIM?= soelim
30.else
31ROFF?= groff ${TRFLAGS} ${MACROS} -o${PAGES}
32.endif
33SOELIM?= soelim
34SOELIMPP= sed ${SOELIMPPARGS}
35SOELIMPPARGS0= ${SRCS} ${EXTRA}
36SOELIMPPARGS1= ${SOELIMPPARGS0:S/^/-e\\ \'s:\(\.so[\\ \\ ][\\ \\ ]*\)\(/}
37SOELIMPPARGS2= ${SOELIMPPARGS1:S/$/\)\$:\1${SRCDIR}\/\2:\'/}
38SOELIMPPARGS= ${SOELIMPPARGS2:S/\\'/'/g}
39TBL?= tbl
40
41DOC?= paper
42LPR?= lpr
43
44TRFLAGS+= -T${PRINTERDEVICE}
45.if defined(USE_EQN)
46TRFLAGS+= -e
47.endif
34TBL?= tbl
35
36DOC?= paper
37LPR?= lpr
38
39TRFLAGS+= -T${PRINTERDEVICE}
40.if defined(USE_EQN)
41TRFLAGS+= -e
42.endif
48.if defined(USE_TBL)
49TRFLAGS+= -t
50.endif
51.if defined(USE_PIC)
52TRFLAGS+= -p
53.endif
43.if defined(USE_PIC)
44TRFLAGS+= -p
45.endif
54.if defined(USE_SOELIM)
55TRFLAGS+= -s
56.endif
57.if defined(USE_REFER)
58TRFLAGS+= -R
59.endif
46.if defined(USE_REFER)
47TRFLAGS+= -R
48.endif
49.if defined(USE_SOELIM)
50TRFLAGS+= -I${SRCDIR}
51.endif
52.if defined(USE_TBL)
53TRFLAGS+= -t
54.endif
60
61DCOMPRESS_EXT?= ${COMPRESS_EXT}
62.if defined(NODOCCOMPRESS) || ${PRINTERDEVICE} == "html"
55
56DCOMPRESS_EXT?= ${COMPRESS_EXT}
57.if defined(NODOCCOMPRESS) || ${PRINTERDEVICE} == "html"
63DFILE= ${DOC}.${PRINTERDEVICE}
64DCOMPRESS_CMD= cat
58DFILE= ${DOC}.${PRINTERDEVICE}
65.else
59.else
66DFILE= ${DOC}.${PRINTERDEVICE}${DCOMPRESS_EXT}
60DFILE= ${DOC}.${PRINTERDEVICE}${DCOMPRESS_EXT}
67DCOMPRESS_CMD?= ${COMPRESS_CMD}
68.endif
69
70PAGES?= 1-
71
72UNROFF?= unroff
73HTML_SPLIT?= yes
74UNROFFFLAGS?= -fhtml
75.if ${HTML_SPLIT} == "yes"
76UNROFFFLAGS+= split=1
77.endif
78
79# Compatibility mode flag for groff. Use this when formatting documents with
61DCOMPRESS_CMD?= ${COMPRESS_CMD}
62.endif
63
64PAGES?= 1-
65
66UNROFF?= unroff
67HTML_SPLIT?= yes
68UNROFFFLAGS?= -fhtml
69.if ${HTML_SPLIT} == "yes"
70UNROFFFLAGS+= split=1
71.endif
72
73# Compatibility mode flag for groff. Use this when formatting documents with
80# Berkeley me macros.
74# Berkeley me macros (orig_me(7)).
81COMPAT?= -C
82
83.PATH: ${.CURDIR} ${SRCDIR}
84
75COMPAT?= -C
76
77.PATH: ${.CURDIR} ${SRCDIR}
78
85all: ${DFILE}
79all: ${DFILE}
86
87.if !target(print)
88print: ${DFILE}
89.if defined(NODOCCOMPRESS)
90 ${LPR} ${DFILE}
91.else
92 ${DCOMPRESS_CMD} -d ${DFILE} | ${LPR}
93.endif

--- 4 unchanged lines hidden (view full) ---

98.endif
99CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \
100 ${DOC}.ps ${DOC}.ps${DCOMPRESS_EXT} \
101 ${DOC}.html ${DOC}-*.html
102
103realinstall:
104.if ${PRINTERDEVICE} == "html"
105 cd ${SRCDIR}; \
80
81.if !target(print)
82print: ${DFILE}
83.if defined(NODOCCOMPRESS)
84 ${LPR} ${DFILE}
85.else
86 ${DCOMPRESS_CMD} -d ${DFILE} | ${LPR}
87.endif

--- 4 unchanged lines hidden (view full) ---

92.endif
93CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${DCOMPRESS_EXT} \
94 ${DOC}.ps ${DOC}.ps${DCOMPRESS_EXT} \
95 ${DOC}.html ${DOC}-*.html
96
97realinstall:
98.if ${PRINTERDEVICE} == "html"
99 cd ${SRCDIR}; \
106 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
107 ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
100 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
101 ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME}
108.else
109 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
102.else
103 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
110 ${DFILE} ${DESTDIR}${BINDIR}/${VOLUME}
104 ${DFILE} ${DESTDIR}${BINDIR}/${VOLUME}
111.endif
112
113spell: ${SRCS}
105.endif
106
107spell: ${SRCS}
114 (cd ${.CURDIR}; spell ${SRCS} ) | sort | \
108 (cd ${.CURDIR}; spell ${SRCS} ) | sort | \
115 comm -23 - ${.CURDIR}/spell.ok > ${DOC}.spell
116
117BINDIR?= /usr/share/doc
109 comm -23 - ${.CURDIR}/spell.ok > ${DOC}.spell
110
111BINDIR?= /usr/share/doc
118BINMODE= 444
112BINMODE= 444
119
120SRCDIR?= ${.CURDIR}
121
122.if !target(${DFILE})
113
114SRCDIR?= ${.CURDIR}
115
116.if !target(${DFILE})
123_stamp.extraobjs: ${EXTRA} ${OBJS}
117.if defined(EXTRA) && !empty(EXTRA)
118_stamp.extra: ${EXTRA}
124 touch ${.TARGET}
119 touch ${.TARGET}
125CLEANFILES+= _stamp.extraobjs
126${DFILE}: ${SRCS} _stamp.extraobjs
120CLEANFILES+= _stamp.extra
121${DFILE}: _stamp.extra
122.endif
123${DFILE}: ${SRCS}
127.if ${PRINTERDEVICE} == "html"
128 cd ${SRCDIR}; ${UNROFF} ${MACROS} ${UNROFFFLAGS} \
129 document=${DOC} ${SRCS}
124.if ${PRINTERDEVICE} == "html"
125 cd ${SRCDIR}; ${UNROFF} ${MACROS} ${UNROFFFLAGS} \
126 document=${DOC} ${SRCS}
130.elif defined(USE_SOELIMPP)
131 ${SOELIMPP} ${.ALLSRC:N_stamp.extraobjs} | ${ROFF} | \
132 ${DCOMPRESS_CMD} > ${.TARGET}
127.elif defined(NODOCCOMPRESS)
128.if defined(CD_HACK)
129 (cd ${CD_HACK}; ${ROFF} ${.ALLSRC:N_stamp.extra}) > ${.TARGET}
133.else
130.else
134 (cd ${SRCDIR}; ${ROFF} ${.ALLSRC:N_stamp.extraobjs}) | \
131 ${ROFF} ${.ALLSRC:N_stamp.extra} > ${.TARGET}
132.endif
133.else
134.if defined(CD_HACK)
135 (cd ${CD_HACK}; ${ROFF} ${.ALLSRC:N_stamp.extra}) | \
135 ${DCOMPRESS_CMD} > ${.TARGET}
136 ${DCOMPRESS_CMD} > ${.TARGET}
137.else
138 ${ROFF} ${.ALLSRC:N_stamp.extra} | ${DCOMPRESS_CMD} > ${.TARGET}
136.endif
137.endif
139.endif
140.endif
141.endif
138
139DISTRIBUTION?= doc
140
141.include <bsd.obj.mk>
142
143DISTRIBUTION?= doc
144
145.include <bsd.obj.mk>