On Mon, May 18, 2020 at 03:13:07PM +0200, Marc Espie wrote: > > @@ -1726,6 +1726,18 @@ Used to set DISTFILES default value to $ > > The decompression tool needed will be automatically added as > > .Ev BUILD_DEPENDS . > > Default value is .tar.gz. > > +.It Ev EXTRACT_FILES > > +Set to the list of files to actually extract from distfiles. > > +Its content is subject to shell evaluation as part of > > +.Ev EXTRACT_CASES > > +and passed as > > +.Ar file ... > > +argument to > > +.Xr tar 1 , > This lies, you also pass it to unzip. Fair point, I'll adjust wording a bit.
> I'm a bit queasy with the lack of -- in unzip Afterall it's cosmetics anyway: with `tar ... -- ${EXTRACT_FILES}' you cannot pass options to this tar invocation, but nothing prevents stuff like EXTRACT_FILES='; echo foo'. > > +e.g., shell brace expansion may apply, but > > +.Xr glob 7 > > +patterns must be escaped. > Use ${EXTRACT_FILES:Q} ? No, that breaks brace expansion: $ make show=EXTRACT_FILES coreboot-4.12/{src/commonlib,util} $ make show=EXTRACT_FILES:Q coreboot-4.12/\{src/commonlib,util\} > > +Empty by default to extract all files. > > .It Ev FAKE_FLAGS > > Extra flags passed to ${MAKE_PROGRAM} during the > > fake invocation. > > > > >