From nobody Tue Aug 22 16:40:31 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RVZpj0qbJz4r6tN for ; Tue, 22 Aug 2023 16:40:45 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RVZph661mz4ZCb for ; Tue, 22 Aug 2023 16:40:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-68a3f1d8be2so2144900b3a.3 for ; Tue, 22 Aug 2023 09:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1692722443; x=1693327243; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=LFk2hW5vE9FBDCgoiF1QdYZEZGy09lrz8P6R4foWs68=; b=AqRoxN9j6zUIsgWOQvQQIo+6uZ+54A89rNOTnlAR6BTkvMJm78L1nHeMeFAVLU7PKR t10+DW5/4HMyfp9n0vR+N/3xHdGIEeNexBLVLHhKckLJe10WxiL0ajf0HA2pEsB0Xd3m rEwHlDwvLlZjnycOyQgJfHqvmBiID3iTke0o8/wg8QjFFeEhgX+YAlCzQA8QcxanSmcF 3gRqhihpW9I2tvpZBOxC2+zT3mtegjWG6rB2Tffj4B9Ipe4Jp0fmxEHoaryHtPTr7E3O TjhnVF7HIujnO4ZjCmZZRYbcnnNFb0M6aHWCMdsW8up0LImesLywqExJF9bOqiltBS1I ikMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692722443; x=1693327243; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LFk2hW5vE9FBDCgoiF1QdYZEZGy09lrz8P6R4foWs68=; b=ZdnBT0rOageqdQNTa/nn1iiHvVftBa0V2//M2UWl/7rK+ljpnG/BRvkUU5f9M+UGo1 AkZdGbVIHKD6aAUiCQqePzQkFhJy2LtsiFnf1rW7zQC8F/gf9iv1769ehtea4Fe6zXP3 YJSqhMO5JGgiwyASVMz2scMjww+vhA3qyP5VIk3ANmdhQcLN39wB1ytMmBcAYV8GX91G 2MWtSxjATLl++j82MpqeEjXgZ57BW2Z7yTCzMX57nRbgQOmNSYmGoWFVbORGovHW38NR WiMrGarhIfE0bB6hUY7lWZCvyeOnGp7IGJU+9tE16rVfbz+EkknrUWMbswSOaFwdSPiE dk5w== X-Gm-Message-State: AOJu0YwonysuegO0gihVc1NDq0gpSOBAU4wheeZUrEh8L1akG1LKzRPr gzNW8BMsC9gdbTZ319it1T+ncD/HbWY= X-Google-Smtp-Source: AGHT+IFdLCA9PTlDi/T9M+c07mkn8440u/zhu9BphsjVm1xSQ+8+6N4muse1Fa/R2vHuvUsIAmPt0Q== X-Received: by 2002:a05:6a20:8e01:b0:135:4527:efe4 with SMTP id y1-20020a056a208e0100b001354527efe4mr13956276pzj.10.1692722443419; Tue, 22 Aug 2023 09:40:43 -0700 (PDT) Received: from smtpclient.apple (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 10-20020aa7914a000000b00689f1ce7dacsm3980382pfi.23.2023.08.22.09.40.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Aug 2023 09:40:42 -0700 (PDT) From: Enji Cooper Message-Id: <2083B385-D726-473F-A2C0-3574F154AFF4@gmail.com> Content-Type: multipart/signed; boundary="Apple-Mail=_3245D8FE-4AF9-4DE1-8E72-D5C73F585FA3"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: src.conf(5) to specify multiple flavours of a port Date: Tue, 22 Aug 2023 09:40:31 -0700 In-Reply-To: <813CD008-5C7D-4664-B605-3F61A2785213@iitbombay.org> Cc: Graham Perrin , FreeBSD CURRENT To: Bakul Shah References: <31c2b00f-a3c4-5608-9776-fa20ea005a45@gmail.com> <813CD008-5C7D-4664-B605-3F61A2785213@iitbombay.org> X-Mailer: Apple Mail (2.3731.600.7) X-Rspamd-Queue-Id: 4RVZph661mz4ZCb X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] --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 wrote: >=20 > On Aug 21, 2023, at 9:24 PM, Graham Perrin = 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
On Aug 21, = 2023, at 10:01 PM, Bakul Shah <bakul@iitbombay.org> = wrote:

On Aug 21, = 2023, at 9:24 PM, Graham Perrin <grahamperrin@gmail.com> = wrote:

In a thread elsewhere, as an = example that did not involve src.conf, Mark Johnston wrote: =

$ cd = /usr/ports/graphics/gpu-firmware-intel-kmod
$ sudo make reinstall = FLAVOR=3Dkabylake

How might I use /etc/src.conf to = achieve much the same, with a different port?

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-- --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--