Date: Wed, 20 Aug 1997 21:52:06 +1000 From: Bruce Evans <bde@zeta.org.au> To: bugs@FreeBSD.ORG, nnd@itfs.nsk.su Subject: Re: bin/4314: games/boggle Makefile correction Message-ID: <199708201152.VAA25891@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708201152.VAA25891>
