Deleted Added
full compact
Makefile.inc (75592) Makefile.inc (104869)
1# $FreeBSD: head/gnu/usr.bin/groff/Makefile.inc 75592 2001-04-17 12:37:18Z ru $
1# $FreeBSD: head/gnu/usr.bin/groff/Makefile.inc 104869 2002-10-11 08:58:14Z ru $
2
3BINDIR?= /usr/bin
4SHELL= /bin/sh
5
6# Define `page' to be letter if your PostScript printer uses 8.5x11
7# paper (USA) and define it to be A4, if it uses A4 paper (rest of the
8# world).
9PAGE=letter
10
11# Normally the Postscript driver, grops, produces output that conforms
12# to version 3.0 of the Adobe Document Structuring Conventions.
13# Unfortunately some spoolers and previewers can't handle such output.
14# The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
15# make its output acceptable to such programs. This variable controls
16# only the default behaviour of grops; the behaviour can be changed at
17# runtime by the grops -b option (and so by groff -P-b).
18# Use a value of 0 if your spoolers and previewers are able to handle
19# conforming PostScript correctly.
20# Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
21# this is needed for early versions of TranScript that get confused by
22# anything between the %%EndProlog line and the first %%Page: comment.
23# Add 2 if lines in included files beginning with %! should be
24# stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
25# Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
26# stripped out of included files; this is needed for spoolers that
27# don't understand the %%{Begin,End}Document comments. I suspect this
28# includes early versions of TranScript.
29# Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
30# rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
31# with a printer that requires page reversal.
32BROKEN_SPOOLER_FLAGS=7
33
34# DEVICE is the default device.
35DEVICE=ps
36
37# PSPRINT is the command to use for printing a PostScript file,
38# for example `lpr'.
39PSPRINT=lpr
40
41# DVIPRINT is the command to use for printing a TeX dvi file,
42# for example `lpr -d'.
43DVIPRINT=lpr -d
44########################################################################
45# Don't touch...
46
47g=
48tmac_s_prefix=
49tmac_m_prefix=
50tmac_an_prefix=
51fontdir=/usr/share/groff_font
2
3BINDIR?= /usr/bin
4SHELL= /bin/sh
5
6# Define `page' to be letter if your PostScript printer uses 8.5x11
7# paper (USA) and define it to be A4, if it uses A4 paper (rest of the
8# world).
9PAGE=letter
10
11# Normally the Postscript driver, grops, produces output that conforms
12# to version 3.0 of the Adobe Document Structuring Conventions.
13# Unfortunately some spoolers and previewers can't handle such output.
14# The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
15# make its output acceptable to such programs. This variable controls
16# only the default behaviour of grops; the behaviour can be changed at
17# runtime by the grops -b option (and so by groff -P-b).
18# Use a value of 0 if your spoolers and previewers are able to handle
19# conforming PostScript correctly.
20# Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
21# this is needed for early versions of TranScript that get confused by
22# anything between the %%EndProlog line and the first %%Page: comment.
23# Add 2 if lines in included files beginning with %! should be
24# stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
25# Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
26# stripped out of included files; this is needed for spoolers that
27# don't understand the %%{Begin,End}Document comments. I suspect this
28# includes early versions of TranScript.
29# Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
30# rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
31# with a printer that requires page reversal.
32BROKEN_SPOOLER_FLAGS=7
33
34# DEVICE is the default device.
35DEVICE=ps
36
37# PSPRINT is the command to use for printing a PostScript file,
38# for example `lpr'.
39PSPRINT=lpr
40
41# DVIPRINT is the command to use for printing a TeX dvi file,
42# for example `lpr -d'.
43DVIPRINT=lpr -d
44########################################################################
45# Don't touch...
46
47g=
48tmac_s_prefix=
49tmac_m_prefix=
50tmac_an_prefix=
51fontdir=/usr/share/groff_font
52fontpath=$(fontdir)
52localfontdir=$(fontdir)
53legacyfontdir=$(fontdir)
53tmacdir=/usr/share/tmac
54systemtmacdir=/usr/share/tmac
55localtmacdir=/usr/share/tmac
54tmacdir=/usr/share/tmac
55systemtmacdir=/usr/share/tmac
56localtmacdir=/usr/share/tmac
56tmacpath=$(tmacdir)
57docdir=/usr/src/contrib/groff/doc
58exampledir=XXX
59htmldocdir=XXX
57indexext=.i
58common_words_file=/usr/share/dict/eign
59indexdir=/usr/share/dict/papers
60indexname=Ind
61
62########################################################################
63# Libraries
64
65# Bad assumption, if one exists they all exist
66.if exists(${.OBJDIR}/${TOPREL}/src/libs/libgroff)
67LIBGROFF= ${.OBJDIR}/${TOPREL}/src/libs/libgroff/libgroff.a
68LIBDRIVER= ${.OBJDIR}/${TOPREL}/src/libs/libdriver/libdriver.a
69LIBBIB= ${.OBJDIR}/${TOPREL}/src/libs/libbib/libbib.a
70.else
71LIBGROFF= ${.CURDIR}/${TOPREL}/src/libs/libgroff/libgroff.a
72LIBDRIVER= ${.CURDIR}/${TOPREL}/src/libs/libdriver/libdriver.a
73LIBBIB= ${.CURDIR}/${TOPREL}/src/libs/libbib/libbib.a
74.endif
75
60indexext=.i
61common_words_file=/usr/share/dict/eign
62indexdir=/usr/share/dict/papers
63indexname=Ind
64
65########################################################################
66# Libraries
67
68# Bad assumption, if one exists they all exist
69.if exists(${.OBJDIR}/${TOPREL}/src/libs/libgroff)
70LIBGROFF= ${.OBJDIR}/${TOPREL}/src/libs/libgroff/libgroff.a
71LIBDRIVER= ${.OBJDIR}/${TOPREL}/src/libs/libdriver/libdriver.a
72LIBBIB= ${.OBJDIR}/${TOPREL}/src/libs/libbib/libbib.a
73.else
74LIBGROFF= ${.CURDIR}/${TOPREL}/src/libs/libgroff/libgroff.a
75LIBDRIVER= ${.CURDIR}/${TOPREL}/src/libs/libdriver/libdriver.a
76LIBBIB= ${.CURDIR}/${TOPREL}/src/libs/libbib/libbib.a
77.endif
78
76CFLAGS+= -DHAVE_STDLIB_H=1\
77 -DHAVE_UNISTD_H=1\
78 -DHAVE_DIRENT_H=1\
79 -DHAVE_LIMITS_H=1\
80 -DHAVE_STRING_H=1\
81 -DHAVE_STRINGS_H=1\
82 -DHAVE_MATH_H=1\
83 -DRET_TYPE_SRAND_IS_VOID=1\
84 -DHAVE_SYS_NERR=1\
85 -DHAVE_SYS_ERRLIST=1\
86 -DHAVE_CC_LIMITS_H=1\
87 -DRETSIGTYPE=void\
88 -DHAVE_STRUCT_EXCEPTION=1\
89 -DHAVE_GETPAGESIZE=1\
90 -DHAVE_MMAP=1\
91 -DHAVE_FMOD=1\
92 -DHAVE_STRTOL=1\
93 -DHAVE_GETCWD=1\
94 -DHAVE_STRERROR=1\
95 -DHAVE_PUTENV=1\
96 -DHAVE_RENAME=1\
97 -DHAVE_MKSTEMP=1\
98 -DHAVE_STRCASECMP=1\
99 -DHAVE_STRNCASECMP=1\
100 -DHAVE_STRSEP=1\
101 -DHAVE_STRDUP=1\
102 -DSYS_SIGLIST_DECLARED=1
103
79CFLAGS+= -DHAVE_CONFIG_H
104CFLAGS+= -I${GROFF_DIST}/src/include -I${.CURDIR}/${TOPREL}/src/include
105CXXFLAGS+= -fno-rtti -fno-exceptions
106
107.y.o:
108 $(YACC) $(YFLAGS) $(.IMPSRC)
109 mv -f y.tab.c $(.PREFIX).cc
110 mv -f y.tab.h $(.PREFIX)_tab.h
111 ${CXX} ${CXXFLAGS} -c $(.PREFIX).cc -o ${.TARGET}
112
113.y.cc:
114 $(YACC) $(YFLAGS) $(.IMPSRC)
115 mv -f y.tab.c $(.PREFIX).cc
116 mv -f y.tab.h $(.PREFIX)_tab.h
117
118.SUFFIXES: .man .1 .2 .3 .4 .5 .6 .7 .8
119
120version=`cat $(GROFF_DIST)/VERSION`
121revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(GROFF_DIST)/REVISION`
122
123.man.8 .man.7 .man.6 .man.5 .man.4 .man.3 .man.2 .man.1:
124 @${ECHO} Making $@ from $<
125 @-rm -f $@
126 @sed -e "s;@BINDIR@;${BINDIR};g" \
127 -e "s;@FONTDIR@;$(fontdir);g" \
80CFLAGS+= -I${GROFF_DIST}/src/include -I${.CURDIR}/${TOPREL}/src/include
81CXXFLAGS+= -fno-rtti -fno-exceptions
82
83.y.o:
84 $(YACC) $(YFLAGS) $(.IMPSRC)
85 mv -f y.tab.c $(.PREFIX).cc
86 mv -f y.tab.h $(.PREFIX)_tab.h
87 ${CXX} ${CXXFLAGS} -c $(.PREFIX).cc -o ${.TARGET}
88
89.y.cc:
90 $(YACC) $(YFLAGS) $(.IMPSRC)
91 mv -f y.tab.c $(.PREFIX).cc
92 mv -f y.tab.h $(.PREFIX)_tab.h
93
94.SUFFIXES: .man .1 .2 .3 .4 .5 .6 .7 .8
95
96version=`cat $(GROFF_DIST)/VERSION`
97revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(GROFF_DIST)/REVISION`
98
99.man.8 .man.7 .man.6 .man.5 .man.4 .man.3 .man.2 .man.1:
100 @${ECHO} Making $@ from $<
101 @-rm -f $@
102 @sed -e "s;@BINDIR@;${BINDIR};g" \
103 -e "s;@FONTDIR@;$(fontdir);g" \
128 -e "s;@FONTPATH@;$(fontpath);g" \
104 -e "s;@LOCALFONTDIR@;$(localfontdir);g" \
105 -e "s;@LEGACYFONTDIR@;$(legacyfontdir);g" \
129 -e "s;@MACRODIR@;$(tmacdir);g" \
130 -e "s;@SYSTEMMACRODIR@;$(systemtmacdir);g" \
131 -e "s;@LOCALMACRODIR@;$(localtmacdir);g" \
106 -e "s;@MACRODIR@;$(tmacdir);g" \
107 -e "s;@SYSTEMMACRODIR@;$(systemtmacdir);g" \
108 -e "s;@LOCALMACRODIR@;$(localtmacdir);g" \
132 -e "s;@MACROPATH@;$(tmacpath);g" \
109 -e "s;@DOCDIR@;$(docdir);g" \
110 -e "s;@EXAMPLEDIR@;$(exampledir);g" \
111 -e "s;@HTMLDOCDIR@;$(htmldocdir);g" \
133 -e "s;@DEVICE@;$(DEVICE);g" \
134 -e "s;@DEFAULT_INDEX@;$(indexdir)/$(indexname);g" \
135 -e "s;@DEFAULT_INDEX_NAME@;$(indexname);g" \
136 -e "s;@INDEX_SUFFIX@;$(indexext);g" \
137 -e "s;@COMMON_WORDS_FILE@;$(common_words_file);g" \
138 -e "s;@MAN1EXT@;1;g" \
139 -e "s;@MAN5EXT@;5;g" \
140 -e "s;@MAN7EXT@;7;g" \
141 -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \
142 -e "s;@TMAC_M_PREFIX@;$(tmac_m_prefix);g" \
143 -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \
144 -e "s;@TMAC_MDIR@;$(tmacdir)/mm;g" \
145 -e "s;@BROKEN_SPOOLER_FLAGS@;$(BROKEN_SPOOLER_FLAGS);g" \
146 -e "s;@VERSION@;$(version)$(revision);g" \
147 -e "s;@MDATE@;`$(SHELL) ${GROFF_DIST}/mdate.sh $<`;g" \
148 -e "s;@g@;$(g);g" \
149 -e "s;@G@;`echo $(g) | tr [a-z] [A-Z]`;g" \
150 $< >$@
151
152.SUFFIXES: .sh .pl
153
154.sh .pl:
155 @${ECHO} Making ${.TARGET} from ${.IMPSRC}
156 @sed -e "s|@BINDIR@|${BINDIR}|g" \
157 -e "s|@VERSION@|$(version)$(revision)|" \
158 -e "s|@g@|$(g)|g" \
159 ${.IMPSRC} >${.TARGET}
160
161TOPREL?= ..
162GROFF_DIST= ${.CURDIR}/${TOPREL}/../../../contrib/groff
163DIST_SUBDIR?= ${.CURDIR:T}
164DIST_DIR= ${GROFF_DIST}/${DIST_SUBDIR}
165.PATH: ${DIST_DIR}
112 -e "s;@DEVICE@;$(DEVICE);g" \
113 -e "s;@DEFAULT_INDEX@;$(indexdir)/$(indexname);g" \
114 -e "s;@DEFAULT_INDEX_NAME@;$(indexname);g" \
115 -e "s;@INDEX_SUFFIX@;$(indexext);g" \
116 -e "s;@COMMON_WORDS_FILE@;$(common_words_file);g" \
117 -e "s;@MAN1EXT@;1;g" \
118 -e "s;@MAN5EXT@;5;g" \
119 -e "s;@MAN7EXT@;7;g" \
120 -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \
121 -e "s;@TMAC_M_PREFIX@;$(tmac_m_prefix);g" \
122 -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \
123 -e "s;@TMAC_MDIR@;$(tmacdir)/mm;g" \
124 -e "s;@BROKEN_SPOOLER_FLAGS@;$(BROKEN_SPOOLER_FLAGS);g" \
125 -e "s;@VERSION@;$(version)$(revision);g" \
126 -e "s;@MDATE@;`$(SHELL) ${GROFF_DIST}/mdate.sh $<`;g" \
127 -e "s;@g@;$(g);g" \
128 -e "s;@G@;`echo $(g) | tr [a-z] [A-Z]`;g" \
129 $< >$@
130
131.SUFFIXES: .sh .pl
132
133.sh .pl:
134 @${ECHO} Making ${.TARGET} from ${.IMPSRC}
135 @sed -e "s|@BINDIR@|${BINDIR}|g" \
136 -e "s|@VERSION@|$(version)$(revision)|" \
137 -e "s|@g@|$(g)|g" \
138 ${.IMPSRC} >${.TARGET}
139
140TOPREL?= ..
141GROFF_DIST= ${.CURDIR}/${TOPREL}/../../../contrib/groff
142DIST_SUBDIR?= ${.CURDIR:T}
143DIST_DIR= ${GROFF_DIST}/${DIST_SUBDIR}
144.PATH: ${DIST_DIR}