From owner-freebsd-bugs Tue Feb 20 22:40:21 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id B4C8C37B65D for ; Tue, 20 Feb 2001 22:40:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f1L6e2c85356; Tue, 20 Feb 2001 22:40:02 -0800 (PST) (envelope-from gnats) Date: Tue, 20 Feb 2001 22:40:02 -0800 (PST) Message-Id: <200102210640.f1L6e2c85356@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Bruce Evans Subject: Re: bin/25232: [PATCH] fix fortune out-of-tree build Reply-To: Bruce Evans Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/25232; it has been noted by GNATS. From: Bruce Evans To: George Reid Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/25232: [PATCH] fix fortune out-of-tree build Date: Wed, 21 Feb 2001 17:31:03 +1100 (EST) On Tue, 20 Feb 2001, George Reid wrote: > >Description: > games/fortune out-of-tree build is broken. > > make tries to include ${CURDIR}../../Makefile.inc which exists in > src/games in-tree. This prevents the program from compiling out-of-tree. > ... > >Fix: > Index: fortune/Makefile > =================================================================== > RCS file: /usr/home/ncvs/src/games/fortune/fortune/Makefile,v > retrieving revision 1.3 > diff -u -r1.3 Makefile > --- fortune/Makefile 1996/09/05 17:13:50 1.3 > +++ fortune/Makefile 2001/02/20 16:54:08 > @@ -6,5 +6,5 @@ > DPADD= ${LIBCOMPAT} > LDADD= -lcompat > > -.include "${.CURDIR}/../../Makefile.inc" > +.include "${.CURDIR}/../Makefile.inc" > .include > ... I just committed an equivalent "fix" (remove these includes; your version of them is duplicated in ). But this is not really right. The Makefile.inc at the next level up (still in the fortune tree) does the old version of the includes (include from 2 levels up, at the top of the games tree), except it does the include conditionally. It should include from 1 level up for technical reasons (so that it doesn't know too much about the depth of the subdirs) and do the include unconditionally so that security-related macros are defined, but including it unconditionally would bring back your out-of-tree problem. I'm not even sure how to test for its existence. `.include' has an undocumented search path, which IIRC begins with the directory of the file containing the include statement and ends with ${.CURDIR}. I'm not sure if this magic does/should apply to exists(). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message