Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jan 2018 13:31:49 +0100
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        "Jason E. Hale" <jhale@freebsd.org>
Cc:        FreeBSD Ports <freebsd-ports@freebsd.org>, FreeBSD Ports Management Team <portmgr@freebsd.org>
Subject:   Re: 'make clean' seemingly broken with FLAVORS
Message-ID:  <20180129123149.awipbe7a34xhh5kk@ogg.in.absolight.net>
In-Reply-To: <CAJE75NG5PeVShnVCdJ-saA7vPPLwiuz65DufbOfgzqzyQ=WSDQ@mail.gmail.com>
References:  <CAJE75NG5PeVShnVCdJ-saA7vPPLwiuz65DufbOfgzqzyQ=WSDQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--ippq43p2jrf7swqw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jan 27, 2018 at 04:05:08PM -0500, Jason E. Hale wrote:
> Just looking for some insight here as I was working on FLAVOR-ifying a
> port and have run into a problem with the PHB information and the
> behavior of 'make clean'.
>=20
> According to PHB 7.2 at the top it recommends:
>=20
> Tip:
> It can help simplify the logic of the Makefile to also define FLAVOR as:
> FLAVOR?=3D ${FLAVORS:[1]}
>=20
> I have found setting this to be problematic when it comes to running
> 'make clean'. If a non-default flavor has been built, the work
> directory of the non-default flavor is left behind after running the
> clean target. I think the expected behavior of the clean target is to
> clean everything.
>=20
> The reason given for setting FLAVOR?=3D ${FLAVORS:[1]} in an individual
> port Makefile is to simplify the logic, i.e. using:
>=20
> .if ${FLAVOR} =3D=3D x11
> instead of:
> .if ${FLAVOR:U} =3D=3D x11

No, instead of:

=2Eif ${FLAVOR:U${FLAVORS:[1]}} =3D=3D x11

> However, leaving FLAVOR empty in the port Makefile allows for the
> simpler logic and allows the clean target to work as expected:
>=20
> FLAVOR?=3D #empty
>=20
> It seems silly to have to set an empty variable, but without it, the
> only way I could achieve the desired behavior of 'make clean' was to
> either keep the :U modifier or put the FLAVOR logic after
> <bsd.port.options.mk>.

Mmmm, maybe make clean with the default flavor could clean all flavors.

--=20
Mathieu Arnold

--ippq43p2jrf7swqw
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAABCgBmBQJabxQ1XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz
QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85I5u8P+QFN1lGGpWALyb55YO38Q53l
eM+BlAOFdyC04B+bq7GxmqlMOy3Di85pQ2NjSYkWodbma44QgTx+8t4ydG30uucW
T574B4mq7WiVHPggPtvwH8bhPXU/wcrBdQ3k3yNzC3spzh4L4GTXU1wJpkrPMB3S
4fzpYKxEBEkMp5yo6zWwChX9orH0PMADxIpnwaKFPoYoisd9Sjblul7ItjrHTa7g
oZGam5W0LvpEinDwq1sQWHZ1a05BlJo0Z5ehglIUtL1to4FYZYgo/26djFqCCKOs
SaPVvaQnYl1swqkspMJsuUmINpSBaGMWmdb+dJeHTpkDEFx8ySZbNr7YGN+V7m8I
BOLNRQf96kYE5eJnoRjZnKoCUUOQ2L9Qb811SNHh4a5Ga8KKKHfjMGKs8B3dacx0
WX4gOPmGOUtJa1pArR3tSKosuNtMarsEUY2sPuomDUTC0N5Lnqtmkxd9Fk9wnvwX
IsxzKTX50yA70sfnBTGpxk1Z2VPKqnLeqjHFfB8CXHtPYaFJOm4gXyIPAEnE9wt/
vhK7ooK+YbXLp3kmFGVGMVVKHkPDj5EucEP50Nj+D0KfQ/rfkchUEIRnf8co/p8a
3XEhY1d0NWz3DdffSYeQ8l+gv1uP5u73H7arQzKNEatKFOvYuIvdvURUQr5/E+4N
U78IvpHXDZLWpJtY7Qu1
=cApv
-----END PGP SIGNATURE-----

--ippq43p2jrf7swqw--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180129123149.awipbe7a34xhh5kk>