Subject: pkg/32745: pkgsrc mk-files use wrong include paths
To: None <firstname.lastname@example.org, email@example.com,>
From: None <firstname.lastname@example.org>
Date: 02/05/2006 10:15:01
>Synopsis: pkgsrc mk-files use wrong include paths
>Arrival-Date: Sun Feb 05 10:15:01 +0000 2006
>Originator: Michael van Elst
>Release: NetBSD 3.0_STABLE
Michael van Elst
"A potential Snark may lurk in every tree."
System: NetBSD henery 3.0_STABLE NetBSD 3.0_STABLE (HENERY) #26: Sat Jan 28 20:13:18 CET 2006 src@henery:/usr/obj/home/src/sys/arch/i386/compile/HENERY i386
pkgsrc mk-files use relative file paths to include other mk-files.
E.g.: mk/bsd.pkg.mk includes "../../mk/bsd.prefs.mk".
This assumes that the file is read relative to the current directory
of the make process.
make however uses a more complicated scheme to locate include files.
In particular, it first appends the include path to the directory
where the file is located that contained the .include statement.
E.g. mk/bsd.pkg.mk tries to include mk/../../mk/bsd.prefs.mk
which is even outside the pkgsrc tree.
pkgsrc still works, because you rarely have a mk-directory next
to the pkgsrc directory and make tries to locate the file also
in some standard directories and finally relative to the current
directory where it then is found.
Replace the include paths with correct paths reflecting the
position in the pkgsrc tree. E.g.
mk/bsd.pkg.mk should simply include "bsd.prefs.mk"
mk/buildlink3/*.mk should include "../bsd.prefs.mk"
and so on..