don't do local dependency if PROG not defined
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 16 May 1990 11:30:25 +0000 (03:30 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 16 May 1990 11:30:25 +0000 (03:30 -0800)
SCCS-vsn: share/mk/bsd.prog.mk 5.14

usr/src/share/mk/bsd.prog.mk

index 560a9f7..1f6443d 100644 (file)
@@ -1,4 +1,4 @@
-#      @(#)bsd.prog.mk 5.13 (Berkeley) %G%
+#      @(#)bsd.prog.mk 5.14 (Berkeley) %G%
 
 .if exists(${.CURDIR}/../Makefile.inc)
 .include "${.CURDIR}/../Makefile.inc"
 
 .if exists(${.CURDIR}/../Makefile.inc)
 .include "${.CURDIR}/../Makefile.inc"
@@ -74,7 +74,7 @@ _PROGSUBDIR: .USE
                else \
                        cd ${.CURDIR}/$${entry}; \
                fi; \
                else \
                        cd ${.CURDIR}/$${entry}; \
                fi; \
-               ${MAKE} ${.TARGET:realinstall=install}) \
+               ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/}) \
        done
 .endif
 
        done
 .endif
 
@@ -96,8 +96,10 @@ cleandir: _PROGSUBDIR
 .if !target(depend)
 depend: .depend
 .depend: ${SRCS} _PROGSUBDIR
 .if !target(depend)
 depend: .depend
 .depend: ${SRCS} _PROGSUBDIR
+.if defined(PROG)
        mkdep ${CFLAGS:M-[ID]*} ${.ALLSRC:M*.c}
 .endif
        mkdep ${CFLAGS:M-[ID]*} ${.ALLSRC:M*.c}
 .endif
+.endif
 
 .if !target(install)
 .if !target(beforeinstall)
 
 .if !target(install)
 .if !target(beforeinstall)
@@ -137,14 +139,18 @@ realinstall: beforeinstall
 
 .if !target(lint)
 lint: ${SRCS} _PROGSUBDIR
 
 .if !target(lint)
 lint: ${SRCS} _PROGSUBDIR
+.if defined(PROG)
        @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1
 .endif
        @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1
 .endif
+.endif
 
 .if !target(tags)
 tags: ${SRCS} _PROGSUBDIR
 
 .if !target(tags)
 tags: ${SRCS} _PROGSUBDIR
+.if defined(PROG)
        cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
            sed "s;\${.CURDIR}/;;" > tags
 .endif
        cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
            sed "s;\${.CURDIR}/;;" > tags
 .endif
+.endif
 
 .if !defined(NOMAN)
 .include <bsd.man.mk>
 
 .if !defined(NOMAN)
 .include <bsd.man.mk>