freebsd-dev/gnu/usr.bin/groff/Makefile.cfg

130 lines
4.2 KiB
Makefile
Raw Normal View History

1995-01-15 09:06:50 +00:00
BINDIR?= /usr/bin
SHAREDIR?= /usr/share
1995-02-23 05:48:38 +00:00
SHELL= /bin/sh
1995-01-15 09:06:50 +00:00
1995-01-15 08:30:25 +00:00
# Define `page' to be letter if your PostScript printer uses 8.5x11
# paper (USA) and define it to be A4, if it uses A4 paper (rest of the
# world).
PAGE=letter
# Normally the Postscript driver, grops, produces output that conforms
# to version 3.0 of the Adobe Document Structuring Conventions.
# Unfortunately some spoolers and previewers can't handle such output.
# The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to
# make its output acceptable to such programs. This variable controls
# only the default behaviour of grops; the behaviour can be changed at
# runtime by the grops -b option (and so by groff -P-b).
# Use a value of 0 if your spoolers and previewers are able to handle
# conforming PostScript correctly.
# Add 1 if no %%{Begin,End}DocumentSetup comments should be generated;
# this is needed for early versions of TranScript that get confused by
# anything between the %%EndProlog line and the first %%Page: comment.
# Add 2 if lines in included files beginning with %! should be
# stripped out; this is needed for the OpenWindows 2.0 pageview previewer.
# Add 4 if %%Page, %%Trailer and %%EndProlog comments should be
# stripped out of included files; this is needed for spoolers that
# don't understand the %%{Begin,End}Document comments. I suspect this
# includes early versions of TranScript.
# Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0
# rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint
# with a printer that requires page reversal.
BROKEN_SPOOLER_FLAGS=7
# PSPRINT is the command to use for printing a PostScript file,
# for example `lpr'.
PSPRINT=lpr
# DVIPRINT is the command to use for printing a TeX dvi file,
# for example `lpr -d'.
DVIPRINT=lpr -d
########################################################################
# Don't touch...
g=
device=ps
fontdir=/usr/share/groff_font
fontpath=$(fontdir)
tmacdir=/usr/share/tmac
tmacpath=$(tmacdir)
indexext=.i
common_words_file=/usr/share/dict/eign
indexdir=/usr/share/dict/papers
indexname=Ind
########################################################################
# Libraries
# Bad assumption, if one exists they all exist
.if exists(${.CURDIR}/../libgroff/obj)
LIBGROFF= $(.CURDIR)/../libgroff/obj/libgroff.a
LIBDRIVER= $(.CURDIR)/../libdriver/obj/libdriver.a
LIBBIB= $(.CURDIR)/../libbib/obj/libbib.a
.else
LIBGROFF= $(.CURDIR)/../libgroff/libgroff.a
LIBDRIVER= $(.CURDIR)/../libdriver/libdriver.a
LIBBIB= $(.CURDIR)/../libbib/libbib.a
.endif
DEFINES= -DHAVE_UNISTD_H=1\
-DHAVE_DIRENT_H=1\
-DHAVE_LIMITS_H=1\
-DHAVE_STDLIB_H=1\
-DHAVE_SYS_DIR_H=1\
-DHAVE_CC_LIMITS_H=1\
-DHAVE_CC_UNISTD_H=1\
-DSTDLIB_H_DECLARES_GETOPT=1\
-DUNISTD_H_DECLARES_GETOPT=1\
-DSTDLIB_H_DECLARES_PUTENV=1\
-DSTDIO_H_DECLARES_POPEN=1\
-DSTDIO_H_DECLARE_PCLOSE=1\
-DRETSIGTYPE=void\
-DHAVE_MMAP=1\
-DHAVE_RENAME=1\
-DHAVE_MKSTEMP=1\
-DHAVE_SYS_SIGLIST=1
CFLAGS+=$(DEFINES)
.y.o:
$(YACC) $(YFLAGS) $(.IMPSRC)
mv y.tab.c $(.PREFIX).cc
mv y.tab.h $(.PREFIX).tab.h
${CXX} ${CXXFLAGS} -c $(.PREFIX).cc -o ${.TARGET}
.y.cc:
$(YACC) $(YFLAGS) $(.IMPSRC)
mv y.tab.c $(.PREFIX).cc
mv y.tab.h $(.PREFIX).tab.h
.SUFFIXES: .man .1 .2 .3 .4 .5 .6 .7 .8
#.8.man .7.man .6.man .5.man .4.man .3.man .2.man .1.man:
.man.8 .man.7 .man.6 .man.5 .man.4 .man.3 .man.2 .man.1:
1995-02-08 20:12:08 +00:00
@${ECHO} Making $@ from $<
1995-01-15 08:30:25 +00:00
@-rm -f $@
@sed -e "s;@FONTDIR@;$(fontdir);g" \
-e "s;@FONTPATH@;$(fontpath);g" \
-e "s;@MACRODIR@;$(tmacdir);g" \
-e "s;@MACROPATH@;$(tmacpath);g" \
-e "s;@DEVICE@;$(DEVICE);g" \
-e "s;@DEFAULT_INDEX@;$(indexdir)/$(indexname);g" \
-e "s;@DEFAULT_INDEX_NAME@;$(indexname);g" \
-e "s;@INDEX_SUFFIX@;$(indexext);g" \
-e "s;@COMMON_WORDS_FILE@;$(common_words_file);g" \
-e "s;@MAN1EXT@;1;g" \
-e "s;@MAN5EXT@;5;g" \
-e "s;@MAN7EXT@;7;g" \
-e "s;@TMAC_S@;$(tmac_s);g" \
-e "s;@TMAC_M@;$(tmac_m);g" \
-e "s;@TMAC_MDIR@;$(tmacdir)/mm;g" \
-e "s;@BROKEN_SPOOLER_FLAGS@;$(BROKEN_SPOOLER_FLAGS);g" \
-e "s;@VERSION@;`cat ${.CURDIR}/../VERSION`;g" \
1995-02-23 05:48:38 +00:00
-e "s;@MDATE@;`$(SHELL) ${.CURDIR}/../mdate.sh $<`;g" \
1995-01-15 08:30:25 +00:00
-e "s;@g@;$(g);g" \
-e "s;@G@;`echo $(g) | tr [a-z] [A-Z]`;g" \
$< >$@
.if exists(${.CURDIR}/obj)
MANSRC=${.CURDIR}/obj
.endif