Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 831 lines (709 sloc) 25.826 kb
05644d3 Putting bsd.pkginstall.mk under bsd.tools.mk was a bad idea -- the
jlam authored
1 # $NetBSD: bsd.pkg.mk,v 1.1915 2007/07/23 15:23:46 jlam Exp $
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
2 #
970dfa8 move documentation to packages.7. also, remove ts=4 crap.
mrg authored
3 # This file is in the public domain.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
4 #
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce divergen...
tv authored
5 # Please see the pkgsrc/doc/guide manual for details on the
6 # variables used in this make file template.
7 #
5201ee3 Update the comments to reflect the current default workflow.
jlam authored
8 # Default sequence for "all" is:
9 #
d7e7a75 * Add a new stage "bootstrap-depends" that happens before all other
jlam authored
10 # bootstrap-depends
11 # fetch
12 # checksum
13 # depends
14 # tools
15 # extract
16 # patch
b96fa8a After auditing all the packages the ensure that they never invoke the
jlam authored
17 # wrapper
d7e7a75 * Add a new stage "bootstrap-depends" that happens before all other
jlam authored
18 # configure
19 # build
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
20 #
21
00faf00 Fix previous... instead of moving bsd.pkg.barrier.mk down below .MAIN,
jlam authored
22 .MAIN: all
23
7ab0424 Some people really try to run pkgsrc's make with -j5 options. Since that
rillig authored
24 .if defined(.MAKEFLAGS) && !empty(.MAKEFLAGS:M-j*)
25 PKG_FAIL_REASON+= "[bsd.pkg.mk] pkgsrc does not support parallel make for the infrastructure."
a2e94be Added an additional line to the parallel error message.
rillig authored
26 PKG_FAIL_REASON+= "[bsd.pkg.mk] Run \"${MAKE} help topic=make_jobs\" to get some parallelism."
7ab0424 Some people really try to run pkgsrc's make with -j5 options. Since that
rillig authored
27 .endif
28
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
29 # Include any preferences, if not already included, and common definitions
30 .include "${.PARSEDIR}/bsd.prefs.mk"
590bceb Move some variable definitions out of bsd.prefs.mk and back into
jlam authored
31
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
32 .include "${.PARSEDIR}/flavor/bsd.flavor-vars.mk"
33 .include "${.PARSEDIR}/check/bsd.check-vars.mk"
34 .include "${.PARSEDIR}/depends/bsd.depends-vars.mk"
35 .include "${.PARSEDIR}/fetch/bsd.fetch-vars.mk"
36 .include "${.PARSEDIR}/checksum/bsd.checksum-vars.mk"
37 .include "${.PARSEDIR}/extract/bsd.extract-vars.mk"
38 .include "${.PARSEDIR}/patch/bsd.patch-vars.mk"
39 .include "${.PARSEDIR}/configure/bsd.configure-vars.mk"
40 .include "${.PARSEDIR}/build/bsd.build-vars.mk"
41 .include "${.PARSEDIR}/install/bsd.install-vars.mk"
d7e7a75 * Add a new stage "bootstrap-depends" that happens before all other
jlam authored
42
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
43 .include "${.PARSEDIR}/bsd.pkg.error.mk"
590bceb Move some variable definitions out of bsd.prefs.mk and back into
jlam authored
44
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
45 .include "${.PARSEDIR}/bsd.hacks.mk"
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
46
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce divergen...
tv authored
47 ############################################################################
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
48 # Transform package Makefile variables and set defaults
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce divergen...
tv authored
49 ############################################################################
a6fdcd0 Fail-safe check for circular dependencies.
gavan authored
50
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
51 MKCRYPTO?= YES # build crypto packages by default
52
53 ##### Variant spellings
54
55 .if defined(LICENCE) && !defined(LICENSE)
56 LICENSE= ${LICENCE}
57 .endif
58 .if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES)
59 ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES}
60 .endif
61
62 ##### PKGBASE, PKGNAME[_NOREV], PKGVERSION
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
63
a9df889 Oops; use ?= for PKGBASE and PKGVERSION, so pkgs can derive their PKGNAM...
mycroft authored
64 PKGBASE?= ${PKGNAME:C/-[^-]*$//}
65 PKGVERSION?= ${PKGNAME:C/^.*-//}
75f8ab7 Move definition of PKGNAME and PKGNAME_NOREV higher in the file since th...
jlam authored
66 .if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0")
67 . if defined(PKGNAME)
68 PKGNAME_NOREV:= ${PKGNAME}
69 PKGNAME:= ${PKGNAME}nb${PKGREVISION}
70 . else
71 PKGNAME?= ${DISTNAME}nb${PKGREVISION}
72 PKGNAME_NOREV= ${DISTNAME}
73 . endif
74 .else
75 PKGNAME?= ${DISTNAME}
76 PKGNAME_NOREV= ${PKGNAME}
77 .endif
5932545 Add PKGPATH, PKGBASE, PKGVERSION and PKGWILDCARD make(1) variables, so t...
mycroft authored
78
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
79 ##### Others
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
80
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce divergen...
tv authored
81 BUILD_DEPENDS?= # empty
82 COMMENT?= (no description)
83 DEPENDS?= # empty
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
84 DESCR_SRC?= ${PKGDIR}/DESCR
723e0dd Deprecate IS_INTERACTIVE, and introduce a finer-grained INTERACTIVE_STAG...
agc authored
85 INTERACTIVE_STAGE?= none
41176de Point MAINTAINER to pkgsrc-users@NetBSD.org in the case where no
jlam authored
86 MAINTAINER?= pkgsrc-users@NetBSD.org
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
87 PKGWILDCARD?= ${PKGBASE}-[0-9]*
88 SVR4_PKGNAME?= ${PKGNAME}
89 WRKSRC?= ${WRKDIR}/${DISTNAME}
90
91808dd Introduce _SU_ROOT_USER, which can be used for partially unprivileged
joerg authored
91 # Override for SU_CMD user check
92 _SU_ROOT_USER?= ${ROOT_USER}
eddb493 Rename _INSTALL_ROOT_USER to REAL_ROOT_USER. Use it as default for
joerg authored
93 REAL_ROOT_USER?= ${ROOT_USER}
94 REAL_ROOT_GROUP?= ${ROOT_GROUP}
91808dd Introduce _SU_ROOT_USER, which can be used for partially unprivileged
joerg authored
95
9453708 Fix a gleaming illustration of why using YES/NO variables everywhere
tv authored
96 .if (defined(INSTALL_UNSTRIPPED) && !empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) || defined(DEBUG_FLAGS)
97 _INSTALL_UNSTRIPPED= # set (flag used by platform/*.mk)
98 .endif
99
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce divergen...
tv authored
100 ##### Non-overridable constants
101
102 # Latest versions of tools required for correct pkgsrc operation.
3013902 Use new automatic flag; depend on appropriate pkg_install version.
wiz authored
103 PKGTOOLS_REQD= ${_OPSYS_PKGTOOLS_REQD:U20051103}
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce divergen...
tv authored
104
105 ##### Transform USE_* into dependencies
106
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
107 .include "${.PARSEDIR}/bsd.pkg.use.mk"
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce divergen...
tv authored
108
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
109 ############################################################################
110 # Sanity checks
111 ############################################################################
112
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
113 # Fail-safe in the case of circular dependencies
114 .if defined(_PKGSRC_DEPS) && defined(PKGNAME) && !empty(_PKGSRC_DEPS:M${PKGNAME})
1442a6e Whitespace formatting nits.
tv authored
115 PKG_FAIL_REASON+= "Circular dependency detected"
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
116 .endif
117
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
118 # PKG_INSTALLATION_TYPE can only be one of two values: "pkgviews" or
119 # "overwrite".
120 .if (${PKG_INSTALLATION_TYPE} != "pkgviews") && \
121 (${PKG_INSTALLATION_TYPE} != "overwrite")
122 PKG_FAIL_REASON+= "PKG_INSTALLATION_TYPE must be \`\`pkgviews'' or \`\`overwrite''."
123 .endif
124
125 .if empty(PKG_INSTALLATION_TYPES:M${PKG_INSTALLATION_TYPE})
126 PKG_FAIL_REASON+= "This package doesn't support PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE}."
127 .endif
128
129 # Check that we are using up-to-date pkg_* tools with this file.
130 .if !defined(NO_PKGTOOLS_REQD_CHECK)
131 . if ${PKGTOOLS_VERSION} < ${PKGTOOLS_REQD}
4458243 Output PKG_{FAIL,SKIP}_REASON messages to standard error instead of
jlam authored
132 PKG_FAIL_REASON+='The package tools installed on this system are out of date.'
133 PKG_FAIL_REASON+='The installed package tools are dated ${PKGTOOLS_VERSION:C|(....)(..)(..)|\1/\2/\3|} and you must'
134 PKG_FAIL_REASON+='update them to at least ${PKGTOOLS_REQD:C|(....)(..)(..)|\1/\2/\3|} using the following command:'
9b4c639 Fix quoting issue that gave syntax error when printing the message
kristerw authored
135 PKG_FAIL_REASON+=' '
4458243 Output PKG_{FAIL,SKIP}_REASON messages to standard error instead of
jlam authored
136 PKG_FAIL_REASON+=' (cd ${PKGSRCDIR}/pkgtools/pkg_install && ${MAKE} clean && ${MAKE} update)'
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
137 . endif
138 .endif # !NO_PKGTOOLS_REQD_CHECK
139
140 .if defined(ALL_TARGET)
141 PKG_FAIL_REASON+='ALL_TARGET is deprecated and must be replaced with BUILD_TARGET.'
142 .endif
143
144 .if defined(NO_WRKSUBDIR)
145 PKG_FAIL_REASON+='NO_WRKSUBDIR has been deprecated - please replace it with an explicit'
146 PKG_FAIL_REASON+='assignment of WRKSRC= $${WRKDIR}'
147 .endif # NO_WRKSUBDIR
148
149 # We need to make sure the buildlink-x11 package is not installed since it
150 # breaks builds that use imake.
151 .if defined(USE_IMAKE)
152 . if exists(${LOCALBASE}/lib/X11/config/buildlinkX11.def) || \
153 exists(${X11BASE}/lib/X11/config/buildlinkX11.def)
154 PKG_FAIL_REASON+= "${PKGNAME} uses imake, but the buildlink-x11 package was found." \
155 " Please deinstall it (pkg_delete buildlink-x11)."
156 . endif
157 .endif # USE_IMAKE
158
159 .if !defined(CATEGORIES) || !defined(DISTNAME)
160 PKG_FAIL_REASON+='CATEGORIES and DISTNAME are mandatory.'
161 .endif
162
163 .if defined(PKG_PATH)
164 PKG_FAIL_REASON+='Please unset PKG_PATH before doing pkgsrc work!'
165 .endif
166
167 .if defined(MASTER_SITE_SUBDIR)
168 PKG_FAIL_REASON+='MASTER_SITE_SUBDIR is deprecated and must be replaced with MASTER_SITES.'
169 .endif
170
171 .if defined(PATCH_SITE_SUBDIR)
172 PKG_FAIL_REASON+='PATCH_SITE_SUBDIR is deprecated and must be replaced with PATCH_SITES.'
173 .endif
174
175 .if defined(ONLY_FOR_ARCHS) || defined(NOT_FOR_ARCHS) \
176 || defined(ONLY_FOR_OPSYS) || defined(NOT_FOR_OPSYS)
177 PKG_FAIL_REASON+='ONLY/NOT_FOR_ARCHS/OPSYS are deprecated and must be replaced with ONLY/NOT_FOR_PLATFORM.'
178 .endif
179
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
180 # Allow variables to be set on a per-OS basis
181 OPSYSVARS+= CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS
182 .for _var_ in ${OPSYSVARS:O}
183 . if defined(${_var_}.${OPSYS})
184 ${_var_}+= ${${_var_}.${OPSYS}}
185 . elif defined(${_var_}.*)
186 ${_var_}+= ${${_var_}.*}
187 . endif
188 .endfor
189
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
190 CPPFLAGS+= ${CPP_PRECOMP_FLAGS}
7c68701 Removed trailing white-space.
rillig authored
191
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
192 ALL_ENV+= CC=${CC:Q}
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
193 ALL_ENV+= CFLAGS=${CFLAGS:M*:Q}
194 ALL_ENV+= CPPFLAGS=${CPPFLAGS:M*:Q}
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
195 ALL_ENV+= CXX=${CXX:Q}
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
196 ALL_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q}
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
197 ALL_ENV+= COMPILER_RPATH_FLAG=${COMPILER_RPATH_FLAG:Q}
3ac1b0c make sure we correctly set F77. Addresses PR29666
dmcmahill authored
198 ALL_ENV+= F77=${FC:Q}
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
199 ALL_ENV+= FC=${FC:Q}
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
200 ALL_ENV+= FFLAGS=${FFLAGS:M*:Q}
dc9bb84 Reset the current locale to a sane value (that is, 'C') during the build
jmmv authored
201 ALL_ENV+= LANG=C
202 ALL_ENV+= LC_COLLATE=C
203 ALL_ENV+= LC_CTYPE=C
204 ALL_ENV+= LC_MESSAGES=C
205 ALL_ENV+= LC_MONETARY=C
206 ALL_ENV+= LC_NUMERIC=C
207 ALL_ENV+= LC_TIME=C
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
208 ALL_ENV+= LDFLAGS=${LDFLAGS:M*:Q}
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
209 ALL_ENV+= LINKER_RPATH_FLAG=${LINKER_RPATH_FLAG:Q}
210 ALL_ENV+= PATH=${PATH:Q}:${LOCALBASE}/bin:${X11BASE}/bin
211 ALL_ENV+= PREFIX=${PREFIX}
212
5f620a3 The new variable BSD_MAKE_ENV defines BINOWN, BINGRP, etc.
rillig authored
213 # This variable can be added to MAKE_ENV to ease installation of packages
214 # that use BSD-style Makefiles.
215 BSD_MAKE_ENV= BINOWN=${BINOWN} BINGRP=${BINGRP}
216 BSD_MAKE_ENV+= MANOWN=${MANOWN} MANGRP=${MANGRP}
0df1b33 Added INCSDIR and LIBDIR to BSD_MAKE_ENV.
rillig authored
217 BSD_MAKE_ENV+= BINDIR=${PREFIX}/bin
218 BSD_MAKE_ENV+= INCSDIR=${PREFIX}/include
219 BSD_MAKE_ENV+= LIBDIR=${PREFIX}/lib
220 BSD_MAKE_ENV+= MANDIR=${PREFIX}/${PKGMANDIR}
5f620a3 The new variable BSD_MAKE_ENV defines BINOWN, BINGRP, etc.
rillig authored
221
e2f08fa Split the variable BUILD_DEFS into those that are defined by packages
rillig authored
222 _BUILD_DEFS= ${BUILD_DEFS}
be43715 Added LOCALBASE, PKGINFODIR and PKGMANDIR to _BUILD_DEFS, since they
rillig authored
223 _BUILD_DEFS+= LOCALBASE
224 _BUILD_DEFS+= PKGINFODIR
225 _BUILD_DEFS+= PKGMANDIR
e2f08fa Split the variable BUILD_DEFS into those that are defined by packages
rillig authored
226
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
227 # Store the result in the +BUILD_INFO file so we can query for the build
228 # options using "pkg_info -Q PKG_OPTIONS <pkg>".
229 #
230 .if defined(PKG_SUPPORTED_OPTIONS) && defined(PKG_OPTIONS)
e2f08fa Split the variable BUILD_DEFS into those that are defined by packages
rillig authored
231 _BUILD_DEFS+= PKG_OPTIONS
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
232 .endif
723e0dd Deprecate IS_INTERACTIVE, and introduce a finer-grained INTERACTIVE_STAG...
agc authored
233
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
234 .if empty(DEPOT_SUBDIR)
235 PKG_FAIL_REASON+= "DEPOT_SUBDIR may not be empty."
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
236 .endif
e7f1bfb - Integrate xpkgwedge with a switch, USE_LOCALBASE_FOR_X11, which leaves
tv authored
237
8d7abb4 If there is _ZERO_FILESIZE_P, then it's natural to have _NONZERO_FILESIZ...
jlam authored
238 # ZERO_FILESIZE_P exits with a successful return code if the given file
239 # has zero length.
240 # NONZERO_FILESIZE_P exits with a successful return code if the given file
241 # has nonzero length.
f7408c2 Move _ZERO_FILESIZE_P ftom bsd.pkginstall.mk to bsd.pkg.mk so it can mor...
jlam authored
242 #
8d7abb4 If there is _ZERO_FILESIZE_P, then it's natural to have _NONZERO_FILESIZ...
jlam authored
243 _ZERO_FILESIZE_P= ${AWK} 'END { exit (NR > 0) ? 1 : 0; }'
244 _NONZERO_FILESIZE_P= ${AWK} 'END { exit (NR > 0) ? 0 : 1; }'
f7408c2 Move _ZERO_FILESIZE_P ftom bsd.pkginstall.mk to bsd.pkg.mk so it can mor...
jlam authored
245
548c62b Add a new variable "UNLIMIT_RESOURCES" which can be used to raise proces...
tron authored
246 # Automatically increase process limit where necessary for building.
ed673d8 Collapse two .for blocks to improve readability:
tv authored
247 _ULIMIT_CMD= ${UNLIMIT_RESOURCES:@_lim_@${ULIMIT_CMD_${_lim_}};@}
548c62b Add a new variable "UNLIMIT_RESOURCES" which can be used to raise proces...
tron authored
248
fa28732 Introduce the capability to gather all the warnings and errors that
jlam authored
249 _INTERACTIVE_COOKIE= ${.CURDIR}/.interactive_stage
8269c22 Added a leading underscore to the names of the *_COOKIE variables, as th...
rillig authored
250 _NULL_COOKIE= ${WRKDIR}/.null
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
251
252 # Miscellaneous overridable commands:
33ed0c4 Add code to include the size of a package into both the
hubertf authored
253 SHCOMMENT?= ${ECHO_MSG} >/dev/null '***'
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
254
ca2e042 Introduce LIBABISUFFIX for platforms which require ABI-dependant library...
sketch authored
255 LIBABISUFFIX?=
256
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
257 TOUCH_FLAGS?= -f
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
258
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
259 # Debugging levels for this file, dependent on PKG_DEBUG_LEVEL definition
260 # 0 == normal, default, quiet operation
261 # 1 == all shell commands echoed before invocation
262 # 2 == shell "set -x" operation
263 PKG_DEBUG_LEVEL?= 0
264 _PKG_SILENT= @
952a343 When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
jlam authored
265 _PKG_DEBUG= # empty
266 _PKG_DEBUG_SCRIPT= # empty
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
267
268 .if ${PKG_DEBUG_LEVEL} > 0
952a343 When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
jlam authored
269 _PKG_SILENT= # empty
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
270 .endif
271
272 .if ${PKG_DEBUG_LEVEL} > 1
273 _PKG_DEBUG= set -x;
952a343 When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
jlam authored
274 _PKG_DEBUG_SCRIPT= ${SH} -x
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
275 .endif
276
1abf1ad Added a variable RUN (no leading underscore) as abbreviation for
rillig authored
277 # This variable can be prepended to all shell commands that should not
278 # be printed by default, but when PKGSRC_DEBUG_LEVEL is non-zero.
279 # It also re-adds the error checking that has been removed in 2004 to
280 # make bmake conform to POSIX.
281 #
282 RUN= ${_PKG_SILENT}${_PKG_DEBUG} set -e;
283
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
284 # A few aliases for *-install targets
61d3a99 Override the INSTALL setting in sys.mk that messes up the rest of the
jlam authored
285 INSTALL= ${TOOLS_INSTALL} # XXX override sys.mk
804c41e Introduce new variables:
jschauma authored
286 INSTALL_PROGRAM?= \
616dce3 Replace STRIPFLAG with _STRIPFLAG_INSTALL to fix pkg/15467.
yyamano authored
287 ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
804c41e Introduce new variables:
jschauma authored
288 INSTALL_GAME?= \
289 ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEMODE}
290 INSTALL_SCRIPT?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
291 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
804c41e Introduce new variables:
jschauma authored
292 INSTALL_LIB?= \
43e0322 Add a new install macro INSTALL_LIB for use when installing libraries
tv authored
293 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
804c41e Introduce new variables:
jschauma authored
294 INSTALL_DATA?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
295 ${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE}
0e6e504 Introduce GAMEDATAMODE and INSTALL_GAME_DATA, which will take care
jschauma authored
296 INSTALL_GAME_DATA?= \
297 ${INSTALL} ${COPY} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEDATAMODE}
804c41e Introduce new variables:
jschauma authored
298 INSTALL_MAN?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
299 ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
804c41e Introduce new variables:
jschauma authored
300 INSTALL_PROGRAM_DIR?= \
66d391f Create directories with mode 0755, since that is what the mtree
wiz authored
301 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${PKGDIRMODE}
7a1caa6 Add INSTALL_GAME_DIR to complement INSTALL_GAME_DATA. The directories
joerg authored
302 INSTALL_GAME_DIR?= \
303 ${INSTALL} -d -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEDIRMODE}
804c41e Introduce new variables:
jschauma authored
304 INSTALL_SCRIPT_DIR?= \
2fcd7fe Add INSTALL_*_DIR macros.
hubertf authored
305 ${INSTALL_PROGRAM_DIR}
804c41e Introduce new variables:
jschauma authored
306 INSTALL_LIB_DIR?= \
43e0322 Add a new install macro INSTALL_LIB for use when installing libraries
tv authored
307 ${INSTALL_PROGRAM_DIR}
804c41e Introduce new variables:
jschauma authored
308 INSTALL_DATA_DIR?= \
66d391f Create directories with mode 0755, since that is what the mtree
wiz authored
309 ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m ${PKGDIRMODE}
804c41e Introduce new variables:
jschauma authored
310 INSTALL_MAN_DIR?= \
66d391f Create directories with mode 0755, since that is what the mtree
wiz authored
311 ${INSTALL} -d -o ${MANOWN} -g ${MANGRP} -m ${PKGDIRMODE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
312
f4f6304 Fixed some quoting issues.
rillig authored
313 INSTALL_MACROS= BSD_INSTALL_PROGRAM=${INSTALL_PROGRAM:Q} \
314 BSD_INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} \
315 BSD_INSTALL_LIB=${INSTALL_LIB:Q} \
316 BSD_INSTALL_DATA=${INSTALL_DATA:Q} \
317 BSD_INSTALL_MAN=${INSTALL_MAN:Q} \
318 BSD_INSTALL=${INSTALL:Q} \
319 BSD_INSTALL_PROGRAM_DIR=${INSTALL_PROGRAM_DIR:Q} \
320 BSD_INSTALL_SCRIPT_DIR=${INSTALL_SCRIPT_DIR:Q} \
321 BSD_INSTALL_LIB_DIR=${INSTALL_LIB_DIR:Q} \
322 BSD_INSTALL_DATA_DIR=${INSTALL_DATA_DIR:Q} \
323 BSD_INSTALL_MAN_DIR=${INSTALL_MAN_DIR:Q} \
324 BSD_INSTALL_GAME=${INSTALL_GAME:Q} \
7a1caa6 Add INSTALL_GAME_DIR to complement INSTALL_GAME_DATA. The directories
joerg authored
325 BSD_INSTALL_GAME_DATA=${INSTALL_GAME_DATA:Q} \
326 BSD_INSTALL_GAME_DIR=${INSTALL_GAME_DIR:Q}
c4f6669 Added the INFO_MSG command, which can be used when the user should be
rillig authored
327 MAKE_ENV+= ${INSTALL_MACROS:M*}
328 SCRIPTS_ENV+= ${INSTALL_MACROS:M*}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
329
7aec351 Always run the pkginstall framework targets to generate the
jlam authored
330 # If pkgsrc is supposed to ensure that tests are run before installation
331 # of the package, then the build targets should be "build test", otherwise
332 # just "build" suffices.
333 #
334 .if !empty(PKGSRC_RUN_TEST:M[yY][eE][sS])
335 _PKGSRC_BUILD_TARGETS= build test
336 .else
337 _PKGSRC_BUILD_TARGETS= build
338 .endif
339
3e5e966 Refactor configure, build, test and wrapper phases out of bsd.pkg.mk
jlam authored
340 # OVERRIDE_DIRDEPTH represents the common directory depth under
341 # ${WRKSRC} up to which we find the files that need to be
342 # overridden. By default, we search two levels down, i.e.,
343 # */*/file.
344 #
345 OVERRIDE_DIRDEPTH?= 2
346
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
347 # The user can override the NO_PACKAGE by specifying this from
348 # the make command line
349 .if defined(FORCE_PACKAGE)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
350 . undef NO_PACKAGE
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
351 .endif
352
5026c4b Add alternatives.mk, a file used to manipulate the alternatives system.
jmmv authored
353 # Handle alternatives
354 #
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
355 .include "${.PARSEDIR}/alternatives.mk"
5026c4b Add alternatives.mk, a file used to manipulate the alternatives system.
jmmv authored
356
04f7e63 Previous commit to bsd.pkg.mk caught some "SMART_MESSAGES" work - docume...
agc authored
357 # Define SMART_MESSAGES in /etc/mk.conf for messages giving the tree
2899a74 Typo in comment for SMART_MESSAGES.
jlam authored
358 # of dependencies for building, and the current target.
97fe0e1 Use :D and :U constructs in a few more places to collapse some .if defin...
tv authored
359 _PKGSRC_IN?= ===${SMART_MESSAGES:D> ${.TARGET} [${PKGNAME}${_PKGSRC_DEPS}] ===}
fce3306 Fix PACKAGE_DEPENDS_QUICK when installing on Solaris - escape the
agc authored
360
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
361 # Used to print all the '===>' style prompts - override this to turn them off.
362 ECHO_MSG?= ${ECHO}
91faddd Added the variable PHASE_MSG, STEP_MSG, WARNING_MSG and ERROR_MSG to
rillig authored
363 PHASE_MSG?= ${ECHO_MSG} ${_PKGSRC_IN:Q}\>
364 STEP_MSG?= ${ECHO_MSG} "=>"
c4f6669 Added the INFO_MSG command, which can be used when the user should be
rillig authored
365 INFO_MSG?= ${ECHO_MSG} "INFO:"
91faddd Added the variable PHASE_MSG, STEP_MSG, WARNING_MSG and ERROR_MSG to
rillig authored
366 WARNING_MSG?= ${ECHO_MSG} 1>&2 "WARNING:"
367 ERROR_MSG?= ${ECHO_MSG} 1>&2 "ERROR:"
568d582 Added the FAIL command, which can be prepended to an arbitrary shell
rillig authored
368 FAIL_MSG?= ${FAIL} ${ERROR_MSG}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
369
5fdd14f Add WARNING_CAT and ERROR_CAT which are filters for outputting file
jlam authored
370 WARNING_CAT?= ${SED} -e "s|^|WARNING: |" 1>&2
371 ERROR_CAT?= ${SED} -e "s|^|ERROR: |" 1>&2
372
6348997 Introduce TRUE?=/usr/bin/true, and use it.
hubertf authored
373 # How to do nothing. Override if you, for some strange reason, would rather
374 # do something.
375 DO_NADA?= ${TRUE}
376
568d582 Added the FAIL command, which can be prepended to an arbitrary shell
rillig authored
377 # the FAIL command executes its arguments and then exits with a non-zero
378 # status.
379 FAIL?= ${SH} ${PKGSRCDIR}/mk/scripts/fail
380
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNAME ...
jlam authored
381 #
dc0503f Refer doc/pkgsrc.txt instead of Packages.txt.
wiz authored
382 # Config file related settings - see doc/pkgsrc.txt
27734d7 Create a new knob: PKG_SYSCONFVAR
jlam authored
383 #
384 PKG_SYSCONFVAR?= ${PKGBASE}
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNAME ...
jlam authored
385 PKG_SYSCONFSUBDIR?= # empty
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
386 .if ${PKG_INSTALLATION_TYPE} == "overwrite"
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
387 PKG_SYSCONFDEPOTBASE= # empty
b6d609c Package Makefiles should refer to PKG_SYSCONFBASEDIR instead of
jlam authored
388 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE}
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
389 .else
390 . if !empty(PKG_SYSCONFBASE:M${PREFIX}) || \
391 !empty(PKG_SYSCONFBASE:M${PREFIX}/*)
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
392 PKG_SYSCONFDEPOTBASE= # empty
b6d609c Package Makefiles should refer to PKG_SYSCONFBASEDIR instead of
jlam authored
393 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE}
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNAME ...
jlam authored
394 . else
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
395 PKG_SYSCONFDEPOTBASE= ${PKG_SYSCONFBASE}/${DEPOT_SUBDIR}
396 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDEPOTBASE}/${PKGNAME}
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNAME ...
jlam authored
397 . endif
398 .endif
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
399 .if empty(PKG_SYSCONFSUBDIR)
400 DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR}
401 .else
402 DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR}/${PKG_SYSCONFSUBDIR}
403 .endif
404 PKG_SYSCONFDIR= ${DFLT_PKG_SYSCONFDIR}
405 .if defined(PKG_SYSCONFDIR.${PKG_SYSCONFVAR})
406 PKG_SYSCONFDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
407 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
408 PKG_SYSCONFDEPOTBASE= # empty
409 .endif
c09b8c2 Use REAL_ROOT_USER for configuration dirs.
joerg authored
410 PKG_SYSCONFDIR_PERMS?= ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 755
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNAME ...
jlam authored
411
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
412 ALL_ENV+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
e2f08fa Split the variable BUILD_DEFS into those that are defined by packages
rillig authored
413 _BUILD_DEFS+= PKG_SYSCONFBASEDIR PKG_SYSCONFDIR
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNAME ...
jlam authored
414
57095a1 Split replace.mk into two parts, one of which is included by bsd.prefs.m...
jlam authored
415 # These are all of the tools use by pkgsrc Makefiles. This should
416 # eventually be split up into lists of tools required by different
417 # phases of a pkgsrc build.
418 #
adc430f Drop distinction between PKGSRC_USE_TOOLS and USE_TOOLS by making
jlam authored
419 USE_TOOLS+= \
25e3da5 We only need "date" to write the date into the +PRESERVE file.
jlam authored
420 [ awk basename cat chgrp chmod chown cmp cp cut dirname echo \
421 egrep env false file find grep head hostname id install ln ls \
f129ad9 Added printf to USE_TOOLS, because it is used heavily by the "debug" and
rillig authored
422 mkdir mv pax printf pwd rm rmdir sed sh sort \
423 tail test touch tr true wc xargs
29dde03 tsort is only used by bsd.bulk-pkg.mk.
jlam authored
424
d7e7a75 * Add a new stage "bootstrap-depends" that happens before all other
jlam authored
425 USE_TOOLS+= ${NO_CHECKSUM:D:Udigest\:bootstrap}
426
b61b2f5 Fix mistake in previous commit -- expr is required by the wrapper
jlam authored
427 # bsd.wrapper.mk
adc430f Drop distinction between PKGSRC_USE_TOOLS and USE_TOOLS by making
jlam authored
428 USE_TOOLS+= expr
b61b2f5 Fix mistake in previous commit -- expr is required by the wrapper
jlam authored
429
96fda8d tee is only used by bsd.bulk-pkg.mk.
jlam authored
430 # bsd.bulk-pkg.mk uses certain tools
29dde03 tsort is only used by bsd.bulk-pkg.mk.
jlam authored
431 .if defined(BATCH)
adc430f Drop distinction between PKGSRC_USE_TOOLS and USE_TOOLS by making
jlam authored
432 USE_TOOLS+= tee tsort
29dde03 tsort is only used by bsd.bulk-pkg.mk.
jlam authored
433 .endif
44e50ed We only need mtree if NO_MTREE isn't defined.
jlam authored
434
05644d3 Putting bsd.pkginstall.mk under bsd.tools.mk was a bad idea -- the
jlam authored
435 # INSTALL/DEINSTALL script framework
436 .include "${.PARSEDIR}/pkginstall/bsd.pkginstall.mk"
437
5d1a9c9 Fixed the locking, as suggested by Johnny on the tech-pkg mailing list.
rillig authored
438 # Locking
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
439 .include "${.PARSEDIR}/internal/locking.mk"
5ba65b6 Consolidate the bits that add to PKGSRC_USE_TOOLS, and improve the
jlam authored
440
e0d9e4f Finish removing instances of _USE_NEW_TOOLS from pkgsrc.
jlam authored
441 # Tools
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
442 .include "${.PARSEDIR}/tools/bsd.tools.mk"
eccaef6 Move the inclusion of tools.mk ahead of bsd.buildlink3.mk so that tools....
jlam authored
443
00faf00 Fix previous... instead of moving bsd.pkg.barrier.mk down below .MAIN,
jlam authored
444 # Barrier
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
445 .include "${.PARSEDIR}/bsd.pkg.barrier.mk"
00faf00 Fix previous... instead of moving bsd.pkg.barrier.mk down below .MAIN,
jlam authored
446
900210b Simplify unprivileged builds by adding a new variable, UNPRIVILEGED, tha...
jmmv authored
447 # Unprivileged builds
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
448 .include "${.PARSEDIR}/unprivileged.mk"
900210b Simplify unprivileged builds by adding a new variable, UNPRIVILEGED, tha...
jmmv authored
449
5b62a95 compiler.mk uses the following tools to compute the values of variables
jlam authored
450 # If NO_BUILD is defined, default to not needing a compiler.
451 .if defined(NO_BUILD)
452 USE_LANGUAGES?= # empty
453 .endif
454
455 # Get the proper dependencies and set the PATH to use the compiler
456 # named in PKGSRC_COMPILER.
457 #
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
458 .include "${.PARSEDIR}/compiler.mk"
5b62a95 compiler.mk uses the following tools to compute the values of variables
jlam authored
459
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
460 .include "${.PARSEDIR}/wrapper/bsd.wrapper.mk"
93cd8e1 Merge pkgsrc/mk from the buildlink2 branch back into the main trunk.
jlam authored
461
f65fae0 If USE_ABI_DEPENDS=no, do not add the BUILDLINK_ABI_DEPENDS.$pkg
reed authored
462 .if defined(ABI_DEPENDS) || defined(BUILD_ABI_DEPENDS)
fd434aa Over 1200 files touched but no revisions bumped :)
reed authored
463 . if !empty(USE_ABI_DEPENDS:M[yY][eE][sS])
464 DEPENDS+= ${ABI_DEPENDS}
f65fae0 If USE_ABI_DEPENDS=no, do not add the BUILDLINK_ABI_DEPENDS.$pkg
reed authored
465 BUILD_DEPENDS+= ${BUILD_ABI_DEPENDS}
437ad7a Process RECOMMENDED *after* including bsd.buildlink3.mk; else it has no
tv authored
466 . else
e2f08fa Split the variable BUILD_DEFS into those that are defined by packages
rillig authored
467 _BUILD_DEFS+= USE_ABI_DEPENDS
437ad7a Process RECOMMENDED *after* including bsd.buildlink3.mk; else it has no
tv authored
468 . endif
469 .endif
470
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
471 # Find out the PREFIX of dependencies where the PREFIX is needed at build time.
472 .if defined(EVAL_PREFIX)
d0cb1b1 Instead of structuring code so that variables defined by the EVAL_PREFIX
jlam authored
473 FIND_PREFIX:= ${EVAL_PREFIX}
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
474 . include "${.PARSEDIR}/find-prefix.mk"
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
475 .endif
476
477 .if !defined(_PATH_ORIG)
478 _PATH_ORIG:= ${PATH}
479 MAKEFLAGS+= _PATH_ORIG=${_PATH_ORIG:Q}
7007706 Fix handling of PREPEND_PATH in dependency-recursed builds.
tv authored
480 .endif
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
481
e0cb60e Rewrote the _PATH_CMD command, which could not handle a PATH environment
rillig authored
482 .if !empty(PREPEND_PATH:M*)
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
483 # This is very Special. Because PREPEND_PATH is set with += in reverse order,
e0cb60e Rewrote the _PATH_CMD command, which could not handle a PATH environment
rillig authored
484 # this command reverses the order again (since bootstrap bmake doesn't
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
485 # yet support the :[-1..1] construct).
e0cb60e Rewrote the _PATH_CMD command, which could not handle a PATH environment
rillig authored
486 _PATH_CMD= \
487 path=${_PATH_ORIG:Q}; \
488 for i in ${PREPEND_PATH}; do path="$$i:$$path"; done; \
489 ${ECHO} "$$path"
490 PATH= ${_PATH_CMD:sh} # DOES NOT use :=, to defer evaluation
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
491 .endif
1221299 * Move pkgsrc/mk/compiler/bsd.compiler.mk to pkgsrc/mk/compiler.mk.
jlam authored
492
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
493 ################################################################
67feee0 This is NetBSD. s/port/package/g
agc authored
494 # Many ways to disable a package.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
495 #
23b1b09 Revert last change. I only tested this on netbsd-1-4; it doesn't seem to
fredb authored
496 # Ignore packages that can't be resold if building for a CDROM.
3c860ad Introduce a new category, "crypto", with a special property: If the user
fredb authored
497 #
6f877bc Correct a factual error in the comment "ways to disable a package":
fredb authored
498 # Don't build a package if it's restricted and we don't want to
499 # get into that.
500 #
af7d172 Add a new mechanism for handling "crypto" packages, as discussed
fredb authored
501 # Don't build any package that utilizes strong cryptography, for
502 # when the law of the land forbids it.
503 #
6f877bc Correct a factual error in the comment "ways to disable a package":
fredb authored
504 # Don't attempt to build packages against X if we don't have X.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
505 #
67feee0 This is NetBSD. s/port/package/g
agc authored
506 # Don't build a package if it's broken.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
507 ################################################################
508
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
509 .if !defined(NO_SKIP)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
510 . if (defined(NO_BIN_ON_CDROM) && defined(FOR_CDROM))
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
511 PKG_FAIL_REASON+= "${PKGNAME} may not be placed in binary form on a CDROM:" \
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
512 " "${NO_BIN_ON_CDROM:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
513 . endif
514 . if (defined(NO_SRC_ON_CDROM) && defined(FOR_CDROM))
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
515 PKG_FAIL_REASON+= "${PKGNAME} may not be placed in source form on a CDROM:" \
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
516 " "${NO_SRC_ON_CDROM:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
517 . endif
518 . if (defined(RESTRICTED) && defined(NO_RESTRICTED))
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
519 PKG_FAIL_REASON+= "${PKGNAME} is restricted:" \
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
520 " "${RESTRICTED:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
521 . endif
522 . if !(${MKCRYPTO} == "YES" || ${MKCRYPTO} == yes)
5bdfc68 Deprecate USE_SSL.
wiz authored
523 . if defined(CRYPTO)
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
524 PKG_FAIL_REASON+= "${PKGNAME} may not be built, because it utilizes strong cryptography"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
525 . endif
af7d172 Add a new mechanism for handling "crypto" packages, as discussed
fredb authored
526 . endif
44c9574 Remove trailing spaces.
martti authored
527 . if defined(USE_X11) && (${X11_TYPE} == "native") && !exists(${X11BASE})
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
528 PKG_FAIL_REASON+= "${PKGNAME} uses X11, but ${X11BASE} not found"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
529 . endif
530 . if defined(BROKEN)
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
531 PKG_FAIL_REASON+= "${PKGNAME} is marked as broken:" ${BROKEN:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
532 . endif
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
533
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
534 . if defined(LICENSE)
ed673d8 Collapse two .for blocks to improve readability:
tv authored
535 . if defined(ACCEPTABLE_LICENSES) && !empty(ACCEPTABLE_LICENSES:M${LICENSE})
ac8a769 Add an ACCEPTABLE_LICENCES definition to /etc/mk.conf. This is a
agc authored
536 _ACCEPTABLE= yes
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
537 . endif # ACCEPTABLE_LICENSES
d23c566 Found another two uses of .ifndef and .ifdef.
rillig authored
538 . if !defined(_ACCEPTABLE)
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
539 PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \
94bf044 Update the wording a bit when a license is not accepted, to better
hubertf authored
540 " To view the license, enter \"${MAKE} show-license\"." \
541 " To indicate acceptance, add this line to your /etc/mk.conf:" \
542 " ACCEPTABLE_LICENSES+=${LICENSE}"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
543 . endif # _ACCEPTABLE
544 . endif # LICENSE
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
545
0dac5d1 Move all settings of IGNORE into one spot. No need for the arch-checking
hubertf authored
546 # Define __PLATFORM_OK only if the OS matches the pkg's allowed list.
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
547 . if defined(ONLY_FOR_PLATFORM) && !empty(ONLY_FOR_PLATFORM)
548 . for __tmp__ in ${ONLY_FOR_PLATFORM}
549 . if ${MACHINE_PLATFORM:M${__tmp__}} != ""
0dac5d1 Move all settings of IGNORE into one spot. No need for the arch-checking
hubertf authored
550 __PLATFORM_OK?= yes
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
551 . endif # MACHINE_PLATFORM
552 . endfor # __tmp__
553 . else # !ONLY_FOR_PLATFORM
554 __PLATFORM_OK?= yes
555 . endif # ONLY_FOR_PLATFORM
556 . for __tmp__ in ${NOT_FOR_PLATFORM}
557 . if ${MACHINE_PLATFORM:M${__tmp__}} != ""
558 . undef __PLATFORM_OK
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
559 . endif # MACHINE_PLATFORM
560 . endfor # __tmp__
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
561 . if !defined(__PLATFORM_OK)
aeafc1b Use PKG_FAIL_REASON for platform checks, to make them work again.
wiz authored
562 PKG_FAIL_REASON+= "${PKGNAME} is not available for ${MACHINE_PLATFORM}"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
563 . endif # !__PLATFORM_OK
98cbefa The new target do-check-pkg-fail-reason should to be a dependency of
rillig authored
564 .endif
565
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
566 # Add these defs to the ones dumped into +BUILD_DEFS
e2f08fa Split the variable BUILD_DEFS into those that are defined by packages
rillig authored
567 _BUILD_DEFS+= PKGPATH
568 _BUILD_DEFS+= OPSYS OS_VERSION MACHINE_ARCH MACHINE_GNU_ARCH
3e5c3be I find the ABI useful to know when looking at a binary package.
rillig authored
569 _BUILD_DEFS+= ABI
e2f08fa Split the variable BUILD_DEFS into those that are defined by packages
rillig authored
570 _BUILD_DEFS+= CPPFLAGS CFLAGS FFLAGS LDFLAGS
571 _BUILD_DEFS+= OBJECT_FMT LICENSE RESTRICTED
572 _BUILD_DEFS+= NO_SRC_ON_FTP NO_SRC_ON_CDROM
573 _BUILD_DEFS+= NO_BIN_ON_FTP NO_BIN_ON_CDROM
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
574
f38c8ae add OSVERSION_SPECIFIC to BUILD_DEFS if defined so it ends up in the bin...
dmcmahill authored
575 .if defined(OSVERSION_SPECIFIC)
e2f08fa Split the variable BUILD_DEFS into those that are defined by packages
rillig authored
576 _BUILD_DEFS+= OSVERSION_SPECIFIC
f38c8ae add OSVERSION_SPECIFIC to BUILD_DEFS if defined so it ends up in the bin...
dmcmahill authored
577 .endif # OSVERSION_SPECIFIC
578
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
579 .PHONY: all
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
580 .if !target(all)
3bfda94 Due to the special handling of pkgtools/digest in pkgsrc (it must be
jlam authored
581 all: ${_PKGSRC_BUILD_TARGETS}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
582 .endif
583
a73c08e Introduce "makedirs" as a helper target to create directories with
jlam authored
584 .PHONY: makedirs
585 makedirs: ${WRKDIR}
586
fc5bd0b * Turn _SHELL_EXTRACT into a "subroutine" for extracting an archive. It
jlam authored
587 ${WRKDIR}:
588 .if !defined(KEEP_WRKDIR)
b044266 Finished the split of PKGSRC_LOCKTYPE into LOCALBASE_LOCKTYPE and
rillig authored
589 . if ${WRKDIR_LOCKTYPE} != "none"
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
590 ${RUN} ${TEST} -f ${_WRKDIR_LOCKFILE} || ${RM} -fr ${WRKDIR}
fc5bd0b * Turn _SHELL_EXTRACT into a "subroutine" for extracting an archive. It
jlam authored
591 . endif
592 .endif
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
593 ${RUN} ${MKDIR} ${WRKDIR}
82d3cbf Split out the "work" symlink creation into a separate step and add it
jlam authored
594
595 # Create a symlink from ${WRKDIR} to the package directory if
596 # CREATE_WRKDIR_SYMLINK is "yes".
597 #
60acb1d Change default value of CREATE_WRKDIR_SYMLINK to no. In combination with
joerg authored
598 CREATE_WRKDIR_SYMLINK?= no
82d3cbf Split out the "work" symlink creation into a separate step and add it
jlam authored
599
600 .if defined(WRKOBJDIR) && !empty(CREATE_WRKDIR_SYMLINK:M[Yy][Ee][Ss])
601 makedirs: ${.CURDIR}/${WRKDIR_BASENAME}
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
602 ${.CURDIR}/${WRKDIR_BASENAME}:
b044266 Finished the split of PKGSRC_LOCKTYPE into LOCALBASE_LOCKTYPE and
rillig authored
603 . if ${WRKDIR_LOCKTYPE} != "none"
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
604 ${RUN} ${TEST} -f ${_WRKDIR_LOCKFILE} || ${RM} -f ${.TARGET}
fc5bd0b * Turn _SHELL_EXTRACT into a "subroutine" for extracting an archive. It
jlam authored
605 . endif
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
606 ${RUN} \
82d3cbf Split out the "work" symlink creation into a separate step and add it
jlam authored
607 if ${LN} -s ${WRKDIR} ${.TARGET} 2>/dev/null; then \
d1ddb59 In the "makedirs" target, it is clear that the lock file is always the
rillig authored
608 ${ECHO_MSG} "${.TARGET:T} -> ${WRKDIR}"; \
fc5bd0b * Turn _SHELL_EXTRACT into a "subroutine" for extracting an archive. It
jlam authored
609 fi
82d3cbf Split out the "work" symlink creation into a separate step and add it
jlam authored
610 .endif
611
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
612 .include "${.PARSEDIR}/flavor/bsd.flavor.mk"
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
613
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
614 .include "${.PARSEDIR}/depends/bsd.depends.mk"
615 .include "${.PARSEDIR}/check/bsd.check.mk"
616 .include "${.PARSEDIR}/fetch/bsd.fetch.mk"
617 .include "${.PARSEDIR}/checksum/bsd.checksum.mk"
618 .include "${.PARSEDIR}/extract/bsd.extract.mk"
619 .include "${.PARSEDIR}/patch/bsd.patch.mk"
620 .include "${.PARSEDIR}/configure/bsd.configure.mk"
621 .include "${.PARSEDIR}/build/bsd.build.mk"
622 .include "${.PARSEDIR}/install/bsd.install.mk"
623 .include "${.PARSEDIR}/package/bsd.package.mk"
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
624
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
625 .include "${.PARSEDIR}/bsd.pkg.clean.mk"
626 .include "${.PARSEDIR}/bsd.pkg.update.mk"
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
627
98d7e70 First pass at implementing support for package system flavors other
jlam authored
628 # su-target is a macro target that does just-in-time su-to-root before
040820d Convert just-in-time su targets to use su-target instead of ${_SU_TARGET...
jlam authored
629 # reinvoking the make process as root. It acquires root privileges and
630 # invokes a new make process with the target named "su-${.TARGET}".
98d7e70 First pass at implementing support for package system flavors other
jlam authored
631 #
a2e94be Added an additional line to the parallel error message.
rillig authored
632
32665b7 Move the common make command executed in su-target into a separate make
jlam authored
633 _ROOT_CMD= cd ${.CURDIR} && \
3ed7d58 Ensure that the just-in-time su command invoked has the same environment
jlam authored
634 ${SETENV} ${PKGSRC_MAKE_ENV} \
635 PATH="$${PATH}:"${SU_CMD_PATH_APPEND:Q} \
32665b7 Move the common make command executed in su-target into a separate make
jlam authored
636 ${MAKE} ${MAKEFLAGS} \
637 PKG_DEBUG_LEVEL=${PKG_DEBUG_LEVEL:Q} \
0e697af MAKEFLAGS for su-${.TARGET} is ${MAKEFLAGS.su-${.TARGET}},
obache authored
638 su-${.TARGET} ${MAKEFLAGS.su-${.TARGET}}
32665b7 Move the common make command executed in su-target into a separate make
jlam authored
639
98d7e70 First pass at implementing support for package system flavors other
jlam authored
640 .PHONY: su-target
641 su-target: .USE
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
642 ${RUN} \
040820d Convert just-in-time su targets to use su-target instead of ${_SU_TARGET...
jlam authored
643 case ${PRE_CMD.su-${.TARGET}:Q}"" in \
644 "") ;; \
645 *) ${PRE_CMD.su-${.TARGET}} ;; \
646 esac; \
91808dd Introduce _SU_ROOT_USER, which can be used for partially unprivileged
joerg authored
647 if ${TEST} `${ID} -u` = `${ID} -u ${_SU_ROOT_USER}`; then \
32665b7 Move the common make command executed in su-target into a separate make
jlam authored
648 ${_ROOT_CMD}; \
98d7e70 First pass at implementing support for package system flavors other
jlam authored
649 else \
650 case ${PRE_ROOT_CMD:Q}"" in \
651 ${TRUE:Q}"") ;; \
9d0bdeb Use PHASE_MSG, STEP_MSG, WARNING_MSG, and ERROR_MSG in place of ECHO_MSG
jlam authored
652 *) ${WARNING_MSG} "Running: "${PRE_ROOT_CMD:Q} ;; \
98d7e70 First pass at implementing support for package system flavors other
jlam authored
653 esac; \
654 ${PRE_ROOT_CMD}; \
91808dd Introduce _SU_ROOT_USER, which can be used for partially unprivileged
joerg authored
655 ${STEP_MSG} "Becoming \`\`${_SU_ROOT_USER}'' to make su-${.TARGET} (`${ECHO} ${SU_CMD} | ${AWK} '{ print $$1 }'`)"; \
32665b7 Move the common make command executed in su-target into a separate make
jlam authored
656 ${SU_CMD} ${_ROOT_CMD:Q}; \
91808dd Introduce _SU_ROOT_USER, which can be used for partially unprivileged
joerg authored
657 ${STEP_MSG} "Dropping \`\`${_SU_ROOT_USER}'' privileges."; \
98d7e70 First pass at implementing support for package system flavors other
jlam authored
658 fi
0a247cf Add two new EXPERIMENTAL targets:
agc authored
659
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
660 ################################################################
661 # Some more targets supplied for users' convenience
662 ################################################################
663
1ffa607 * Remove old PLIST-mi/md.shared/md.static that was only used for
hubertf authored
664 # Run pkglint:
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
665 .PHONY: lint
1ffa607 * Remove old PLIST-mi/md.shared/md.static that was only used for
hubertf authored
666 lint:
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
667 ${RUN} ${LOCALBASE}/bin/pkglint
e6ecd7a Add new "tarup" target which allows to create a binary package from an
tron authored
668
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
669 # List of flags to pass to pkg_add(1) for bin-install:
670
d78d691 make the bin-install target look at some FTP servers (stored in
hubertf authored
671 BIN_INSTALL_FLAGS?= # -v
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
672 .if ${PKG_INSTALLATION_TYPE} == "pkgviews"
2714111 We want to add consistently add to the default view if we use pkgviews
jlam authored
673 PKG_ARGS_ADD= -W ${LOCALBASE} -w ${DEFAULT_VIEW}
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
674 .endif
675 _BIN_INSTALL_FLAGS= ${BIN_INSTALL_FLAGS}
4478b6b Handle automatic dependencies in bin-install correctly.
wiz authored
676 .if defined(_AUTOMATIC) && !empty(_AUTOMATIC:MYES)
677 _BIN_INSTALL_FLAGS+= -A
3013902 Use new automatic flag; depend on appropriate pkg_install version.
wiz authored
678 .endif
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
679 _BIN_INSTALL_FLAGS+= ${PKG_ARGS_ADD}
d78d691 make the bin-install target look at some FTP servers (stored in
hubertf authored
680
1db1ace In the bin-install target, instead of running pkg_add for every
wiz authored
681 _SHORT_UNAME_R= ${:!${UNAME} -r!:C@\.([0-9]*)[_.].*@.\1@} # n.n[_.]anything => n.n
682
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
683 .include "${.PARSEDIR}/install/bin-install.mk"
1773a37 Fix PR 17883 by adding code to perform just-in-time su(1) functionality
agc authored
684
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
685 ################################################################
686 # Everything after here are internal targets and really
687 # shouldn't be touched by anybody but the release engineers.
688 ################################################################
689
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
690 .PHONY: show-pkgtools-version
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
691 .if !target(show-pkgtools-version)
692 show-pkgtools-version:
38f14fc Calculate current pkgtools version once (inline rather than via
abs authored
693 @${ECHO} ${PKGTOOLS_VERSION}
5380c3e if ${IDENT} does not exist, assume that the package tools are ok. This i...
christos authored
694 .endif
1d228fe add print-pkgtools_ver to get version of currently-installed pkg-tools
hubertf authored
695
4c5aeca Add a convenience target called "show-var", which will echo a make(1)
agc authored
696 # convenience target, to display make variables from command line
697 # i.e. "make show-var VARNAME=var", will print var's value
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
698 .PHONY: show-var
4c5aeca Add a convenience target called "show-var", which will echo a make(1)
agc authored
699 show-var:
37ccf59 show-var: implement quoting via make's :Q modifier, instead of home-brew...
hubertf authored
700 @${ECHO} ${${VARNAME}:Q}
4c5aeca Add a convenience target called "show-var", which will echo a make(1)
agc authored
701
a990fee Add a new "show-vars" target which allows to display several makefile
tron authored
702 # enhanced version of target above, to display multiple variables
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
703 .PHONY: show-vars
a990fee Add a new "show-vars" target which allows to display several makefile
tron authored
704 show-vars:
705 .for VARNAME in ${VARNAMES}
706 @${ECHO} ${${VARNAME}:Q}
707 .endfor
708
aa5e8b3 Add "show-vars-eval" target, which outputs eval-able shell expressions
tv authored
709 # displays multiple variables as shell expressions
710 # VARS is space separated list of VARNAME:shellvarname
711 .PHONY: show-vars-eval
712 show-vars-eval:
713 .for var in ${VARS}
714 @${ECHO} ${var:C/^.*://}="${${var:C/:.*$//}:Q}"
715 .endfor
716
8f5eb66 Added a variable LICENSE_FILE that may be set to point to the license
rillig authored
717 LICENSE_FILE?= ${PKGSRCDIR}/licenses/${LICENSE}
718
78f180f Add a "show-license" target, and a "show-licence" alias, to display
agc authored
719 .if !target(show-license)
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
720 show-license show-licence: .PHONY
8f5eb66 Added a variable LICENSE_FILE that may be set to point to the license
rillig authored
721 @license=${LICENSE:Q}; \
722 license_file=${LICENSE_FILE:Q}; \
723 pager=${PAGER:Q}; \
724 case "$$pager" in "") pager=${CAT:Q};; esac; \
725 case "$$license" in "") exit 0;; esac; \
726 if ${TEST} -f "$$license_file"; then \
727 $$pager "$$license_file"; \
728 else \
729 ${ECHO} "Generic $$license information not available"; \
730 ${ECHO} "See the package description (pkg_info -d ${PKGNAME}) for more information."; \
78f180f Add a "show-license" target, and a "show-licence" alias, to display
agc authored
731 fi
732 .endif
33ed0c4 Add code to include the size of a package into both the
hubertf authored
733
14821b0 Add a dummy describe-options target for package not using the
dillo authored
734 # This target is defined in bsd.options.mk for packages that use
735 # the options framework.
2138348 Rename describe-options to show-options, replacing the old show-options
dillo authored
736 .if !target(show-options)
737 .PHONY: show-options
738 show-options:
14821b0 Add a dummy describe-options target for package not using the
dillo authored
739 @${ECHO} This package does not use the options framework.
740 .endif
741
67feee0 This is NetBSD. s/port/package/g
agc authored
742 # Depend is generally meaningless for arbitrary packages, but if someone wants
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
743 # one they can override this. This is just to catch people who've gotten into
3dd26a1 make -> ${MAKE}, as per FreeBSD's PR 6341.
hubertf authored
744 # the habit of typing `${MAKE} depend all install' as a matter of course.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
745 #
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
746 .PHONY: depend
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
747 .if !target(depend)
748 depend:
749 .endif
750
751 # Same goes for tags
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
752 .PHONY: tags
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
753 .if !target(tags)
754 tags:
755 .endif
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
756
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
757 .include "${.PARSEDIR}/plist/bsd.plist.mk"
c1ed7ca Initial commit of a new module that encapsulates all of the code
jlam authored
758
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
759 .include "${.PARSEDIR}/bsd.utils.mk"
c483b87 Create a standalone awk script, depends-depth-first.awk, that encapsulat...
jlam authored
760
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
761 .include "${.PARSEDIR}/subst.mk"
c2ea20b (*) Nuke the _BUILDLINK_SUBST_USE target now that subst.mk does the same
jlam authored
762
eb167e7 Pull in bulk-build targets if BATCH is set
hubertf authored
763 #
764 # For bulk build targets (bulk-install, bulk-package), the
a140b35 * Remove RUN_DEPENDS (left in packages.7 intentionally)
hubertf authored
765 # BATCH variable must be set in /etc/mk.conf:
eb167e7 Pull in bulk-build targets if BATCH is set
hubertf authored
766 #
767 .if defined(BATCH)
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
768 . include "${.PARSEDIR}/bulk/bsd.bulk-pkg.mk"
eb167e7 Pull in bulk-build targets if BATCH is set
hubertf authored
769 .endif
f3901db Allow the creation of error handlers for shell commands in make targets.
jlam authored
770
7cca5cc Refactor the README.html generation code from bsd.pkg.mk into a separate
jlam authored
771 # README generation code.
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
772 .include "${.PARSEDIR}/bsd.pkg.readme.mk"
7cca5cc Refactor the README.html generation code from bsd.pkg.mk into a separate
jlam authored
773
f3901db Allow the creation of error handlers for shell commands in make targets.
jlam authored
774 # Create a PKG_ERROR_HANDLER shell command for each class listed in
775 # PKG_ERROR_CLASSES. The error handler is meant to be invoked within
776 # a make target.
777 #
778 .for _class_ in ${PKG_ERROR_CLASSES}
779 PKG_ERROR_HANDLER.${_class_}?= { \
780 ec=$$?; \
781 for str in ${PKG_ERROR_MSG.${_class_}}; do \
9d0bdeb Use PHASE_MSG, STEP_MSG, WARNING_MSG, and ERROR_MSG in place of ECHO_MSG
jlam authored
782 ${PHASE_MSG} "$$str"; \
f3901db Allow the creation of error handlers for shell commands in make targets.
jlam authored
783 done; \
784 exit $$ec; \
785 }
786 .endfor
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
787
5448f0d Rename MAKE_VARS to MAKEVARS so that it more closely resembles
jlam authored
788 # Cache variables listed in MAKEVARS in a phase-specific "makevars.mk"
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
789 # file. These variables are effectively passed to sub-make processes
790 # that are invoked on the same Makefile.
791 #
4abd34c Completely nuke the concept of PKG_PHASE from pkgsrc except for the
jlam authored
792 .for _phase_ in ${_ALL_PHASES}
5448f0d Rename MAKE_VARS to MAKEVARS so that it more closely resembles
jlam authored
793 ${_MAKEVARS_MK.${_phase_}}: ${WRKDIR}
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
794 ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET}.tmp
2d97a87 Refactor "fetch" and "extract" code into correspondingly named
jlam authored
795 . for _var_ in ${MAKEVARS:O:u}
796 . if defined(${_var_})
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
797 ${_PKG_SILENT}${_PKG_DEBUG} \
798 ${ECHO} ${_var_}"= "${${_var_}:Q} >> ${.TARGET}.tmp
2d97a87 Refactor "fetch" and "extract" code into correspondingly named
jlam authored
799 . endif
800 . endfor
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
801 ${_PKG_SILENT}${_PKG_DEBUG} \
802 if ${TEST} -f ${.TARGET}.tmp; then \
5448f0d Rename MAKE_VARS to MAKEVARS so that it more closely resembles
jlam authored
803 ( ${ECHO} ".if !defined(_MAKEVARS_MK)"; \
804 ${ECHO} "_MAKEVARS_MK= defined"; \
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
805 ${ECHO} ""; \
806 ${CAT} ${.TARGET}.tmp; \
807 ${ECHO} ""; \
5448f0d Rename MAKE_VARS to MAKEVARS so that it more closely resembles
jlam authored
808 ${ECHO} ".endif # _MAKEVARS_MK"; \
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
809 ) > ${.TARGET}; \
810 ${RM} -f ${.TARGET}.tmp; \
811 fi
812 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
813 .endfor
a605cb8 Added the show-tools target, which emits a shell code fragment defining ...
rillig authored
814
bbe9578 Add two targets, pbulk-index and pbulk-index-item.
joerg authored
815 .if make(pbulk-index) || make(pbulk-index-item)
816 .include "${.PARSEDIR}/pbulk/pbulk-index.mk"
817 .endif
818
cecf775 Moved the show-tools target to misc/show.mk.
rillig authored
819 .if defined(PKG_DEVELOPER)
820 . include "${.PARSEDIR}/misc/developer.mk"
cf0a9ef Add changes-entry target, which adds an entry for the current package
wiz authored
821 .endif
cecf775 Moved the show-tools target to misc/show.mk.
rillig authored
822 .include "${.PARSEDIR}/misc/show.mk"
2869358 Added bsd.pkg.help.mk, which provides the "help" target.
rillig authored
823 .if make(debug) || make(build-env)
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
824 . include "${.PARSEDIR}/bsd.pkg.debug.mk"
c99411a Include the file bsd.pkg.debug.mk if requested by invoking the "debug"
rillig authored
825 .endif
2869358 Added bsd.pkg.help.mk, which provides the "help" target.
rillig authored
826 .if make(help)
e25ef04 Cleaned up bsd.pkg.mk:
rillig authored
827 . include "${.PARSEDIR}/help/help.mk"
2869358 Added bsd.pkg.help.mk, which provides the "help" target.
rillig authored
828 .endif
a2af1f3 Enabled the warnings.
rillig authored
829 .include "${.PARSEDIR}/misc/warnings.mk"
f0cf4fd Moved the code that checks for PKG_FAIL_REASON and PKG_SKIP reason from
rillig authored
830 .include "${.PARSEDIR}/misc/can-be-built-here.mk"
Something went wrong with that request. Please try again.