From j@ida.interface-business.de  Tue Aug 26 05:45:48 1997
Received: from innocence.interface-business.de (innocence.interface-business.de [193.101.57.202])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA08280
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Aug 1997 05:45:46 -0700 (PDT)
Received: from ida.interface-business.de (ida.interface-business.de [193.101.57.203]) by innocence.interface-business.de (8.6.11/8.6.9) with SMTP id OAA13211 for <FreeBSD-gnats-submit@freebsd.org>; Tue, 26 Aug 1997 14:45:31 +0200
Received: (from j@localhost) by ida.interface-business.de (8.8.7/8.7.3) id OAA27607; Tue, 26 Aug 1997 14:45:02 +0200 (MET DST)
Message-Id: <199708261245.OAA27607@ida.interface-business.de>
Date: Tue, 26 Aug 1997 14:45:02 +0200 (MET DST)
From: J Wunsch <j@ida.interface-business.de>
Reply-To: j@ida.interface-business.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: if exists(secure) in /usr/src/Makefile is bogus
X-Send-Pr-Version: 3.2

>Number:         4395
>Category:       misc
>Synopsis:       if exists(secure) in /usr/src/Makefile is bogus
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 26 05:50:00 PDT 1997
>Closed-Date:    Thu Apr 8 03:37:57 PDT 1999
>Last-Modified:  Thu Apr  8 03:39:22 PDT 1999
>Originator:     J Wunsch
>Release:        FreeBSD 2.2-STABLE i386
>Organization:
interface business GmbH
>Environment:

any FreeBSD sourcetree

>Description:

/usr/src/Makefile, and a number of other Makefiles contain constructs
of the form:

.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
SUBDIR+= secure
.endif

If /usr/obj/secure does exist, but /usr/src/secure doesn't, the above
construct wrongly causes descending into the `secure' subdirectory.

>How-To-Repeat:

See above.

>Fix:
	
.if exists(${.CURDIR}/secure) ...


>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: FreeBSD-gnats-submit@FreeBSD.ORG, j@ida.interface-business.de
Cc:  Subject: Re: misc/4395: if exists(secure) in /usr/src/Makefile is bogus
Date: Wed, 27 Aug 1997 00:23:37 +1000

 >/usr/src/Makefile, and a number of other Makefiles contain constructs
 >of the form:
 >
 >.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
 >SUBDIR+= secure
 >.endif
 >
 >If /usr/obj/secure does exist, but /usr/src/secure doesn't, the above
 >construct wrongly causes descending into the `secure' subdirectory.
 
 How would /usr/obj/secure (actually /usr/obj/usr/src/secure) exist?
 There are normally no program directories at the top level.
 
 The bug seems to be fixed everywhere except in ed/Makefile.
 
 Bruce

From: j@ida.interface-business.de (J Wunsch)
To: bde@zeta.org.au (Bruce Evans)
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: misc/4395: if exists(secure) in /usr/src/Makefile is bogus
Date: Tue, 26 Aug 1997 16:29:34 +0200

 As Bruce Evans wrote:
 
 > >If /usr/obj/secure does exist, but /usr/src/secure doesn't, the above
 > >construct wrongly causes descending into the `secure' subdirectory.
 > 
 > How would /usr/obj/secure (actually /usr/obj/usr/src/secure) exist?
 
 By a previous `make' where /usr/src/secure did exist.
 
 I've posted this on behalf of a friend who's been hit by it for the
 second time...  I believe it's bogus to check for `exist(secure)' in
 the /usr/obj hierarchy, that's why i've made it a PR.
 
 -- 
 J"org Wunsch					       Unix support engineer
 joerg_wunsch@interface-business.de       http://www.interface-business.de/~j

From: Bruce Evans <bde@zeta.org.au>
To: bde@zeta.org.au, j@ida.interface-business.de
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: misc/4395: if exists(secure) in /usr/src/Makefile is bogus
Date: Wed, 27 Aug 1997 00:55:39 +1000

 >> >If /usr/obj/secure does exist, but /usr/src/secure doesn't, the above
 >> >construct wrongly causes descending into the `secure' subdirectory.
 >> 
 >> How would /usr/obj/secure (actually /usr/obj/usr/src/secure) exist?
 >
 >By a previous `make' where /usr/src/secure did exist.
 >
 >I've posted this on behalf of a friend who's been hit by it for the
 >second time...  I believe it's bogus to check for `exist(secure)' in
 >the /usr/obj hierarchy, that's why i've made it a PR.
 
 I forgot that the whole tree for /usr/obj is now usually created.
 
 The check wasn't bogus when obj directories were subdirectories.
 Then NOOBJ or not including anything except bsd.subdir.mk (as in
 src/Makefile) stopped separate obj directories from being created.
 Some other Makefiles (e.g., share/syscons/fonts) still depend on
 this behaviour and get it because they are in leaf directories.
 
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: jkoshy 
State-Changed-When: Thu Apr 8 03:37:57 PDT 1999 
State-Changed-Why:  
As of today (Apr 8 1999), all Makefiles under /usr/src seem to have  
this bug fixed. 
>Unformatted:
