Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / mk / bsd.makevars.mk
blobbc3dde781de048ce6819e8de0bc7729009e5dc09
1 # $NetBSD: bsd.makevars.mk,v 1.4 2006/07/10 22:59:27 jlam Exp $
3 # This Makefile fragment is included by bsd.prefs.mk to set all of
4 # the variables saved through MAKEVARS. Typical usage is:
6 # .include "../../mk/bsd.prefs.mk"
8 # .if !defined(EXPENSIVE_VAR)
9 # EXPENSIVE_VAR!= ( ... an expensive computation ... )
10 # .endif
11 # MAKEVARS+= EXPENSIVE_VAR
13 # This causes EXPENSIVE_VAR to be computed, then subsequently stored in
14 # the variable cache file. The next time through, EXPENSIVE_VAR is
15 # set by bsd.makevars.mk, which avoids running the expensive computation
16 # again.
18 # The cache files are created as we pass through each phase of the build,
19 # and we only include the latest cache file that was created.
22 _ALL_PHASES= fetch tools extract patch \
23 wrapper configure build stage-install package
24 _REV_ALL_PHASES= package stage-install build configure wrapper \
25 patch extract tools fetch
27 # Try including the *.makevars.mk files in reverse order so that the
28 # latest file is included and no more. We check for _MAKEVARS_MK since
29 # all of the *.makevars.mk files define this symbol at the top of the
30 # file.
32 .for _phase_ in ${_REV_ALL_PHASES}
33 _MAKEVARS_MK.${_phase_}= ${WRKDIR}/.${_phase_}_makevars.mk
34 . if !target(${_phase_}-vars)
35 ${_phase_}-vars: ${_MAKEVARS_MK.${_phase_}}
36 . endif
37 . if !defined(_MAKEVARS_MK)
38 . sinclude "${_MAKEVARS_MK.${_phase_}}"
39 . endif
40 .endfor