pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/mk



Am 28.09.2023 um 23:08 schrieb Joerg Sonnenberger:
> On Thu, Sep 28, 2023 at 06:40:53PM +0000, Roland Illig wrote:
>> Log Message:
>> mk/curses: don't search for makefiles outside the pkgsrc directory
>
> But this is not how path lookup in make works?

It is.

Make first tries the path relative to the including file, as documented
in the manual page. In usr.bin/make/parse.c, that's implemented in
IncludeFile and FindFileRelative.

If that fails, it tries the path relative to ${.CURDIR} as a fallback.
This fallback is not documented in the manual page, though.

I verified this by adding this line at the top of mk/bsd.pkg.mk:
> .sinclude "../../does-not-exist.mk"

When I ran 'make -v MAKE' in a package directory, make first searched
for '../../../does-not-exist.mk' (outside pkgsrc), falling back to
'../../does-not-exist.mk'.

Same for bmake from pkgsrc.

Roland




Home | Main Index | Thread Index | Old Index