diff options
author | jlam <jlam@pkgsrc.org> | 2005-05-09 05:06:55 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-05-09 05:06:55 +0000 |
commit | 0c870bf95b6898bfe0af5fde523138ff85203144 (patch) | |
tree | 3bff071687c8b973f251436d751c2dc954d88ba6 /x11/kdelibs3 | |
parent | d61e46705b3b5af3155876bad19a502751f03af4 (diff) | |
download | pkgsrc-0c870bf95b6898bfe0af5fde523138ff85203144.tar.gz |
Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
caches variable definitions that were computed by make. These variables
are specified by listing them in MAKE_VARS, e.g.,
.if !defined(FOO)
FOO!= very_time_consuming_command
.endif
MAKE_VARS+= FOO
bsd.pkg.mk will include only the one generated during the most recent
phase. A particular phase's makevars.mk file consists of variable
definitions that are a superset of all of the ones produced in previous
phases of the build.
The caching is useful because bsd.pkg.mk invokes make recursively,
which in the example above has the potential to run the very time-consuming
command each time unless we cause FOO to be defined for the sub-make
processes. We don't cache via MAKE_FLAGS because MAKE_FLAGS isn't
consistently applied to every invocation of make, and also because
MAKE_FLAGS can overflow the maximum length of a make variable very
quickly if we add many values to it.
One important and desirable property of variables cached via MAKE_VARS
is that they only apply to the current package, and not to any
dependencies whose builds may have been triggered by the current
package.
The makevars.mk files are generated by new targets fetch-vars,
extract-vars, patch-vars, etc., and these targets are built during
the corresponding real-* target to ensure that they are being invoked
with PKG_PHASE set to the proper value.
Also, remove the variables cache file that bsd.wrapper.mk was generating
since the new makevars.mk files provide the same functionality at a
higher level. Change all WRAPPER_VARS definitions that were used by
the old wrapper-phase cache file into MAKE_VARS definitions.
Diffstat (limited to 'x11/kdelibs3')
-rw-r--r-- | x11/kdelibs3/buildlink3.mk | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/x11/kdelibs3/buildlink3.mk b/x11/kdelibs3/buildlink3.mk index 8fd57cb315e..90cb329686c 100644 --- a/x11/kdelibs3/buildlink3.mk +++ b/x11/kdelibs3/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.8 2005/05/08 12:03:57 jlam Exp $ +# $NetBSD: buildlink3.mk,v 1.9 2005/05/09 05:06:56 jlam Exp $ BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ KDELIBS_BUILDLINK3_MK:= ${KDELIBS_BUILDLINK3_MK}+ @@ -24,9 +24,9 @@ BUILDLINK_PKGSRCDIR.kdelibs?= ../../x11/kdelibs3 PKG_OPTIONS.kdelibs!= \ cd ${BUILDLINK_PKGSRCDIR.kdelibs} && \ ${MAKE} show-var ${MAKE_FLAGS} VARNAME=PKG_OPTIONS -MAKE_FLAGS+= PKG_OPTIONS.kdelibs=${PKG_OPTIONS.kdelibs:Q} -WRAPPER_VARS+= PKG_OPTIONS.kdelibs +MAKE_FLAGS+= PKG_OPTIONS.kdelibs=${PKG_OPTIONS.kdelibs:Q} .endif +MAKE_VARS+= PKG_OPTIONS.kdelibs .if !empty(PKG_OPTIONS.kdelibs:Mcups) . include "../../print/cups/buildlink3.mk" |