2002-02-09 16:56:48 +03:00
|
|
|
# $NetBSD: Makefile.inc,v 1.23 2002/02/09 13:56:52 lukem Exp $
|
2000-10-10 16:51:20 +04:00
|
|
|
#
|
1999-01-13 11:18:44 +03:00
|
|
|
|
|
|
|
# Ross Harvey <ross@netbsd.org>
|
|
|
|
|
2001-01-15 00:30:58 +03:00
|
|
|
.include <bsd.own.mk> # So we get /etc/mk.conf vars.
|
2000-03-08 18:39:48 +03:00
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
# Whether or not to regenerate tables of contents
|
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}
|
|
|
|
V!= /bin/sh ${.CURDIR}/../../../sys/conf/osrelease.sh
|
|
|
|
V_S!= /bin/sh ${.CURDIR}/../../../sys/conf/osrelease.sh -s
|
|
|
|
|
2000-10-10 16:51:20 +04:00
|
|
|
MAIN= ${.CURDIR}/../common/main ${.CURDIR}/../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
|
1999-12-08 06:57:29 +03:00
|
|
|
SRCS= ${MAIN} whatis contents hardware xfer prep install\
|
1999-01-13 11:18:44 +03:00
|
|
|
upgrade donations legal.common legal postinstall ../Makefile.inc\
|
|
|
|
${MERGED_SRCS}
|
2002-02-09 16:56:48 +03:00
|
|
|
ICMD= ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} -m ${NONBINMODE}
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2000-10-10 16:51:20 +04:00
|
|
|
PRESET= ${GFLAGS} -dM=${M} -dV=${V} -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"
|
2001-12-01 01:20:03 +03:00
|
|
|
TOCDEPS = ${TOCS}
|
|
|
|
.else
|
|
|
|
TOCDEPS =
|
|
|
|
.endif
|
|
|
|
|
|
|
|
${TARG}.ps: ${SRCS} ${TOCDEPS}
|
2001-12-10 08:27:59 +03:00
|
|
|
${GROFF} ${ARGS_PS} -mdoc ${MAIN} > $@
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2000-10-05 13:02:48 +04:00
|
|
|
${TARG}.pdf: ${TARG}.ps
|
|
|
|
ps2pdf ${TARG}.ps $@
|
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
${TARG}.txt: ${SRCS} ${TOCDEPS}
|
2001-12-10 08:27:59 +03:00
|
|
|
${GROFF} ${ARGS_TXT} -mdoc ${MAIN} > $@
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
${TARG}.html: ${SRCS} ${TOCDEPS}
|
2001-12-10 08:27:59 +03:00
|
|
|
${GROFF} ${ARGS_HTML} -mdoc2html ${MAIN} > $@
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
${TARG}.more: ${SRCS} ${TOCDEPS}
|
2001-12-10 08:27:59 +03:00
|
|
|
${GROFF} ${ARGS_MORE} -mdoc ${MAIN} > $@
|
1999-01-13 11:18:44 +03:00
|
|
|
|
2001-11-26 03:19:56 +03:00
|
|
|
TOCPROC= 2>&1 >/dev/null |\
|
|
|
|
sed -n '/^\.Ti/{s/ \([A-Za-z]\)/ "\1/; s/ *$$/"/; p; }'
|
|
|
|
|
2001-12-01 01:20:03 +03:00
|
|
|
${TARG}.PostScript.toc: ${SRCS}
|
2001-12-10 08:27:59 +03:00
|
|
|
${GROFF} -dTOC=1 ${ARGS_PS} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-12-01 01:20:03 +03:00
|
|
|
mv -f $@.tmp $@
|
2001-12-10 08:27:59 +03:00
|
|
|
${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}
|
2001-12-10 08:27:59 +03:00
|
|
|
${GROFF} -dTOC=1 ${ARGS_TXT} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-12-01 01:20:03 +03:00
|
|
|
mv -f $@.tmp $@
|
2001-12-10 08:27:59 +03:00
|
|
|
${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}
|
2001-12-10 08:27:59 +03:00
|
|
|
${GROFF} -dTOC=1 ${ARGS_HTML} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-12-01 01:20:03 +03:00
|
|
|
mv -f $@.tmp $@
|
2001-12-10 08:27:59 +03:00
|
|
|
${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}
|
2001-12-10 08:27:59 +03:00
|
|
|
${GROFF} -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-12-01 01:20:03 +03:00
|
|
|
mv -f $@.tmp $@
|
2001-12-10 08:27:59 +03:00
|
|
|
${GROFF} -dTOC=1 ${ARGS_MORE} -mdoc ${MAIN} ${TOCPROC} > $@.tmp
|
2001-11-26 03:19:56 +03:00
|
|
|
mv -f $@.tmp $@
|
|
|
|
|
1999-01-13 11:18:44 +03:00
|
|
|
echosrcs! ${SRCS}
|
|
|
|
@echo ${.ALLSRC}
|
|
|
|
|
1999-04-29 23:03:03 +04:00
|
|
|
echomore!
|
|
|
|
@echo ${.OBJDIR}/${TARG}.more
|
|
|
|
|
1999-06-30 22:23:02 +04:00
|
|
|
.ifndef RELEASEDIR
|
|
|
|
release:
|
|
|
|
@echo setenv RELEASEDIR first
|
|
|
|
@false
|
|
|
|
.else
|
|
|
|
release:
|
2001-01-15 00:45:01 +03:00
|
|
|
${ICMD} ${TARGS} ${RELEASEDIR}/.
|
1999-06-30 22:23:02 +04:00
|
|
|
.endif
|
|
|
|
|
1999-01-13 11:18:44 +03:00
|
|
|
.PATH: ${.CURDIR}/../common
|
1999-03-06 14:31:51 +03:00
|
|
|
|
2001-01-15 00:37:55 +03:00
|
|
|
cleannotes:
|
2001-11-26 03:19:56 +03:00
|
|
|
rm -f [Ee]rrs mklog core *.core ${TARGS} ${TOCS}
|
2001-01-15 00:37:55 +03:00
|
|
|
|
|
|
|
clean cleandir distclean: cleannotes
|