Date: Tue, 22 Aug 2023 09:40:31 -0700 From: Enji Cooper <yaneurabeya@gmail.com> To: Bakul Shah <bakul@iitbombay.org> Cc: Graham Perrin <grahamperrin@gmail.com>, FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: src.conf(5) to specify multiple flavours of a port Message-ID: <2083B385-D726-473F-A2C0-3574F154AFF4@gmail.com> In-Reply-To: <813CD008-5C7D-4664-B605-3F61A2785213@iitbombay.org> References: <31c2b00f-a3c4-5608-9776-fa20ea005a45@gmail.com> <813CD008-5C7D-4664-B605-3F61A2785213@iitbombay.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_3245D8FE-4AF9-4DE1-8E72-D5C73F585FA3 Content-Type: multipart/alternative; boundary="Apple-Mail=_D843FC4A-9C45-4D82-8579-A4EC357496CC" --Apple-Mail=_D843FC4A-9C45-4D82-8579-A4EC357496CC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 21, 2023, at 10:01 PM, Bakul Shah <bakul@iitbombay.org> wrote: >=20 > On Aug 21, 2023, at 9:24 PM, Graham Perrin <grahamperrin@gmail.com> = wrote: >>=20 >> In a thread elsewhere, as an example that did not involve src.conf, = Mark Johnston wrote: >>=20 >>> $ cd /usr/ports/graphics/gpu-firmware-intel-kmod >>> $ sudo make reinstall FLAVOR=3Dkabylake >>=20 >> How might I use /etc/src.conf to achieve much the same, with a = different port? >=20 > Since /etc/src.conf is included from make, may be you can use some = make feature > for conditional define? I think there=E2=80=99s some confusion=E2=80=A6 /etc/make.conf is always = included by bmake; /etc/src.conf is only included when building the base = system. FreeBSD ports doesn=E2=80=99t have a special systemwide config file like = the base system for toggling build/install behavior, but it does have = "${PORTSDIR}/Mk/bsd.local.mk=E2=80=9D . -Enji $ grep -r /etc/src.conf share/mk/ share/mk/src.opts.mk:# Users define WITH_FOO and WITHOUT_FOO on the = command line or in /etc/src.conf share/mk/src.opts.mk:# to set via WITH_*/WITHOUT_* in /etc/src.conf and = override in the share/mk/bsd.port.mk:# Needed to keep bsd.own.mk from reading in = /etc/src.conf share/mk/bsd.opts.mk:# Users define WITH_FOO and WITHOUT_FOO on the = command line or in /etc/src.conf share/mk/bsd.opts.mk:# to set via WITH_*/WITHOUT_* in /etc/src.conf and = override in the share/mk/src.sys.mk:SRCCONF?=3D /etc/src.conf share/mk/src.sys.mk: (exists(${SRCCONF}) || ${SRCCONF} !=3D = "/etc/src.conf") && \ --Apple-Mail=_D843FC4A-9C45-4D82-8579-A4EC357496CC Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: = after-white-space;"><br><div><blockquote type=3D"cite"><div>On Aug 21, = 2023, at 10:01 PM, Bakul Shah <bakul@iitbombay.org> = wrote:</div><br class=3D"Apple-interchange-newline"><div><div>On Aug 21, = 2023, at 9:24 PM, Graham Perrin <grahamperrin@gmail.com> = wrote:<br><blockquote type=3D"cite"><br>In a thread elsewhere, as an = example that did not involve src.conf, Mark Johnston wrote: = <br><br><blockquote type=3D"cite">$ cd = /usr/ports/graphics/gpu-firmware-intel-kmod<br>$ sudo make reinstall = FLAVOR=3Dkabylake<br></blockquote><br>How might I use /etc/src.conf to = achieve much the same, with a different port?<br></blockquote><br>Since = /etc/src.conf is included from make, may be you can use some make = feature<br>for conditional define? = <br></div></div></blockquote></div><br><div>I think there=E2=80=99s some = confusion=E2=80=A6 /etc/make.conf is always included by bmake; = /etc/src.conf is only included when building the base = system.</div><div>FreeBSD ports doesn=E2=80=99t have a special = systemwide config file like the base system for toggling build/install = behavior, but it does have "${PORTSDIR}/Mk/bsd.local.mk=E2=80=9D = .</div><div>-Enji</div><div><br></div><div><p style=3D"margin: 0px; = font-stretch: normal; line-height: normal; font-family: "Andale = Mono"; font-size-adjust: none; font-kerning: auto; = font-variant-alternates: normal; font-variant-ligatures: normal; = font-variant-numeric: normal; font-variant-east-asian: normal; = font-variant-position: normal; font-feature-settings: normal; = font-optical-sizing: auto; font-variation-settings: normal; color: = rgb(12, 255, 0); background-color: rgba(255, 255, 255, 0.9);"><span = style=3D"font-variant-ligatures: no-common-ligatures">$ grep -r = /etc/src.conf share/mk/</span></p> <p style=3D"margin: 0px; font-stretch: normal; line-height: normal; = font-family: "Andale Mono"; font-size-adjust: none; = font-kerning: auto; font-variant-alternates: normal; = font-variant-ligatures: normal; font-variant-numeric: normal; = font-variant-east-asian: normal; font-variant-position: normal; = font-feature-settings: normal; font-optical-sizing: auto; = font-variation-settings: normal; color: rgb(12, 255, 0); = background-color: rgba(255, 255, 255, 0.9);"><span = style=3D"font-variant-ligatures: = no-common-ligatures">share/mk/src.opts.mk:# Users define WITH_FOO and = WITHOUT_FOO on the command line or in /etc/src.conf</span></p> <p style=3D"margin: 0px; font-stretch: normal; line-height: normal; = font-family: "Andale Mono"; font-size-adjust: none; = font-kerning: auto; font-variant-alternates: normal; = font-variant-ligatures: normal; font-variant-numeric: normal; = font-variant-east-asian: normal; font-variant-position: normal; = font-feature-settings: normal; font-optical-sizing: auto; = font-variation-settings: normal; color: rgb(12, 255, 0); = background-color: rgba(255, 255, 255, 0.9);"><span = style=3D"font-variant-ligatures: = no-common-ligatures">share/mk/src.opts.mk:# to set via WITH_*/WITHOUT_* = in /etc/src.conf and override in the</span></p> <p style=3D"margin: 0px; font-stretch: normal; line-height: normal; = font-family: "Andale Mono"; font-size-adjust: none; = font-kerning: auto; font-variant-alternates: normal; = font-variant-ligatures: normal; font-variant-numeric: normal; = font-variant-east-asian: normal; font-variant-position: normal; = font-feature-settings: normal; font-optical-sizing: auto; = font-variation-settings: normal; color: rgb(12, 255, 0); = background-color: rgba(255, 255, 255, 0.9);"><span = style=3D"font-variant-ligatures: = no-common-ligatures">share/mk/bsd.port.mk:# Needed to keep bsd.own.mk = from reading in /etc/src.conf</span></p> <p style=3D"margin: 0px; font-stretch: normal; line-height: normal; = font-family: "Andale Mono"; font-size-adjust: none; = font-kerning: auto; font-variant-alternates: normal; = font-variant-ligatures: normal; font-variant-numeric: normal; = font-variant-east-asian: normal; font-variant-position: normal; = font-feature-settings: normal; font-optical-sizing: auto; = font-variation-settings: normal; color: rgb(12, 255, 0); = background-color: rgba(255, 255, 255, 0.9);"><span = style=3D"font-variant-ligatures: = no-common-ligatures">share/mk/bsd.opts.mk:# Users define WITH_FOO and = WITHOUT_FOO on the command line or in /etc/src.conf</span></p> <p style=3D"margin: 0px; font-stretch: normal; line-height: normal; = font-family: "Andale Mono"; font-size-adjust: none; = font-kerning: auto; font-variant-alternates: normal; = font-variant-ligatures: normal; font-variant-numeric: normal; = font-variant-east-asian: normal; font-variant-position: normal; = font-feature-settings: normal; font-optical-sizing: auto; = font-variation-settings: normal; color: rgb(12, 255, 0); = background-color: rgba(255, 255, 255, 0.9);"><span = style=3D"font-variant-ligatures: = no-common-ligatures">share/mk/bsd.opts.mk:# to set via WITH_*/WITHOUT_* = in /etc/src.conf and override in the</span></p> <p style=3D"margin: 0px; font-stretch: normal; line-height: normal; = font-family: "Andale Mono"; font-size-adjust: none; = font-kerning: auto; font-variant-alternates: normal; = font-variant-ligatures: normal; font-variant-numeric: normal; = font-variant-east-asian: normal; font-variant-position: normal; = font-feature-settings: normal; font-optical-sizing: auto; = font-variation-settings: normal; color: rgb(12, 255, 0); = background-color: rgba(255, 255, 255, 0.9);"><span = style=3D"font-variant-ligatures: = no-common-ligatures">share/mk/src.sys.mk:SRCCONF?=3D = /etc/src.conf</span></p> <p style=3D"margin: 0px; font-stretch: normal; line-height: normal; = font-family: "Andale Mono"; font-size-adjust: none; = font-kerning: auto; font-variant-alternates: normal; = font-variant-ligatures: normal; font-variant-numeric: normal; = font-variant-east-asian: normal; font-variant-position: normal; = font-feature-settings: normal; font-optical-sizing: auto; = font-variation-settings: normal; color: rgb(12, 255, 0); = background-color: rgba(255, 255, 255, 0.9);"><span = style=3D"font-variant-ligatures: = no-common-ligatures">share/mk/src.sys.mk: = (exists(${SRCCONF}) || ${SRCCONF} !=3D "/etc/src.conf") && = \</span></p></div></body></html>= --Apple-Mail=_D843FC4A-9C45-4D82-8579-A4EC357496CC-- --Apple-Mail=_3245D8FE-4AF9-4DE1-8E72-D5C73F585FA3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEtvtxN6kOllEF3nmX5JFNMZeDGN4FAmTk5P8ACgkQ5JFNMZeD GN6uCQ//cUdCEfiHw0obKevARyOVubnH1liA5QLwTRpZSwZKbo0pa6MeemzfUs4j Jx+DxC6DIZyxpOX94Zxd6QxrkIVmd30RAJ8UubdTQYKJFYCIkBVHFb/d2P2ceLPR ZvQja00qDLfZQiz3tBqKR1/zGdAIVVCWNjBbjhV7Meswy6e1cMBph9mso2b60VSI wzARb8WZwg0rn5KQO61TBKAgLfd53lt7u0O2J6phkr+AiJ5Ov7tOFIJIlmhlhhoy 9TsiL5+kc4CX3xk4F4WotTuc+2aaCJFNYy1dzaJkOjhcGYQkMWB7i0E5QWWHxdrL Mb9OQr9gkuyx2oh8Pmo1Unxvje2CNUXx0mKVAUz62XADQSxQUQMQKIzF2biGlLqe UvJgH6NZKqva7cJjhBKmLtz0l/2lJ/rgg1ImNOW36LLSIlHkSvPx9JMM/2eanV2v E9OjoTbBF1ZJmkoVUjJ0rtUABTFdJfOy9z8jl+xYBIR9poo4GH0QA/PWFO9J32M6 NjxYePMCPVyPvPYW+GfyaSP3mqonoNap4uEaJopNBeXGR5YwdoC+Fd+BaaJh8Jsj pZ14YtmnQbG9/5gN9qxeYjYcybRmvfxElMw3cggyqPl7KjhfrJ8OmCfC8avEYP7Q CCbUhQ6JnGMST3b8mGN9KS3li7+ENKbSslo00/MwlhMBXiu/V3Q= =NlAV -----END PGP SIGNATURE----- --Apple-Mail=_3245D8FE-4AF9-4DE1-8E72-D5C73F585FA3--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2083B385-D726-473F-A2C0-3574F154AFF4>