Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Nov 2022 22:14:15 +0100
From:      Matthias Fechner <idefix@fechner.net>
To:        ports@freebsd.org
Subject:   Re: Question to EXTRACT_ONLY
Message-ID:  <d18af3af-d89c-2adc-4f79-3147a4e59f60@fechner.net>
In-Reply-To: <667de09b-c23f-42e4-00ba-c52e4266c23a@fechner.net>
References:  <667de09b-c23f-42e4-00ba-c52e4266c23a@fechner.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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`.

Thanks
Matthias




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d18af3af-d89c-2adc-4f79-3147a4e59f60>