head	1.3;
access;
symbols
	netbsd-11-0-RC4:1.3
	netbsd-11-0-RC3:1.3
	netbsd-11-0-RC2:1.3
	netbsd-11-0-RC1:1.3
	perseant-exfatfs-base-20250801:1.3
	netbsd-11:1.3.0.30
	netbsd-11-base:1.3
	netbsd-10-1-RELEASE:1.3
	perseant-exfatfs-base-20240630:1.3
	perseant-exfatfs:1.3.0.28
	perseant-exfatfs-base:1.3
	netbsd-8-3-RELEASE:1.3
	netbsd-9-4-RELEASE:1.3
	netbsd-10-0-RELEASE:1.3
	netbsd-10-0-RC6:1.3
	netbsd-10-0-RC5:1.3
	netbsd-10-0-RC4:1.3
	netbsd-10-0-RC3:1.3
	netbsd-10-0-RC2:1.3
	netbsd-10-0-RC1:1.3
	netbsd-10:1.3.0.26
	netbsd-10-base:1.3
	netbsd-9-3-RELEASE:1.3
	cjep_sun2x-base1:1.3
	cjep_sun2x:1.3.0.24
	cjep_sun2x-base:1.3
	cjep_staticlib_x-base1:1.3
	netbsd-9-2-RELEASE:1.3
	cjep_staticlib_x:1.3.0.22
	cjep_staticlib_x-base:1.3
	netbsd-9-1-RELEASE:1.3
	phil-wifi-20200421:1.3
	phil-wifi-20200411:1.3
	is-mlppp:1.3.0.20
	is-mlppp-base:1.3
	phil-wifi-20200406:1.3
	netbsd-8-2-RELEASE:1.3
	netbsd-9-0-RELEASE:1.3
	netbsd-9-0-RC2:1.3
	netbsd-9-0-RC1:1.3
	phil-wifi-20191119:1.3
	netbsd-9:1.3.0.18
	netbsd-9-base:1.3
	phil-wifi-20190609:1.3
	netbsd-8-1-RELEASE:1.3
	netbsd-8-1-RC1:1.3
	pgoyette-compat-merge-20190127:1.3
	pgoyette-compat-20190127:1.3
	pgoyette-compat-20190118:1.3
	pgoyette-compat-1226:1.3
	pgoyette-compat-1126:1.3
	pgoyette-compat-1020:1.3
	pgoyette-compat-0930:1.3
	pgoyette-compat-0906:1.3
	pgoyette-compat-0728:1.3
	netbsd-8-0-RELEASE:1.3
	phil-wifi:1.3.0.16
	phil-wifi-base:1.3
	pgoyette-compat-0625:1.3
	netbsd-8-0-RC2:1.3
	pgoyette-compat-0521:1.3
	pgoyette-compat-0502:1.3
	pgoyette-compat-0422:1.3
	netbsd-8-0-RC1:1.3
	pgoyette-compat-0415:1.3
	pgoyette-compat-0407:1.3
	pgoyette-compat-0330:1.3
	pgoyette-compat-0322:1.3
	pgoyette-compat-0315:1.3
	pgoyette-compat:1.3.0.14
	pgoyette-compat-base:1.3
	matt-nb8-mediatek:1.3.0.12
	matt-nb8-mediatek-base:1.3
	perseant-stdc-iso10646:1.3.0.10
	perseant-stdc-iso10646-base:1.3
	netbsd-8:1.3.0.8
	netbsd-8-base:1.3
	prg-localcount2-base3:1.3
	prg-localcount2-base2:1.3
	prg-localcount2-base1:1.3
	prg-localcount2:1.3.0.6
	prg-localcount2-base:1.3
	pgoyette-localcount-20170426:1.3
	bouyer-socketcan-base1:1.3
	pgoyette-localcount-20170320:1.3
	bouyer-socketcan:1.3.0.4
	bouyer-socketcan-base:1.3
	pgoyette-localcount-20170107:1.3
	pgoyette-localcount-20161104:1.3
	localcount-20160914:1.3
	pgoyette-localcount-20160806:1.3
	pgoyette-localcount-20160726:1.3
	pgoyette-localcount:1.3.0.2
	pgoyette-localcount-base:1.3;
locks; strict;
comment	@# @;


1.3
date	2016.03.16.23.52.04;	author wiz;	state Exp;
branches;
next	1.2;
commitid	aeVBdVUUldFzsVYy;

1.2
date	2016.01.14.02.30.18;	author christos;	state Exp;
branches;
next	1.1;
commitid	PqxKDewCMr9KmQQy;

1.1
date	2016.01.13.19.01.55;	author christos;	state Exp;
branches;
next	;
commitid	lFxGBGcE2Im4TNQy;


desc
@@


1.3
log
@Hardcode man page dates to date of groff release (September 4, 2005
for 1.19.2 in this case).

We can not use mdate.sh since after checkout/update from version
control, it might be today's date and MKREPRO won't work.
@
text
@# $NetBSD: Makefile.inc,v 1.2 2016/01/14 02:30:18 christos Exp $

# $FreeBSD: src/gnu/usr.bin/groff/Makefile.inc,v 2.7 2003/05/01 13:22:18 ru Exp $

BINDIR?=	/usr/bin
ECHO=		echo
# date of groff tarball; embedded as last-change date into man pages
# we can not use mdate.sh since after checkout from some of the used
# version control systems, it might be today's date and MKREPRO won't
# work.
MDATE=		September 4, 2005

