175020Sru# $FreeBSD: releng/11.0/gnu/usr.bin/groff/Makefile.inc 298107 2016-04-16 07:45:30Z gjb $ 275020Sru 375592SruBINDIR?= /usr/bin 475592SruSHELL= /bin/sh 5298107SgjbPACKAGE= groff 618138Spst 775592Sru# Define `page' to be letter if your PostScript printer uses 8.5x11 875592Sru# paper (USA) and define it to be A4, if it uses A4 paper (rest of the 975592Sru# world). 1075592SruPAGE=letter 1175592Sru 1275592Sru# Normally the Postscript driver, grops, produces output that conforms 1375592Sru# to version 3.0 of the Adobe Document Structuring Conventions. 1475592Sru# Unfortunately some spoolers and previewers can't handle such output. 1575592Sru# The BROKEN_SPOOLER_FLAGS variable tells grops what it should do to 1675592Sru# make its output acceptable to such programs. This variable controls 1775592Sru# only the default behaviour of grops; the behaviour can be changed at 1875592Sru# runtime by the grops -b option (and so by groff -P-b). 1975592Sru# Use a value of 0 if your spoolers and previewers are able to handle 2075592Sru# conforming PostScript correctly. 2175592Sru# Add 1 if no %%{Begin,End}DocumentSetup comments should be generated; 2275592Sru# this is needed for early versions of TranScript that get confused by 2375592Sru# anything between the %%EndProlog line and the first %%Page: comment. 2475592Sru# Add 2 if lines in included files beginning with %! should be 2575592Sru# stripped out; this is needed for the OpenWindows 2.0 pageview previewer. 2675592Sru# Add 4 if %%Page, %%Trailer and %%EndProlog comments should be 2775592Sru# stripped out of included files; this is needed for spoolers that 2875592Sru# don't understand the %%{Begin,End}Document comments. I suspect this 2975592Sru# includes early versions of TranScript. 3075592Sru# Add 8 if the first line of the PostScript output should be %!PS-Adobe-2.0 3175592Sru# rather than %!PS-Adobe-3.0; this is needed when using Sun's Newsprint 3275592Sru# with a printer that requires page reversal. 3375592SruBROKEN_SPOOLER_FLAGS=7 3475592Sru 3575592Sru# DEVICE is the default device. 3675592SruDEVICE=ps 3775592Sru 3875592Sru# PSPRINT is the command to use for printing a PostScript file, 3975592Sru# for example `lpr'. 4075592SruPSPRINT=lpr 4175592Sru 4275592Sru# DVIPRINT is the command to use for printing a TeX dvi file, 4375592Sru# for example `lpr -d'. 4475592SruDVIPRINT=lpr -d 4575592Sru######################################################################## 4675592Sru# Don't touch... 4775592Sru 4875592Srug= 4975592Srutmac_s_prefix= 5075592Srutmac_m_prefix= 5175592Srutmac_an_prefix= 5275592Srufontdir=/usr/share/groff_font 53104869Srulocalfontdir=$(fontdir) 54104869Srulegacyfontdir=$(fontdir) 5575592Srutmacdir=/usr/share/tmac 5675592Srusystemtmacdir=/usr/share/tmac 5775592Srulocaltmacdir=/usr/share/tmac 58104869Srudocdir=/usr/src/contrib/groff/doc 59104869Sruexampledir=XXX 60104869Sruhtmldocdir=XXX 61151504Srupdfdocdir=XXX 6275592Sruindexext=.i 6375592Srucommon_words_file=/usr/share/dict/eign 6475592Sruindexdir=/usr/share/dict/papers 6575592Sruindexname=Ind 6675592Sru 6775592Sru######################################################################## 6875592Sru# Libraries 6975592Sru 7075592SruLIBGROFF= ${.OBJDIR}/${TOPREL}/src/libs/libgroff/libgroff.a 7175592SruLIBDRIVER= ${.OBJDIR}/${TOPREL}/src/libs/libdriver/libdriver.a 7275592SruLIBBIB= ${.OBJDIR}/${TOPREL}/src/libs/libbib/libbib.a 7375592Sru 74104869SruCFLAGS+= -DHAVE_CONFIG_H 7575592SruCFLAGS+= -I${GROFF_DIST}/src/include -I${.CURDIR}/${TOPREL}/src/include 7675592SruCXXFLAGS+= -fno-rtti -fno-exceptions 7775592Sru 7875592Sru.y.o: 7975592Sru $(YACC) $(YFLAGS) $(.IMPSRC) 80114412Sru mv -f y.tab.c $(.PREFIX).cpp 8175592Sru mv -f y.tab.h $(.PREFIX)_tab.h 82114412Sru ${CXX} ${CXXFLAGS} -c $(.PREFIX).cpp -o ${.TARGET} 8375592Sru 84114412Sru.y.cpp: 8575592Sru $(YACC) $(YFLAGS) $(.IMPSRC) 86114412Sru mv -f y.tab.c $(.PREFIX).cpp 8775592Sru mv -f y.tab.h $(.PREFIX)_tab.h 8875592Sru 8975592Sru.SUFFIXES: .man .1 .2 .3 .4 .5 .6 .7 .8 9075592Sru 9175592Sruversion=`cat $(GROFF_DIST)/VERSION` 9275592Srurevision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(GROFF_DIST)/REVISION` 9375592Sru 9475592Sru.man.8 .man.7 .man.6 .man.5 .man.4 .man.3 .man.2 .man.1: 9575592Sru @${ECHO} Making $@ from $< 9675592Sru @-rm -f $@ 9775592Sru @sed -e "s;@BINDIR@;${BINDIR};g" \ 9875592Sru -e "s;@FONTDIR@;$(fontdir);g" \ 99104869Sru -e "s;@LOCALFONTDIR@;$(localfontdir);g" \ 100104869Sru -e "s;@LEGACYFONTDIR@;$(legacyfontdir);g" \ 10175592Sru -e "s;@MACRODIR@;$(tmacdir);g" \ 10275592Sru -e "s;@SYSTEMMACRODIR@;$(systemtmacdir);g" \ 10375592Sru -e "s;@LOCALMACRODIR@;$(localtmacdir);g" \ 104104869Sru -e "s;@DOCDIR@;$(docdir);g" \ 105104869Sru -e "s;@EXAMPLEDIR@;$(exampledir);g" \ 106104869Sru -e "s;@HTMLDOCDIR@;$(htmldocdir);g" \ 107151504Sru -e "s;@PDFDOCDIR@;$(pdfdocdir);g" \ 10875592Sru -e "s;@DEVICE@;$(DEVICE);g" \ 10975592Sru -e "s;@DEFAULT_INDEX@;$(indexdir)/$(indexname);g" \ 11075592Sru -e "s;@DEFAULT_INDEX_NAME@;$(indexname);g" \ 11175592Sru -e "s;@INDEX_SUFFIX@;$(indexext);g" \ 11275592Sru -e "s;@COMMON_WORDS_FILE@;$(common_words_file);g" \ 11375592Sru -e "s;@MAN1EXT@;1;g" \ 11475592Sru -e "s;@MAN5EXT@;5;g" \ 11575592Sru -e "s;@MAN7EXT@;7;g" \ 11675592Sru -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \ 11775592Sru -e "s;@TMAC_M_PREFIX@;$(tmac_m_prefix);g" \ 11875592Sru -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \ 11975592Sru -e "s;@TMAC_MDIR@;$(tmacdir)/mm;g" \ 12075592Sru -e "s;@BROKEN_SPOOLER_FLAGS@;$(BROKEN_SPOOLER_FLAGS);g" \ 12175592Sru -e "s;@VERSION@;$(version)$(revision);g" \ 12275592Sru -e "s;@MDATE@;`$(SHELL) ${GROFF_DIST}/mdate.sh $<`;g" \ 12375592Sru -e "s;@g@;$(g);g" \ 124118449Sache -e "s;@G@;`echo $(g) | LC_ALL=C tr a-z A-Z`;g" \ 12575592Sru $< >$@ 12675592Sru 12775592Sru.SUFFIXES: .sh .pl 12875592Sru 12975592Sru.sh .pl: 13075592Sru @${ECHO} Making ${.TARGET} from ${.IMPSRC} 131284289Ssjg @rm -f ${.TARGET} 13275592Sru @sed -e "s|@BINDIR@|${BINDIR}|g" \ 133151504Sru -e 's|@GROFF_BIN_PATH_SETUP@|GROFF_RUNTIME="$${GROFF_BIN_PATH=${BINDIR}}:"|g' \ 134114412Sru -e "s;@FONTDIR@;$(fontdir);g" \ 135114412Sru -e "s|@SEP@|:|g" \ 13675592Sru -e "s|@VERSION@|$(version)$(revision)|" \ 13775592Sru -e "s|@g@|$(g)|g" \ 13875592Sru ${.IMPSRC} >${.TARGET} 13975592Sru 14075592SruTOPREL?= .. 14175592SruGROFF_DIST= ${.CURDIR}/${TOPREL}/../../../contrib/groff 14275592SruDIST_SUBDIR?= ${.CURDIR:T} 14375592SruDIST_DIR= ${GROFF_DIST}/${DIST_SUBDIR} 14418189Sphk.PATH: ${DIST_DIR} 145