Date: Wed, 28 Aug 2002 20:39:31 +0300 From: Peter Pentchev <roam@ringlet.net> To: MikeM <MyRaQ@mgm51.com> Cc: doc@FreeBSD.org Subject: Re: Fwd: Re: How to pass configure parms into a port Message-ID: <20020828173931.GE15716@straylight.oblivion.bg> In-Reply-To: <200208111816430195.003B3E4C@sentry.24cl.com> References: <200208061115140503.0049FE96@sentry.24cl.com> <20020806152707.GB281@freepuppy.bellavista.cz> <200208070920250907.03BA8FFB@sentry.24cl.com> <200208111816430195.003B3E4C@sentry.24cl.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--OwLcNYc0lM97+oe1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 11, 2002 at 06:16:43PM -0400, MikeM wrote: > Hi, >=20 > I was building a port a few days ago, and I stumbled upon the problem > of how to pass parameters to the configure phase of the build process. > I couldn't find a solution in the Handbook, so I posted a question to > the mailing list. I received an answer, and I think it would be > helpful to others if the answer made it to the ports section of the > handbook.=20 >=20 > The important piece of the messages below is the excerpt: >=20 > # make CONFIGURE_ARGS=3D--disable-wrapping install clean >=20 > That's the answer I needed. >=20 > If you have any questions, please let me know. This is all well and good, and even - in some cases! - correct :) However, there is one reason why this will not work in most cases, and another reason why things should be so; that is, why this *should* not work, convenient as it might be. The reason this might not work is that most ports specify their CONFIGURE_ARGS with CONFIGURE_ARGS=3Dblah, using '=3D' instead of '?=3D' or '+=3D'. Thus, they unconditionally override anything you may specify on the command line; the only way to change that would be to use make(1)'s -E option and give the *full* string of arguments, including both your settings and the default settings as seen by 'make -V CONFIGURE_ARGS'. However, this might not be such a good idea; there is a reason why most ports set CONFIGURE_ARGS unconditionally. The reason this *should* not work as specified may be summed up in a single word: dependencies. If you try to build e.g. the mail/qmailadmin port, and you choose to specify additional configure script arguments, e.g. --enable-no-cache=3Dy, the Ports Collection build framework will try to build the mail/vpopmail port as a dependency. Now, if mail/vpopmail did use a CONFIGURE_ARGS?=3D or +=3D assignment, then the arguments passed to the qmailadmin configure script would *still* be in the make(1) environment (the mail/vpopmail build is invoked in a make(1) instance which is a child of the one doing the mail/qmailadmin build; therefore, the CONFIGURE_ARGS set for the qmailadmin build would be in the vpopmail one's environment). The vpopmail configure script would inherit the --enable-no-cache=3Dy option, which you did not intend to pass to it at all :) In some instances, this is harmless: the configure script either complains about the option, or silently ignores it. There are cases, however, when the configure script exits with an error code, breaking the build; there are also cases when your option is actually a valid option for the other port's build, and things may get a bit messed up.. I have a couple of ideas about fixing this situation; however, -doc is not an appropriate place for discussing them, so I will send a separate mail to -ports tomorrow (should have left work two hours ago..). In general, yes, specifying CONFIGURE_ARGS on the make(1) command line may be a good idea; using make -E CONFIGURE_ARGS in addition to that is guaranteed to work - EXCEPT in the case when the port has dependencies. In that case, the -E option would be virtually guaranteed to break things, and even without it, you are on your own :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If the meanings of 'true' and 'false' were switched, then this sentence wou= ldn't be false. --OwLcNYc0lM97+oe1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9bQrT7Ri2jRYZRVMRAsSBAJ9YwKuNhI1EU0ciw+w0g9i0CQL5mgCcDu7K l8BOLFnSCQRxu8rY+iZeg5M= =sK+j -----END PGP SIGNATURE----- --OwLcNYc0lM97+oe1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020828173931.GE15716>