Date: Tue, 29 Nov 2022 09:47:48 +0300 From: Gleb Popov <arrowd@freebsd.org> To: Matthias Fechner <idefix@fechner.net> Cc: ports@freebsd.org Subject: Re: Question to EXTRACT_ONLY Message-ID: <CALH631n-pfxYHOt20jwW_nF45qT5ZDOYp4AqfPHBVWjiSUjyrg@mail.gmail.com> In-Reply-To: <d18af3af-d89c-2adc-4f79-3147a4e59f60@fechner.net> References: <667de09b-c23f-42e4-00ba-c52e4266c23a@fechner.net> <d18af3af-d89c-2adc-4f79-3147a4e59f60@fechner.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 29, 2022 at 12:14 AM Matthias Fechner <idefix@fechner.net> wrote: > > Dear all, > > I found some good explanation in `man make`, but some questions are > open, maybe someone can give a little bit more insight. > > On 28.11.22 19:12, Matthias Fechner wrote: > > EXTRACT_ONLY= ${ALLFILES:Nprebuilt*:} > it takes the variable ${ALLFILES}, the :N operator removes everything > that matches, so in this case every string that begins with prebuilt is > removed. > But what does the last `:` at the end of this string? > > > > EXTRACT_ONLY+= ${DISTFILES:N*.mod\:*:N*.mod:C/:.*//} > > So if I understood this correctly at takes the variable ${DISTFILES} and > removes everything that matches `*.mod:*`. > Then as next it removes everything that matches `*.mod`. > As last step a regular expression is executed that removes `:*` (the * > is here any character), so the string `ksdjhe:sdhg34` is changed to > `ksdjhe`. This one is a correct interpretation. As for the first one, I'm also unsure about the last ":" Maybe it is a part of the :N argument?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631n-pfxYHOt20jwW_nF45qT5ZDOYp4AqfPHBVWjiSUjyrg>