2015-05-20 08:19:19 +03:00
|
|
|
# $NetBSD: Makefile.inc,v 1.43 2015/05/20 05:19:19 snj Exp $
|
2000-10-10 16:51:20 +04:00
|
|
|
#
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2003-07-26 21:06:22 +04:00
|
|
|
# Ross Harvey <ross@NetBSD.org>
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2001-01-15 00:30:58 +03:00
|
|
|
.include <bsd.own.mk> # So we get /etc/mk.conf vars.
|
2002-05-02 22:02:14 +04:00
|
|
|
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
|
2000-03-08 18:39:48 +03:00
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
# Whether or not to regenerate tables of contents
|
2002-07-21 04:12:28 +04:00
|
|
|
#
|
2001-12-01 20:54:11 +03:00
|
|
|
MKTOCS?=yes
|
2001-12-01 01:20:03 +03:00
|
|
|
|
1999-01-13 11:18:44 +03:00
|
|
|
M?= ${.CURDIR:T}
|
2002-07-21 12:14:46 +04:00
|
|
|
COMMON= ${.CURDIR}/../common
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2002-07-21 12:14:46 +04:00
|
|
|
MAIN= ${COMMON}/main ${COMMON}/macros ${EXTRA}
|
1999-01-13 11:18:44 +03:00
|
|
|
TARG= INSTALL
|
1999-02-07 21:29:51 +03:00
|
|
|
TARGS= ${TARG}.ps ${TARG}.txt ${TARG}.html ${TARG}.more
|
2001-11-26 03:19:56 +03:00
|
|
|
TOCS= ${TARG}.PostScript.toc ${TARG}.ASCII.toc ${TARG}.HTML.toc \
|
|
|
|
${TARG}.more.toc
|
2002-07-21 12:14:46 +04:00
|
|
|
SRCS= ${MAIN} whatis ${COMMON}/contents hardware xfer prep \
|
|
|
|
${.CURDIR}/install ${COMMON}/postinstall upgrade \
|
2015-05-20 08:19:19 +03:00
|
|
|
${COMMON}/legal.common ${COMMON}/netboot \
|
2007-12-11 23:57:19 +03:00
|
|
|
${COMMON}/sysinst \
|
2002-07-20 10:59:19 +04:00
|
|
|
${.CURDIR}/../Makefile.inc ${MERGED_SRCS}
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2007-07-26 19:26:35 +04:00
|
|
|
whatis: .OPTIONAL
|
|
|
|
|
|
|
|
PRESET= ${GFLAGS} -U -dM=${M} -dV=${DISTRIBVER} -d.CURDIR=${.CURDIR} -r${M}=1
|
1999-01-13 11:18:44 +03:00
|
|
|
|
1999-12-08 01:33:49 +03:00
|
|
|
POST_PLAIN= -P-b -P-u -P-o
|
1999-01-13 11:18:44 +03:00
|
|
|
|
|
|
|
ARGS_PS= ${PRESET} -dformat=PostScript
|
2000-08-01 05:57:57 +04:00
|
|
|
ARGS_TXT= ${PRESET} -dformat=ASCII ${POST_PLAIN} -Tascii -mtty-char
|
1999-12-08 01:33:49 +03:00
|
|
|
ARGS_HTML= ${PRESET} -dformat=HTML ${POST_PLAIN} -Tlatin1 -ww
|
2000-08-01 05:57:57 +04:00
|
|
|
ARGS_MORE= ${PRESET} -dformat=more -P-h -Tascii -mtty-char
|
1999-01-13 11:18:44 +03:00
|
|
|
|
|
|
|
#
|
|
|
|
# For example...
|
|
|
|
#
|
|
|
|
# .if ri386 ...stuff...
|
|
|
|
# .Ss "Install notes for NetBSD/\*[MACHINE]"
|
|
|
|
#
|
|
|
|
|
2001-01-15 00:45:01 +03:00
|
|
|
all: ${TARGS}
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2001-12-01 20:54:11 +03:00
|
|
|
.if ${MKTOCS} != "no"
|
2002-07-20 10:59:19 +04:00
|
|
|
TOC.ps= ${TOCS:M*.PostScript.*}
|
|
|
|
TOC.txt= ${TOCS:M*.ASCII.*}
|
|
|
|
TOC.html= ${TOCS:M*.HTML.*}
|
|
|
|
TOC.more= ${TOCS:M*.more.*}
|
2001-12-01 01:20:03 +03:00
|
|
|
.endif
|
|
|
|
|
2014-01-26 21:00:03 +04:00
|
|
|
REMOVE_CREATION_DATE= ${TOOL_SED} -e '/^%%CreationDate:/d'
|
2002-07-21 04:12:28 +04:00
|
|
|
|
2004-02-02 21:43:39 +03:00
|
|
|
${TARG}.ps: ${SRCS} ${TOC.ps} ${DISTRIBVERDEP}
|
2014-01-26 21:00:03 +04:00
|
|
|
${TOOL_GROFF} ${ARGS_PS} -mdoc ${MAIN} \
|
|
|
|
${${MKREPRO:Uno} == "yes":? | ${REMOVE_CREATION_DATE} :} \
|
|
|
|
> $@
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2000-10-05 13:02:48 +04:00
|
|
|
${TARG}.pdf: ${TARG}.ps
|
|
|
|
ps2pdf ${TARG}.ps $@
|
|
|
|
|
2004-02-02 21:43:39 +03:00
|
|
|
${TARG}.txt: ${SRCS} ${TOC.txt} ${DISTRIBVERDEP}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} ${ARGS_TXT} -mdoc ${MAIN} > $@
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2004-02-02 21:43:39 +03:00
|
|
|
${TARG}.html: ${SRCS} ${TOC.html} ${DISTRIBVERDEP}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} ${ARGS_HTML} -mdoc2html ${MAIN} > $@
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2004-02-02 21:43:39 +03:00
|
|
|
${TARG}.more: ${SRCS} ${TOC.more} ${DISTRIBVERDEP}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} ${ARGS_MORE} -mdoc ${MAIN} > $@
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2002-07-21 04:12:28 +04:00
|
|
|
|
|
|
|
# Rules to build the table of contents (.toc) files.
|
|
|
|
# They are generated twice to take into account the
|
|
|
|
# space taken by the TOC itself.
|
|
|
|
#
|
|
|
|
|
2001-11-26 03:19:56 +03:00
|
|
|
TOCPROC= 2>&1 >/dev/null |\
|
2008-10-26 02:27:34 +04:00
|
|
|
${TOOL_SED} -n '/^\.Ti/{s/ \([A-Za-z]\)/ "\1/; s/ *$$/"/; p; }'
|
2001-11-26 03:19:56 +03:00
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
${TARG}.PostScript.toc: ${SRCS}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-12-01 01:20:03 +03:00
|
|
|
mv -f $@.tmp $@
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-11-26 03:19:56 +03:00
|
|
|
mv -f $@.tmp $@
|
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
${TARG}.ASCII.toc: ${SRCS}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} -dTOC=1 ${ARGS_TXT} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-12-01 01:20:03 +03:00
|
|
|
mv -f $@.tmp $@
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} -dTOC=1 ${ARGS_TXT} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-11-26 03:19:56 +03:00
|
|
|
mv -f $@.tmp $@
|
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
${TARG}.HTML.toc: ${SRCS}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-12-01 01:20:03 +03:00
|
|
|
mv -f $@.tmp $@
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-11-26 03:19:56 +03:00
|
|
|
mv -f $@.tmp $@
|
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
${TARG}.more.toc: ${SRCS}
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-12-01 01:20:03 +03:00
|
|
|
mv -f $@.tmp $@
|
2003-07-10 14:33:58 +04:00
|
|
|
${TOOL_GROFF} -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-11-26 03:19:56 +03:00
|
|
|
mv -f $@.tmp $@
|
|
|
|
|
2002-07-21 04:12:28 +04:00
|
|
|
|
2002-05-02 22:02:14 +04:00
|
|
|
release: check_RELEASEDIR .WAIT ${TARGS}
|
2006-04-22 06:57:29 +04:00
|
|
|
${INSTALL} -d -m 755 ${RELEASEDIR}/${RELEASEMACHINEDIR}
|
|
|
|
${RELEASE_INSTALL} ${TARGS} ${RELEASEDIR}/${RELEASEMACHINEDIR}
|
1999-06-30 22:23:02 +04:00
|
|
|
|
2001-01-15 00:37:55 +03:00
|
|
|
cleannotes:
|
2002-07-20 10:59:19 +04:00
|
|
|
rm -f [Ee]rrs mklog core *.core ${TARGS} ${TOCS} \
|
|
|
|
${TOCS:S/.toc$/.toc.tmp/g}
|
2001-01-15 00:37:55 +03:00
|
|
|
|
|
|
|
clean cleandir distclean: cleannotes
|