- ${PROGC} ${PROGO} ${DESTDIR}${DIR}
-.if defined(MAN1)
- install -c -o ${BINOWN} -g ${BINGRP} -m ${MANMODE} ${MAN1} \
- ${DESTDIR}${MDIR}1
-.endif
-.if defined(MAN2)
- install -c -o ${BINOWN} -g ${BINGRP} -m ${MANMODE} ${MAN2} \
- ${DESTDIR}${MDIR}2
-.endif
-.if defined(MAN3)
- install -c -o ${BINOWN} -g ${BINGRP} -m ${MANMODE} ${MAN3} \
- ${DESTDIR}${MDIR}3
-.endif
-.if defined(MAN4)
- install -c -o ${BINOWN} -g ${BINGRP} -m ${MANMODE} ${MAN4} \
- ${DESTDIR}${MDIR}4
-.endif
-.if defined(MAN5)
- install -c -o ${BINOWN} -g ${BINGRP} -m ${MANMODE} ${MAN5} \
- ${DESTDIR}${MDIR}5
-.endif
-.if defined(MAN6)
- install -c -o ${BINOWN} -g ${BINGRP} -m ${MANMODE} ${MAN6} \
- ${DESTDIR}${MDIR}6
-.endif
-.if defined(MAN7)
- install -c -o ${BINOWN} -g ${BINGRP} -m ${MANMODE} ${MAN7} \
- ${DESTDIR}${MDIR}7
-.endif
-.if defined(MAN8)
- install -c -o ${BINOWN} -g ${BINGRP} -m ${MANMODE} ${MAN8} \
- ${DESTDIR}${MDIR}8
-.endif
-# user defines:
-# LINKS -- list of binary links of the form "link target
-# link target"; for example, "/bin/[ /usr/bin/test"
-# would link /bin/[ to /usr/bin/test"; not particularly
-# labor saving, but prevents needing your own install
-# target.
-# MLINKS -- list of manual page linkes of the form "link target
-# link target"; for example, "a.1 b.2 c.3 d.4" would
-# link ${MDIR}1/a.0 to ${MDIR}2/b.0 and ${MDIR}3/c.0
-# to ${MDIR}4/d.0.
-.if defined(LINKS)
- @set ${LINKS}
- @while :; do
- if `test $$# -lt 2`; then
- break;
- fi
- t=$$1
- shift
- l=$$1
- shift
- echo $$l -\> $$t
- rm -f $$t
- ln ${DESTDIR}$$l ${DESTDIR}$$t
- done
-.endif # LINKS
-.if defined(MLINKS)
- @set ${MLINKS}
- @while :; do
- if `test $$# -lt 2`; then
- break;
- fi
- name=$$1
- shift
- dir=${MDIR}`expr $$name : '[^\.]*\.\(.*\)'`
- t=${DESTDIR}$${dir}/`expr $$name : '\([^\.]*\)'`.0
- name=$$1
- shift
- dir=${MDIR}`expr $$name : '[^\.]*\.\(.*\)'`
- l=${DESTDIR}$${dir}/`expr $$name : '\([^\.]*\)'`.0
- echo $$l -\> $$t
- rm -f $$t
- ln $$l $$t
- done
-.endif # MLINKS
-.endif # SUBDIR
+ ${PROG} ${DESTDIR}${BINDIR}
+.endif
+.if defined(HIDEGAME)
+ (cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \
+ chown games.bin ${PROG})
+.endif
+.if defined(LINKS) && !empty(LINKS)
+ @set ${LINKS}; \
+ while test $$# -ge 2; do \
+ l=${DESTDIR}$$1; \
+ shift; \
+ t=${DESTDIR}$$1; \
+ shift; \
+ echo $$t -\> $$l; \
+ rm -f $$t; \
+ ln $$l $$t; \
+ done; true
+.endif
+
+install: maninstall
+maninstall: afterinstall
+afterinstall: realinstall
+realinstall: beforeinstall
+.endif
+
+.if !target(lint)
+lint: ${SRCS} _PROGSUBDIR
+.if defined(PROG)
+ @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1
+.endif
+.endif
+
+.if !target(obj)
+.if defined(NOOBJ)
+obj: _PROGSUBDIR
+.else
+obj: _PROGSUBDIR
+ @cd ${.CURDIR}; rm -rf obj; \
+ here=`pwd`; dest=/usr/obj/`echo $$here | sed 's,/usr/src/,,'`; \
+ echo "$$here -> $$dest"; ln -s $$dest obj
+.endif
+.endif
+
+.if !target(tags)
+tags: ${SRCS} _PROGSUBDIR
+.if defined(PROG)
+ -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
+ sed "s;\${.CURDIR}/;;" > tags
+.endif
+.endif
+
+.if !defined(NOMAN)
+.include <bsd.man.mk>
+.endif