Commit graph

17 commits

Author SHA1 Message Date
joerg
2d1ba244e9 Simply and speed up buildlink3.mk files and processing.
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.
2009-03-20 19:23:50 +00:00
rillig
b2e71313c3 Made the .include lines simpler. 2007-10-17 10:43:36 +00:00
rillig
ee5b4f997c Added documentation. 2007-06-04 08:10:32 +00:00
tron
6d1590abec Set "BUILDLINK_LDFLAGS.dl" to "${BUILDLINK_LDFLAGS.dlcompat}" if we are
using the "dlcompat" package under Mac OS X.

Another attempt to fix PR pkg/36086.
2007-04-27 15:02:37 +00:00
rillig
f6a8043bf5 Replaced the deprecated PKG_SKIP_REASON with PKG_FAIL_REASON. 2007-02-10 08:59:07 +00:00
jlam
c16221a4db Change the format of BUILDLINK_ORDER to contain depth information as well,
and add a new helper target and script, "show-buildlink3", that outputs
a listing of the buildlink3.mk files included as well as the depth at
which they are included.

For example, "make show-buildlink3" in fonts/Xft2 displays:

	zlib
	fontconfig
	    iconv
	    zlib
	    freetype2
	    expat
	freetype2
	Xrender
	    renderproto
2006-07-08 23:10:35 +00:00
jlam
9430e49307 Track information in a new variable BUILDLINK_ORDER that informs us
of the order in which buildlink3.mk files are (recursively) included
by a package Makefile.
2006-07-08 22:38:58 +00:00
rillig
999f8b6e04 Applied all quoting fixes found by "pkglint --autofix". 2005-12-05 22:07:07 +00:00
minskim
af252c5f04 Darwin>=7.0 does not need devel/dlcompat. 2005-06-26 13:11:22 +00:00
jlam
f96609e939 Check that USE_BUILTIN.dl is "yes", not that it's just defined. 2004-11-26 09:32:06 +00:00
jlam
825f6216b4 Split dlopen.buildlink3.mk into two files: dlopen.buildlink3.mk, which
is included by packages that use dlopen(), and dlopen.builtin.mk,
which checks for the presence of built-in dl*() functions.  On Darwin,
including dlopen.buildlink3.mk will cause the devel/dlcompat package
to be used if the base system lacks a dlcompat library.
2004-11-26 07:05:19 +00:00
jlam
67e7448da0 Fix the "MACHINE_PLATFORM" patterns by appending "-*". 2004-11-26 01:58:47 +00:00
jlam
a3af230352 Define DL_{CFLAGS,LDFLAGS,LIBS} as compiler/linker flags for building
or linking code that uses dl*() functions.  Also re-structure a bit to
pave the way for a future dlopen.builtin.mk that handles -ldl on some
platforms and dlcompat on Darwin.
2004-11-26 01:56:17 +00:00
jlam
f551f31daf Missing a make variable modifier. 2004-11-26 01:40:42 +00:00
jlam
cf6bd5fad8 Don't recursively define _DLOPEN_REQUIRE_PTHREADS. 2004-11-25 22:18:34 +00:00
jlam
3c17831da9 Only include pthreads if we prefer native pthreads. This allows building
pkgsrc without any pthreads if we don't want to.
2004-11-25 21:43:19 +00:00
jlam
2e5e6fbf72 dlopen.buildlink3.mk should be added to packages that use dlopen() to
load shared objects.  Some platforms require pthreads to be linked
into the application if it uses dlopen() or else the applications will
core dump when they dlopen a shared module that _is_ linked with
pthread support.  Including dlopen.buildlink3.mk in a package Makefile
will cause pthread.buildlink3.mk to also be included.

It is up to the package to ensure that PTHREAD_{CFLAGS,LDFLAGS,LIBS}
(defined by pthread.buildlink3.mk) are passed to the compiler when
building/linking the applications, possibly by setting PTHREAD_AUTO_VARS
to "yes" in the package Makefile.
2004-11-25 21:33:36 +00:00