Explicitly request literal mode after .Xr.
[netbsd-mini2440.git] / gnu / usr.bin / groff / Makefile.inc
blobcfae9ee5b1a55c3d0639de0f32082520ed7f176c
1 # $NetBSD: Makefile.inc,v 1.16 2006/06/02 22:16:23 mrg Exp $
3 # $FreeBSD: src/gnu/usr.bin/groff/Makefile.inc,v 2.7 2003/05/01 13:22:18 ru Exp $
5 BINDIR?=        /usr/bin
6 ECHO=           echo
8 # Define `page' to be letter if your PostScript printer uses 8.5x11
9 # paper (USA) and define it to be A4, if it uses A4 paper (rest of the
10 # world).
11 PAGE=letter
13 # Normally the Postscript driver, grops, produces output that conforms
14 # to version 3.0 of the Adobe Document Structuring Conventions.
15 # Unfortunately some spoolers and previewers can't handle such output.
16 # The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
17 # make its output acceptable to such programs.  This variable controls
18 # only the default behaviour of grops; the behaviour can be changed at
19 # runtime by the grops -b option (and so by groff -P-b).
21 # Use a value of 0 if your spoolers and previewers are able to handle
22 # conforming PostScript correctly.
24 # Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
25 # this is needed for early versions of TranScript that get confused by
26 # anything between the %%EndProlog line and the first %%Page: comment.
28 # Add 2 if lines in included files beginning with %! should be
29 # stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
31 # Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
32 # stripped out of included files; this is needed for spoolers that
33 # don't understand the %%{Begin,End}Document comments. I suspect this
34 # includes early versions of TranScript.
36 # Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
37 # rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
38 # with a printer that requires page reversal.
40 BROKEN_SPOOLER_FLAGS=0
42 # DEVICE is the default device.
43 DEVICE=ps
45 # PSPRINT is the command to use for printing a PostScript file,
46 # for example `lpr'.
47 PSPRINT=lpr
49 # DVIPRINT is the command to use for printing a TeX dvi file,
50 # for example `lpr -d'.
51 DVIPRINT=lpr -d
52 ########################################################################
53 # Don't touch...
56 tmac_s_prefix=
57 tmac_m_prefix=
58 tmac_an_prefix=
59 fontdir=/usr/share/groff_font
60 localfontdir=$(fontdir)
61 legacyfontdir=$(fontdir)
62 tmacdir=/usr/share/tmac
63 systemtmacdir=/usr/share/tmac
64 localtmacdir=/usr/share/tmac
65 docdir=/usr/src/contrib/groff/doc
66 exampledir=XXX
67 htmldocdir=XXX
68 pdfdocdir=XXX
69 indexext=.i
70 common_words_file=/usr/share/dict/eign
71 indexdir=/usr/share/dict/papers
72 indexname=Ind
74 ########################################################################
75 # Libraries
77 .include <bsd.own.mk>
79 .ifndef LIBGROFF
80 LIBGROFFDIR!=cd ${NETBSDSRCDIR}/gnu/usr.bin/groff/src/libs/libgroff && ${PRINTOBJDIR}
81 LIBDRIVERDIR!=cd ${NETBSDSRCDIR}/gnu/usr.bin/groff/src/libs/libdriver && ${PRINTOBJDIR}
82 LIBBIBDIR!=cd ${NETBSDSRCDIR}/gnu/usr.bin/groff/src/libs/libbib && ${PRINTOBJDIR}
84 LIBGROFF=       ${LIBGROFFDIR}/libgroff.a
85 LIBDRIVER=      ${LIBDRIVERDIR}/libdriver.a
86 LIBBIB=         ${LIBBIBDIR}/libbib.a
87 .endif
89 CFLAGS+=        -DHAVE_CONFIG_H
90 CFLAGS+=        -I${GROFF_DIST}/src/include -I${NETBSDSRCDIR}/gnu/usr.bin/groff/src/include
91 CXXFLAGS+=      -fno-rtti -fno-exceptions
93 # We only need -lsupc++
94 USE_LIBSTDCXX=  no
97 .ifdef GROFFYSRCS
98 YFLAGS+=        -d
99 SRCS+=          ${GROFFYSRCS:.y=.cpp}
100 DPSRCS+=        ${GROFFYSRCS:.y=.cpp}
101 CLEANFILES+=    ${GROFFYSRCS:.y=.cpp} ${GROFFYSRCS:.y=_tab.h}
102 .endif
104 .y.cpp:
105         ${_MKTARGET_YACC}
106         ${YACC.y} -o ${.TARGET} ${.IMPSRC}
107         mv -f ${.PREFIX}.h ${.PREFIX}_tab.h
110 .SUFFIXES: .man .1 .2 .3 .4 .5 .6 .7 .8
112 version=`cat $(GROFF_DIST)/VERSION`
113 revision=`${TOOL_SED} -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' \
114                 $(GROFF_DIST)/REVISION`
116 .man.8 .man.7 .man.6 .man.5 .man.4 .man.3 .man.2 .man.1:
117         ${_MKTARGET_CREATE}
118         rm -f $@
119         ${TOOL_SED} -e "s;@BINDIR@;${BINDIR};g" \
120         -e "s;@FONTDIR@;$(fontdir);g" \
121         -e "s;@LOCALFONTDIR@;$(localfontdir);g" \
122         -e "s;@LEGACYFONTDIR@;$(legacyfontdir);g" \
123         -e "s;@MACRODIR@;$(tmacdir);g" \
124         -e "s;@SYSTEMMACRODIR@;$(systemtmacdir);g" \
125         -e "s;@LOCALMACRODIR@;$(localtmacdir);g" \
126         -e "s;@DOCDIR@;$(docdir);g" \
127         -e "s;@EXAMPLEDIR@;$(exampledir);g" \
128         -e "s;@HTMLDOCDIR@;$(htmldocdir);g" \
129         -e "s;@PDFDOCDIR@;$(pdfdocdir);g" \
130         -e "s;@DEVICE@;$(DEVICE);g" \
131         -e "s;@DEFAULT_INDEX@;$(indexdir)/$(indexname);g" \
132         -e "s;@DEFAULT_INDEX_NAME@;$(indexname);g" \
133         -e "s;@INDEX_SUFFIX@;$(indexext);g" \
134         -e "s;@COMMON_WORDS_FILE@;$(common_words_file);g" \
135         -e "s;@MAN1EXT@;1;g" \
136         -e "s;@MAN5EXT@;5;g" \
137         -e "s;@MAN7EXT@;7;g" \
138         -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \
139         -e "s;@TMAC_M_PREFIX@;$(tmac_m_prefix);g" \
140         -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \
141         -e "s;@TMAC_MDIR@;$(tmacdir)/mm;g" \
142         -e "s;@BROKEN_SPOOLER_FLAGS@;$(BROKEN_SPOOLER_FLAGS);g" \
143         -e "s;@VERSION@;$(version)$(revision);g" \
144         -e "s;@MDATE@;`${HOST_SH} ${GROFF_DIST}/mdate.sh $<`;g" \
145         -e "s;@g@;$(g);g" \
146         -e "s;@G@;`echo $(g) | LC_ALL=C tr [a-z] [A-Z]`;g" \
147         $< >$@
149 .SUFFIXES: .sh .pl
151 .sh .pl:
152         ${_MKTARGET_CREATE}
153         rm -f $@
154         ${TOOL_SED} -e "s|@BINDIR@|${BINDIR}|g" \
155              -e "s;@FONTDIR@;$(fontdir);g" \
156              -e 's|@GROFF_BIN_PATH_SETUP@|GROFF_RUNTIME="$${GROFF_BIN_PATH=/usr/bin}:"|g' \
157              -e "s|@SEP@|:|" \
158              -e "s|@VERSION@|$(version)$(revision)|" \
159              -e "s|@g@|$(g)|g" \
160              ${.IMPSRC} >${.TARGET}
162 GROFF_DIST=     ${NETBSDSRCDIR}/gnu/dist/groff
163 DIST_SUBDIR?=   ${.CURDIR:T}
164 DIST_DIR=       ${GROFF_DIST}/${DIST_SUBDIR}
165 .PATH: ${DIST_DIR}