Date: Mon, 17 Mar 2008 18:14:48 +0100 From: Pietro Cerutti <gahr@FreeBSD.org> To: Harti Brandt <harti@freebsd.org>, freebsd-current <freebsd-current@freebsd.org> Subject: Re: [patch] include_once in make Message-ID: <47DEA708.8070509@FreeBSD.org> In-Reply-To: <20080317173110.O42984@knop-beagle.kn.op.dlr.de> References: <47DE9BC7.7040108@FreeBSD.org> <20080317173110.O42984@knop-beagle.kn.op.dlr.de>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47DEA708.8070509>