# 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=0

# DEVICE is the default device.
DEVICE=ps

# 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=
tmac_s_prefix=
tmac_m_prefix=
tmac_an_prefix=
fontdir=/usr/share/groff_font
localfontdir=$(fontdir)
legacyfontdir=$(fontdir)
tmacdir=/usr/share/tmac
systemtmacdir=/usr/share/tmac
localtmacdir=/usr/share/tmac
docdir=/usr/src/contrib/groff/doc
exampledir=XXX
htmldocdir=XXX
pdfdocdir=XXX
indexext=.i
common_words_file=/usr/share/dict/eign
indexdir=/usr/share/dict/papers
indexname=Ind

########################################################################
# Libraries
.include <bsd.own.mk>

DIST=		${NETBSDSRCDIR}/external/gpl2/groff
GROFF_DIST=	${DIST}/dist

PROGDPLIBS+= bib ${DIST}/lib/libbib
.if !defined(NOLIBDRIVER)
PROGDPLIBS+= driver ${DIST}/lib/libdriver
.endif
PROGDPLIBS+= groff ${DIST}/lib/libgroff

CPPFLAGS+=	-DHAVE_CONFIG_H
CPPFLAGS+=	-I${DIST}/include -I${GROFF_DIST}/src/include
CXXFLAGS+=	-fno-rtti -fno-exceptions

CWARNFLAGS.clang+=	-Wno-unused-value


.ifdef GROFFYSRCS
YFLAGS+=	-d
SRCS+=		${GROFFYSRCS:.y=.cpp}
DPSRCS+=	${GROFFYSRCS:.y=.cpp}
CLEANFILES+=	${GROFFYSRCS:.y=.cpp} ${GROFFYSRCS:.y=_tab.h}
.endif

.y.cpp:
	${_MKTARGET_YACC}
	${YACC.y} -o ${.TARGET} ${.IMPSRC}
	mv -f ${.PREFIX}.h ${.PREFIX}_tab.h


.SUFFIXES: .man .1 .2 .3 .4 .5 .6 .7 .8

version != cat $(GROFF_DIST)/VERSION
revision != ${TOOL_SED} -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(GROFF_DIST)/REVISION

.man.8 .man.7 .man.6 .man.5 .man.4 .man.3 .man.2 .man.1:
	${_MKTARGET_CREATE}
	rm -f $@@
	${TOOL_SED} -e "s;@@BINDIR@@;${BINDIR};g" \
	-e "s;@@FONTDIR@@;$(fontdir);g" \
	-e "s;@@LOCALFONTDIR@@;$(localfontdir);g" \
	-e "s;@@LEGACYFONTDIR@@;$(legacyfontdir);g" \
	-e "s;@@MACRODIR@@;$(tmacdir);g" \
	-e "s;@@SYSTEMMACRODIR@@;$(systemtmacdir);g" \
	-e "s;@@LOCALMACRODIR@@;$(localtmacdir);g" \
	-e "s;@@DOCDIR@@;$(docdir);g" \
	-e "s;@@EXAMPLEDIR@@;$(exampledir);g" \
	-e "s;@@HTMLDOCDIR@@;$(htmldocdir);g" \
	-e "s;@@PDFDOCDIR@@;$(pdfdocdir);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_PREFIX@@;$(tmac_s_prefix);g" \
	-e "s;@@TMAC_M_PREFIX@@;$(tmac_m_prefix);g" \
	-e "s;@@TMAC_AN_PREFIX@@;$(tmac_an_prefix);g" \
	-e "s;@@TMAC_MDIR@@;$(tmacdir)/mm;g" \
	-e "s;@@BROKEN_SPOOLER_FLAGS@@;$(BROKEN_SPOOLER_FLAGS);g" \
	-e "s;@@VERSION@@;$(version)$(revision);g" \
	-e "s;@@MDATE@@;${MDATE};g" \
	-e "s;@@g@@;$(g);g" \
	-e "s;@@G@@;`echo $(g) | LC_ALL=C tr [a-z] [A-Z]`;g" \
	$< >$@@

.SUFFIXES: .sh .pl

.sh .pl:
	${_MKTARGET_CREATE}
	rm -f $@@
	${TOOL_SED} -e "s|@@BINDIR@@|${BINDIR}|g" \
	     -e "s;@@FONTDIR@@;$(fontdir);g" \
	     -e 's|@@GROFF_BIN_PATH_SETUP@@|GROFF_RUNTIME="$${GROFF_BIN_PATH=/usr/bin}:"|g' \
	     -e "s|@@SEP@@|:|" \
	     -e "s|@@VERSION@@|$(version)$(revision)|" \
	     -e "s|@@g@@|$(g)|g" \
	     ${.IMPSRC} >${.TARGET}

DIST_SUBDIR?=	${.CURDIR:T}
DIST_DIR=	${GROFF_DIST}/${DIST_SUBDIR}
.PATH: ${DIST_DIR}
@


1.2
log
@- remove generated files
- remove libdriver dependencies where they are not needed
- add bin to Makefile
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.1 2016/01/13 19:01:55 christos Exp $
d7 5
d145 1
a145 1
	-e "s;@@MDATE@@;`${HOST_SH} ${GROFF_DIST}/mdate.sh $<`;g" \
@


1.1
log
@merge our changes and add build glue
@
text
@d1 1
a1 1
# $NetBSD: Makefile.inc,v 1.21 2012/08/10 12:12:18 joerg Exp $
d82 1
d84 1
@

