From owner-freebsd-current@FreeBSD.ORG Thu Aug 25 18:37:11 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC7D416A41F for ; Thu, 25 Aug 2005 18:37:11 +0000 (GMT) (envelope-from Emanuel.strobl@gmx.net) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id A603843D45 for ; Thu, 25 Aug 2005 18:37:09 +0000 (GMT) (envelope-from Emanuel.strobl@gmx.net) Received: (qmail invoked by alias); 25 Aug 2005 18:37:08 -0000 Received: from flb.schmalzbauer.de (EHLO cale.flintsbach.schmalzbauer.de) [62.245.232.135] by mail.gmx.net (mp025) with SMTP; 25 Aug 2005 20:37:08 +0200 X-Authenticated: #301138 From: Emanuel Strobl To: David Kirchner , freebsd-questions@freebsd.org, freebsd-current@freebsd.org Date: Thu, 25 Aug 2005 20:36:52 +0200 User-Agent: KMail/1.8.1 References: <200508251951.37319@harrymail> <35c231bf05082511101884faf@mail.gmail.com> In-Reply-To: <35c231bf05082511101884faf@mail.gmail.com> X-Birthday: Oct. 6th 1972 X-CelPhone: +49 (0) 173 9967781 X-Tel: +49 (0) 89 18947781 X-Country: Germany X-Address: Munich, 80686 X-OS: FreeBSD MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1717290.fUS4t3WGq6"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200508252037.04779@harrymail> X-Y-GMX-Trusted: 0 Cc: Subject: Re: make ".if exists" problem/question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2005 18:37:12 -0000 --nextPart1717290.fUS4t3WGq6 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Am Donnerstag, 25. August 2005 20:10 CEST schrieb David Kirchner: > On 8/25/05, Emanuel Strobl wrote: > > Dear make gurus (bsd make, not gmake), > > > > it seems that make checks .if directives only at statrup. How can I > > trigger a "reread"? > > I have the problem that in one target I create a filetree, another > > target checks if it exists, if not it creates itself again. Now it > > works perfectly when I call the two targets both externally > > (installcfworld installcfconfig) but when the internal higher > > "install" gets to the installcfconfig target it fails! > > I'm really desperate, I need to check this. Is this a nasty bug? > > This Makefile shows the problem: > > all: > .if ! exists(./foobar) > @echo foobar does not exist > .endif > touch foobar > .if ! exists(./foobar) > @echo foobar does not exist > .endif > > If you run make in this directory, and foobar does not already exist > beforehand: > > $ make > foobar does not exist > touch foobar > foobar does not exist > > Looking at the make source, it appears that it maintains a cache for > file lookups, and I don't see a way to have it flush the hash via some > makefile command. I dunno if it is a bug but the man page does not > mention a cache. > > I wonder if you'll have to start a separate make process for each > stage of that target's handling. Thanks for your suggestion, you described exactly what I mean. So if=20 there's no way to flush the cache, it's IMHO a wrong behaviour and should=20 be considered as bug. I'm not too experienced in make, so I don't know if I want to call sub=20 makes... Do you have an idea whom to contact regarding the "bug"? Thanks, =2DHarry --nextPart1717290.fUS4t3WGq6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBDDg/QBylq0S4AzzwRAoqqAJ9N/2+ZJ6kW3Kn2XaeZwS8Vt7pXuACfeS4l qYSFNWm08LNDiApwDeTz5nQ= =d1wd -----END PGP SIGNATURE----- --nextPart1717290.fUS4t3WGq6--