core is now prog.core, not core.prog
[unix-history] / usr / src / share / mk / bsd.prog.mk
index 2ed51d6..afe0d60 100644 (file)
@@ -1,6 +1,6 @@
-#      @(#)bsd.prog.mk 5.30 (Berkeley) %G%
+#      @(#)bsd.prog.mk 8.2 (Berkeley) %G%
 
 
-.if exists(${.CURDIR}/../Makefile.inc)
+.if !defined(NOINCLUDE) && exists(${.CURDIR}/../Makefile.inc)
 .include "${.CURDIR}/../Makefile.inc"
 .endif
 
 .include "${.CURDIR}/../Makefile.inc"
 .endif
 
@@ -25,6 +25,7 @@ LIBDES?=      /usr/lib/libdes.a
 LIBL?=         /usr/lib/libl.a
 LIBKDB?=       /usr/lib/libkdb.a
 LIBKRB?=       /usr/lib/libkrb.a
 LIBL?=         /usr/lib/libl.a
 LIBKDB?=       /usr/lib/libkdb.a
 LIBKRB?=       /usr/lib/libkrb.a
+LIBKVM?=       /usr/lib/libkvm.a
 LIBM?=         /usr/lib/libm.a
 LIBMP?=                /usr/lib/libmp.a
 LIBPC?=                /usr/lib/libpc.a
 LIBM?=         /usr/lib/libm.a
 LIBMP?=                /usr/lib/libmp.a
 LIBPC?=                /usr/lib/libpc.a
@@ -67,7 +68,11 @@ MKDEP=       -p
 MAN1=  ${PROG}.0
 .endif
 .endif
 MAN1=  ${PROG}.0
 .endif
 .endif
+.if !defined(NOMAN)
 MANALL=        ${MAN1} ${MAN2} ${MAN3} ${MAN4} ${MAN5} ${MAN6} ${MAN7} ${MAN8}
 MANALL=        ${MAN1} ${MAN2} ${MAN3} ${MAN4} ${MAN5} ${MAN6} ${MAN7} ${MAN8}
+.else
+MANALL=
+.endif
 manpages: ${MANALL}
 
 _PROGSUBDIR: .USE
 manpages: ${MANALL}
 
 _PROGSUBDIR: .USE
@@ -90,12 +95,12 @@ all: ${PROG} ${MANALL} _PROGSUBDIR
 
 .if !target(clean)
 clean: _PROGSUBDIR
 
 .if !target(clean)
 clean: _PROGSUBDIR
-       rm -f a.out [Ee]rrs mklog core ${PROG} ${OBJS} ${CLEANFILES}
+       rm -f a.out [Ee]rrs mklog ${PROG}.core ${PROG} ${OBJS} ${CLEANFILES}
 .endif
 
 .if !target(cleandir)
 cleandir: _PROGSUBDIR
 .endif
 
 .if !target(cleandir)
 cleandir: _PROGSUBDIR
-       rm -f a.out [Ee]rrs mklog core ${PROG} ${OBJS} ${CLEANFILES}
+       rm -f a.out [Ee]rrs mklog ${PROG}.core ${PROG} ${OBJS} ${CLEANFILES}
        rm -f .depend ${MANALL}
 .endif
 
        rm -f .depend ${MANALL}
 .endif
 
@@ -119,7 +124,7 @@ afterinstall:
 realinstall: _PROGSUBDIR
 .if defined(PROG)
        install ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
 realinstall: _PROGSUBDIR
 .if defined(PROG)
        install ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
-           ${PROG} ${DESTDIR}${BINDIR}
+           ${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
 .endif
 .if defined(HIDEGAME)
        (cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \
 .endif
 .if defined(HIDEGAME)
        (cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \
@@ -184,8 +189,8 @@ objdir: _PROGSUBDIR
 .if !target(tags)
 tags: ${SRCS} _PROGSUBDIR
 .if defined(PROG)
 .if !target(tags)
 tags: ${SRCS} _PROGSUBDIR
 .if defined(PROG)
-       -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
-           sed "s;\${.CURDIR}/;;" > tags
+       -ctags -f /dev/stdout ${.ALLSRC} | \
+           sed "s;${.CURDIR}/;;" > ${.CURDIR}/tags
 .endif
 .endif
 
 .endif
 .endif