This is based on the decision The NetBSD Foundation made in 2008 to
do so, which was already applied to src.
This change has been applied to code which is likely not in other
repositories.
ok board@, reviewed by riastradh@
This changes the buildlink3.mk files to use an include guard for the
recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS,
BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new
variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of
enter/exit marker, which can be used to reconstruct the tree and
to determine first level includes. Avoiding := for large variables
(BUILDLINK_ORDER) speeds up parse time as += has linear complexity.
The include guard reduces system time by avoiding reading files over and
over again. For complex packages this reduces both %user and %sys time to
half of the former time.
time, the !empty(BUILDLINK_DEPTH:M+) lines confused me, so I changed
them to be ${BUILDLINK_DEPTH} == "+", which has the same effect. Changed
the version number to 3.12.
comment them out by default, and add a comment above them indicating that
only *directly* needed dependencies should be in the (edited, final) bl3
file.
This will hopefully encourage folks to reduce the amount of unnecessary bl3
recursion that is rampant in pkgsrc, making many packages "depend" directly
on APIs they never see nor use.
create PLIST awk substitution patterns for directories created by the
current package. This is particularly useful for base packages that
create a directory structure that is then used by subsequent (dependent)
packages.
Make buildlink3.mk file output the default, and ignore any "-3" flags
on the command line for people who can't change their habits quickly.
Increase version to 3.5.
include creating buildlink3.mk files that include other buildlink3.mk
files outside of the region that is protected against multiple inclusion.
This is required to fix a bug in properly ordering the packages listed
in BUILDLINK_PACKAGES.
- Do not include pkgconfig's nor intltool's dependancies in new generated bl2
files. These are *build* dependancies, and the package providing the bl2
should not assume we will be using them.
* when creating BUILDLINK_CONFIG_WRAPPER_SED we also need to create
a corresponding REPLACE_BUILDLINK_SED to reverse the effects
* account for packages that set USE_X11BASE to an empty string.
* create BUILDLINK_CONFIG_WRAPPER_SED patterns if required
* interpret "Makefile.common" as well as "Makefile" for packages
that share common information
issues pointed out in private email by Thomas Klausner:
* Include $PKGVERSION instead of RCS revision in script output
* Add a few line breaks to make the output more readable
* -buildlink-config-wrapper is a hardcoded suffix in
bsd.buildlink.mk. Therefore, make sure the created config wapper
targets actually have this suffix.
* Prevent pkgconfig logic from twice including
pkgconfig/buildlink.mk
* Add missing \" in created sed rules
* Include createbuildlink revision in created files
a buildlink.mk from a package's Makefile and PLIST.
XXX: this is an attempt to make the creation of buildlink.mk files more
XXX: systematic and less error-prone than copying existing buildlink.mk
XXX: files and modifying them for a new package. Any help in making this
XXX: script less simplistic and more versatile is gladly welcome!