From owner-freebsd-current@FreeBSD.ORG Mon Mar 17 17:14:52 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D28D4106564A for ; Mon, 17 Mar 2008 17:14:52 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4FB8FC19 for ; Mon, 17 Mar 2008 17:14:52 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from doc175-eva98.evard.ch ([213.142.175.98] helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1JbIvD-0006IO-9C; Mon, 17 Mar 2008 18:14:51 +0100 Message-ID: <47DEA708.8070509@FreeBSD.org> Date: Mon, 17 Mar 2008 18:14:48 +0100 From: Pietro Cerutti Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.12 (X11/20080311) MIME-Version: 1.0 To: Harti Brandt , freebsd-current References: <47DE9BC7.7040108@FreeBSD.org> <20080317173110.O42984@knop-beagle.kn.op.dlr.de> In-Reply-To: <20080317173110.O42984@knop-beagle.kn.op.dlr.de> X-Enigmail-Version: 0.95.6 OpenPGP: id=9571F78E; url=http://gahr.ch/pgp/ Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Source: X-Source-Args: X-Source-Dir: Cc: Subject: Re: [patch] include_once in make 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: Mon, 17 Mar 2008 17:14:52 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Harti Brandt wrote: | On Mon, 17 Mar 2008, Pietro Cerutti wrote: | | PC>I have a patch which implements the include_once and sinclude_once | PC>keywords in make. I think it would be useful in cases where a double | PC>include would mess things up (i.e., ports). | PC> | PC>http://people.freebsd.org/~gahr/make.diff | PC> | PC>Any comment is welcome! | | I think your patch silently removes the recently added feature that | Makefiles are only remade when .MAKEFILEDEPS is defined as a target. Uhm.. why should it? | | Style: | | - in Main_AddSourceMakefile you should use the macros and functions from | lst.h instead of rolling your own loop The functions in lst.h don't implement looking for an element comparing lexicographically equal to a given one. It's a specialization of "equals". Better to implement it in lst.c? | - paranthesis missing in return 1. Thanks, fixed | | For the semantics: | | If it's needed, then, well. Given that a Makefile should be declarative | not procedural it looks not strongly necessary, but I may be wrong. It | introduces subtle semantic differences if the included makefile has | procedural elements (.if or .for): | | .include_once Makefile.inc | FOO = 1 | .include_once Makefile.inc | | If Makefile.inc does different things depending on the setting of FOO, bug | hunting will get though, especially if the first .include_once is in and | included file and not easily visible. | | If you're going to commit this, make sure to also document it. | | harti - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEAREKAAYFAkfepwgACgkQwMJqmJVx945BoQCgti30Bsa3OE3P95GwdC3MvOQS Jo0An1s5Druln+5n7QiLJHcMJ75veLe/ =ki7a -----END PGP SIGNATURE-----