| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: bsd.buildlink3.mk,v 1.203 2008/06/22 23:54:06 dholland Exp $ | | 1 | # $NetBSD: bsd.buildlink3.mk,v 1.204 2009/03/16 18:37:07 joerg Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 2004 The NetBSD Foundation, Inc. | | 3 | # Copyright (c) 2004 The NetBSD Foundation, Inc. |
4 | # All rights reserved. | | 4 | # All rights reserved. |
5 | # | | 5 | # |
6 | # This code is derived from software contributed to The NetBSD Foundation | | 6 | # This code is derived from software contributed to The NetBSD Foundation |
7 | # by Johnny C. Lam. | | 7 | # by Johnny C. Lam. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -71,39 +71,26 @@ | | | @@ -71,39 +71,26 @@ |
71 | # the base system, then it should provide an appropriate value for | | 71 | # the base system, then it should provide an appropriate value for |
72 | # BUILDLINK_PREFIX.<pkg> for that case. The case where a dependency is | | 72 | # BUILDLINK_PREFIX.<pkg> for that case. The case where a dependency is |
73 | # satisfied by a pkgsrc-installed package is handled automatically by this | | 73 | # satisfied by a pkgsrc-installed package is handled automatically by this |
74 | # file. | | 74 | # file. |
75 | # | | 75 | # |
76 | # The different variables that may be set in a buildlink3.mk file are | | 76 | # The different variables that may be set in a buildlink3.mk file are |
77 | # described below. | | 77 | # described below. |
78 | # | | 78 | # |
79 | # The variable name convention used in this Makefile are: | | 79 | # The variable name convention used in this Makefile are: |
80 | # | | 80 | # |
81 | # BUILDLINK_* public buildlink-related variables usable in other Makefiles | | 81 | # BUILDLINK_* public buildlink-related variables usable in other Makefiles |
82 | # _BLNK_* private buildlink-related variables to this Makefile | | 82 | # _BLNK_* private buildlink-related variables to this Makefile |
83 | | | 83 | |
84 | _VARGROUPS+= bl3 | | | |
85 | .for v in BINDIR CFLAGS CPPFLAGS DEPENDS LDFLAGS LIBS | | | |
86 | _SYS_VARS.bl3+= BUILDLINK_${v} | | | |
87 | .endfor | | | |
88 | .for p in ${BUILDLINK_PACKAGES} | | | |
89 | . for v in AUTO_VARS BUILTIN_MK CONTENTS_FILTER CPPFLAGS DEPMETHOD FILES_CMD INCDIRS IS_DEPOT LDFLAGS LIBDIRS PKGNAME PREFIX RPATHDIRS | | | |
90 | _SYS_VARS.bl3+= BUILDLINK_${v}.${p} | | | |
91 | . endfor | | | |
92 | . for v in IGNORE_PKG USE_BUILTIN | | | |
93 | _SYS_VARS.bl3+= ${v}.${p} | | | |
94 | . endfor | | | |
95 | .endfor | | | |
96 | | | | |
97 | .if ${PKG_DEBUG_LEVEL} > 0 | | 84 | .if ${PKG_DEBUG_LEVEL} > 0 |
98 | ECHO_BUILDLINK_MSG?= ${ECHO} | | 85 | ECHO_BUILDLINK_MSG?= ${ECHO} |
99 | .else | | 86 | .else |
100 | ECHO_BUILDLINK_MSG?= ${ECHO_WRAPPER_MSG} | | 87 | ECHO_BUILDLINK_MSG?= ${ECHO_WRAPPER_MSG} |
101 | .endif | | 88 | .endif |
102 | BUILDLINK_DIR= ${WRKDIR}/.buildlink | | 89 | BUILDLINK_DIR= ${WRKDIR}/.buildlink |
103 | BUILDLINK_BINDIR= ${BUILDLINK_DIR}/bin | | 90 | BUILDLINK_BINDIR= ${BUILDLINK_DIR}/bin |
104 | BUILDLINK_SRCDIR= ${.CURDIR}/../../mk/buildlink3 | | 91 | BUILDLINK_SRCDIR= ${.CURDIR}/../../mk/buildlink3 |
105 | .if ${X11_TYPE} == "modular" | | 92 | .if ${X11_TYPE} == "modular" |
106 | BUILDLINK_X11_DIR= ${BUILDLINK_DIR} | | 93 | BUILDLINK_X11_DIR= ${BUILDLINK_DIR} |
107 | .else | | 94 | .else |
108 | BUILDLINK_X11_DIR= ${BUILDLINK_DIR:H}/.x11-buildlink | | 95 | BUILDLINK_X11_DIR= ${BUILDLINK_DIR:H}/.x11-buildlink |
109 | .endif | | 96 | .endif |
| @@ -139,26 +126,39 @@ MAKEFLAGS+= IGNORE_PKG.${_pkg_}=${IGNOR | | | @@ -139,26 +126,39 @@ MAKEFLAGS+= IGNORE_PKG.${_pkg_}=${IGNOR |
139 | . endif | | 126 | . endif |
140 | .endfor | | 127 | .endfor |
141 | | | 128 | |
142 | # _BLNK_PACKAGES contains all of the unique elements of BUILDLINK_PACKAGES | | 129 | # _BLNK_PACKAGES contains all of the unique elements of BUILDLINK_PACKAGES |
143 | # that shouldn't be skipped. | | 130 | # that shouldn't be skipped. |
144 | # | | 131 | # |
145 | _BLNK_PACKAGES= # empty | | 132 | _BLNK_PACKAGES= # empty |
146 | .for _pkg_ in ${BUILDLINK_PACKAGES} | | 133 | .for _pkg_ in ${BUILDLINK_PACKAGES} |
147 | . if empty(_BLNK_PACKAGES:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_}) | | 134 | . if empty(_BLNK_PACKAGES:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_}) |
148 | _BLNK_PACKAGES+= ${_pkg_} | | 135 | _BLNK_PACKAGES+= ${_pkg_} |
149 | . endif | | 136 | . endif |
150 | .endfor | | 137 | .endfor |
151 | | | 138 | |
| | | 139 | _VARGROUPS+= bl3 |
| | | 140 | .for v in BINDIR CFLAGS CPPFLAGS DEPENDS LDFLAGS LIBS |
| | | 141 | _SYS_VARS.bl3+= BUILDLINK_${v} |
| | | 142 | .endfor |
| | | 143 | .for p in ${BUILDLINK_PACKAGES} |
| | | 144 | . for v in AUTO_VARS BUILTIN_MK CONTENTS_FILTER CPPFLAGS DEPMETHOD FILES_CMD INCDIRS IS_DEPOT LDFLAGS LIBDIRS PKGNAME PREFIX RPATHDIRS |
| | | 145 | _SYS_VARS.bl3+= BUILDLINK_${v}.${p} |
| | | 146 | . endfor |
| | | 147 | . for v in IGNORE_PKG USE_BUILTIN |
| | | 148 | _SYS_VARS.bl3+= ${v}.${p} |
| | | 149 | . endfor |
| | | 150 | .endfor |
| | | 151 | |
152 | # By default, every package receives a full dependency. | | 152 | # By default, every package receives a full dependency. |
153 | .for _pkg_ in ${_BLNK_PACKAGES} | | 153 | .for _pkg_ in ${_BLNK_PACKAGES} |
154 | BUILDLINK_DEPMETHOD.${_pkg_}?= full | | 154 | BUILDLINK_DEPMETHOD.${_pkg_}?= full |
155 | .endfor | | 155 | .endfor |
156 | | | 156 | |
157 | # _BLNK_DEPENDS contains all of the elements of _BLNK_PACKAGES for which | | 157 | # _BLNK_DEPENDS contains all of the elements of _BLNK_PACKAGES for which |
158 | # we must add a dependency. We add a dependency if we aren't using the | | 158 | # we must add a dependency. We add a dependency if we aren't using the |
159 | # built-in version of the package, and the package was either explicitly | | 159 | # built-in version of the package, and the package was either explicitly |
160 | # requested as a dependency (BUILDLINK_DEPENDS) or is a build dependency | | 160 | # requested as a dependency (BUILDLINK_DEPENDS) or is a build dependency |
161 | # somewhere in the chain. | | 161 | # somewhere in the chain. |
162 | # | | 162 | # |
163 | _BLNK_DEPENDS= # empty | | 163 | _BLNK_DEPENDS= # empty |
164 | .for _pkg_ in ${_BLNK_PACKAGES} | | 164 | .for _pkg_ in ${_BLNK_PACKAGES} |