1 1.16 mycroft # $NetBSD: Makefile.inc,v 1.16 2001/01/14 21:30:58 mycroft Exp $ 2 1.14 lukem # 3 1.1 ross 4 1.1 ross # Ross Harvey <ross@netbsd.org> 5 1.11 cjs 6 1.16 mycroft .include <bsd.own.mk> # So we get /etc/mk.conf vars. 7 1.1 ross 8 1.1 ross M?= ${.CURDIR:T} 9 1.1 ross V!= /bin/sh ${.CURDIR}/../../../sys/conf/osrelease.sh 10 1.1 ross V_S!= /bin/sh ${.CURDIR}/../../../sys/conf/osrelease.sh -s 11 1.1 ross 12 1.14 lukem MAIN= ${.CURDIR}/../common/main ${.CURDIR}/../common/macros ${EXTRA} 13 1.1 ross TARG= INSTALL 14 1.2 kleink TARGS= ${TARG}.ps ${TARG}.txt ${TARG}.html ${TARG}.more 15 1.10 lukem SRCS= ${MAIN} whatis contents hardware xfer prep install\ 16 1.1 ross upgrade donations legal.common legal postinstall ../Makefile.inc\ 17 1.1 ross ${MERGED_SRCS} 18 1.6 ross ICMD= ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} \ 19 1.6 ross -o root -g wheel -m ${NONBINMODE} 20 1.1 ross 21 1.15 matt .if defined(DESTDIR) 22 1.15 matt PRESET= ${GFLAGS} -dM=${M} -dV=${V} -d.CURDIR=${.CURDIR} -r${M}=1 -M${DESTDIR}/usr/share/tmac 23 1.15 matt .else 24 1.14 lukem PRESET= ${GFLAGS} -dM=${M} -dV=${V} -d.CURDIR=${.CURDIR} -r${M}=1 25 1.15 matt .endif 26 1.1 ross 27 1.8 soren POST_PLAIN= -P-b -P-u -P-o 28 1.1 ross 29 1.1 ross ARGS_PS= ${PRESET} -dformat=PostScript 30 1.12 enami ARGS_TXT= ${PRESET} -dformat=ASCII ${POST_PLAIN} -Tascii -mtty-char 31 1.8 soren ARGS_HTML= ${PRESET} -dformat=HTML ${POST_PLAIN} -Tlatin1 -ww 32 1.12 enami ARGS_MORE= ${PRESET} -dformat=more -P-h -Tascii -mtty-char 33 1.1 ross 34 1.1 ross # 35 1.1 ross # For example... 36 1.1 ross # 37 1.1 ross # .if ri386 ...stuff... 38 1.1 ross # .Ss "Install notes for NetBSD/\*[MACHINE]" 39 1.1 ross # 40 1.1 ross 41 1.1 ross CLEANFILES+=${TARGS} 42 1.1 ross 43 1.1 ross .for i in ps txt html more 44 1.1 ross all: ${TARG}.$i 45 1.1 ross .endfor 46 1.1 ross 47 1.1 ross ${TARG}.ps: ${SRCS} 48 1.1 ross groff ${ARGS_PS} -mdoc ${MAIN} > $@ 49 1.13 lukem 50 1.13 lukem ${TARG}.pdf: ${TARG}.ps 51 1.13 lukem ps2pdf ${TARG}.ps $@ 52 1.1 ross 53 1.1 ross ${TARG}.txt: ${SRCS} 54 1.1 ross groff ${ARGS_TXT} -mdoc ${MAIN} > $@ 55 1.1 ross 56 1.1 ross ${TARG}.html: ${SRCS} 57 1.1 ross groff ${ARGS_HTML} -mdoc2html ${MAIN} > $@ 58 1.1 ross 59 1.1 ross ${TARG}.more: ${SRCS} 60 1.1 ross groff ${ARGS_MORE} -mdoc ${MAIN} > $@ 61 1.1 ross 62 1.1 ross echosrcs! ${SRCS} 63 1.1 ross @echo ${.ALLSRC} 64 1.5 ross 65 1.5 ross echomore! 66 1.5 ross @echo ${.OBJDIR}/${TARG}.more 67 1.6 ross 68 1.6 ross .ifndef RELEASEDIR 69 1.6 ross release: 70 1.6 ross @echo setenv RELEASEDIR first 71 1.6 ross @false 72 1.6 ross .else 73 1.6 ross release: 74 1.6 ross .for i in ${TARGS} 75 1.6 ross ${ICMD} ${i} ${RELEASEDIR}/. 76 1.6 ross .endfor 77 1.6 ross .endif 78 1.1 ross 79 1.1 ross .PATH: ${.CURDIR}/../common 80 1.4 drochner 81 1.4 drochner # make the "afterdepend" rule happy 82 1.4 drochner .depend: 83 1.4 drochner @touch $@ 84