From owner-freebsd-bugs Wed Aug 20 04:57:57 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id EAA17278 for bugs-outgoing; Wed, 20 Aug 1997 04:57:57 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA17270 for ; Wed, 20 Aug 1997 04:57:51 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id VAA25891; Wed, 20 Aug 1997 21:52:06 +1000 Date: Wed, 20 Aug 1997 21:52:06 +1000 From: Bruce Evans Message-Id: <199708201152.VAA25891@godzilla.zeta.org.au> To: bugs@FreeBSD.ORG, nnd@itfs.nsk.su Subject: Re: bin/4314: games/boggle Makefile correction Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> OK, except the `cleandepend' bug seems to be elsewhere - the default >> for cleandepend in bsd.dep.mk (included from bsd.prog.mk) only works >> right if SRCS is defined, but SRCS isn't defined here since all the C >> programs are in subdirectories. > > And default for 'depend' in this case (no SRCS) >is to do TWO passes through SUBDIRs. This is because `depend' depends on both .depend and _SUBDIR, and .depend depends on _SUBDIR again in the no-SRCS case. This patch just removes bogus dependencies on and of .depend. The beforedepend and afterdepend targets should probably be removed too (in the no-SRCS) - this could be written with fewer ifdefs by adding `depend: _SUBDIR' at the end. The comments and blank lines near the patch should be better organized. Bruce diff -c2 bsd.dep.mk~ bsd.dep.mk *** bsd.dep.mk~ Fri Jun 20 17:48:24 1997 --- bsd.dep.mk Wed Aug 20 21:39:53 1997 *************** *** 34,39 **** # some of the rules involve .h sources, so remove them from mkdep line .if !target(depend) - depend: beforedepend ${DEPENDFILE} afterdepend _SUBDIR .if defined(SRCS) # .if defined ${SRCS:M*.[sS]} does not work --- 34,39 ---- # some of the rules involve .h sources, so remove them from mkdep line .if !target(depend) .if defined(SRCS) + depend: beforedepend ${DEPENDFILE} afterdepend _SUBDIR # .if defined ${SRCS:M*.[sS]} does not work *************** *** 62,66 **** .else ! ${DEPENDFILE}: _SUBDIR .endif .if !target(beforedepend) --- 62,66 ---- .else ! depend: beforedepend afterdepend _SUBDIR .endif .if !target(beforedepend)