Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 4881 lines (4491 sloc) 160.86 kB
e10cf42 Add a documentation block above the changes-entry target.
jlam authored
1 # $NetBSD: bsd.pkg.mk,v 1.1690 2005/06/09 16:08:27 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 #
970dfa8 move documentation to packages.7. also, remove ts=4 crap.
mrg authored
5 # This file is derived from bsd.port.mk - 940820 Jordan K. Hubbard.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
6 #
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
7 # Please see the pkgsrc/doc/guide manual for details on the
8 # variables used in this make file template.
9 #
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
10 # Default sequence for "all" is: fetch checksum extract patch configure build
11 #
12 # Please read the comments in the targets section below, you
13 # should be able to use the pre-* or post-* targets/scripts
14 # (which are available for every stage except checksum) or
15 # override the do-* targets to do pretty much anything you want.
16
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
17 ############################################################################
18 # Include any preferences, if not already included, and common definitions
19 ############################################################################
20
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
21 .include "../../mk/bsd.prefs.mk"
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
22 .include "../../mk/bsd.hacks.mk"
0b3e6dd Teach bsd.pkg.mk to create a phase-specific "makevars.mk" file that
jlam authored
23
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
24 # This has to come first to avoid showing all BUILD_DEFS added by this
25 # Makefile, which are usually not customizable.
14b6f70 Sometimes, the dependencies installed are a function of which variables
jlam authored
26 .PHONY: pre-install-depends build-defs-message
27 pre-install-depends: build-defs-message
35bce78 oops.. reversed a test
jlam authored
28 .if empty(PKGSRC_SHOW_BUILD_DEFS:M[yY][eE][sS])
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
29 build-defs-message:
30 .elif !target(build-defs-message)
3bfdfb2 Modify the build-defs-message target so that it is only printed once,…
jmmv authored
31 build-defs-message: ${WRKDIR}
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
32 . if defined(BUILD_DEFS) && !empty(BUILD_DEFS)
33 . if !exists(${WRKDIR}/.bdm_done)
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
34 @${ECHO} "=========================================================================="
35 @${ECHO} "The following variables will affect the build process of this package,"
36 @${ECHO} "${PKGNAME}. Their current value is shown below:"
37 @${ECHO} ""
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
38 . for var in ${BUILD_DEFS:O}
39 . if !defined(${var})
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
40 @${ECHO} " * ${var} (not defined)"
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
41 . elif defined(${var}) && empty(${var})
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
42 @${ECHO} " * ${var} (defined)"
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
43 . else
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
44 @${ECHO} " * ${var} = ${${var}}"
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
45 . endif
46 . endfor
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
47 @${ECHO} ""
5fc450d wrap a long line in BUILD_DEFS output, tweak the message slightly.
grant authored
48 @${ECHO} "You may want to abort the process now with CTRL-C and change their value"
49 @${ECHO} "before continuing. Be sure to run \`${MAKE} clean' after"
50 @${ECHO} "the changes."
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
51 @${ECHO} "=========================================================================="
3bfdfb2 Modify the build-defs-message target so that it is only printed once,…
jmmv authored
52 @${TOUCH} ${WRKDIR}/.bdm_done
048f658 Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DE…
agc authored
53 . endif
54 . endif
a563488 Add the build-defs-message target, which shows a list of all variable…
jmmv authored
55 .endif
56
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
57 ############################################################################
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
58 # Transform package Makefile variables and set defaults
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
59 ############################################################################
a6fdcd0 Fail-safe check for circular dependencies.
gavan authored
60
adb5d84 - Move all CHECK_FILES_SKIP definitions to a central place in bsd.pkg…
jmmv authored
61 CHECK_FILES?= NO # run check-files after install
b145bf2 Add the check-files target: when enabled, this verifies that installed
jmmv authored
62 CHECK_FILES_STRICT?= NO # make check-files very strict on errors
f83408c * add CHECK_SHLIBS variable that can be set to "no" in emul/compat p…
hubertf authored
63 CHECK_SHLIBS?= YES # run check-shlibs after install
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
64 CLEANDEPENDS?= NO
65 DEINSTALLDEPENDS?= NO # add -R to pkg_delete
66 MKCRYPTO?= YES # build crypto packages by default
7ae11e3 Change the "update" target so it becomes more useful (and less danger…
rh authored
67 NOCLEAN?= NO # don't clean up after update
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
68 REINSTALL?= NO # reinstall upon update
69 SHLIB_HANDLING?= YES # do automatic shared lib handling
d3da8de Replaced the NO_WRKDIR_SYMLINK variable with CREATE_WRKDIR_SYMLINK, as
rillig authored
70 CREATE_WRKDIR_SYMLINK?= yes # create a symlink to WRKOBJDIR
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
71
72 ##### Variant spellings
73
74 .if defined(LICENCE) && !defined(LICENSE)
75 LICENSE= ${LICENCE}
76 .endif
77 .if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES)
78 ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES}
79 .endif
80
81 ##### PKGBASE, PKGNAME[_NOREV], PKGVERSION
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
82
a9df889 Oops; use ?= for PKGBASE and PKGVERSION, so pkgs can derive their PKG…
mycroft authored
83 PKGBASE?= ${PKGNAME:C/-[^-]*$//}
84 PKGVERSION?= ${PKGNAME:C/^.*-//}
75f8ab7 Move definition of PKGNAME and PKGNAME_NOREV higher in the file since…
jlam authored
85 .if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0")
86 . if defined(PKGNAME)
87 PKGNAME_NOREV:= ${PKGNAME}
88 PKGNAME:= ${PKGNAME}nb${PKGREVISION}
89 . else
90 PKGNAME?= ${DISTNAME}nb${PKGREVISION}
91 PKGNAME_NOREV= ${DISTNAME}
92 . endif
93 .else
94 PKGNAME?= ${DISTNAME}
95 PKGNAME_NOREV= ${PKGNAME}
96 .endif
5932545 Add PKGPATH, PKGBASE, PKGVERSION and PKGWILDCARD make(1) variables, s…
mycroft authored
97
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
98 ##### PLIST
99
100 .if ${PKG_INSTALLATION_TYPE} == "pkgviews"
101 PLIST_TYPE?= dynamic
102 .endif
103 PLIST_TYPE?= static
104
105 .if !defined(PLIST_SRC)
106 . if exists(${PKGDIR}/PLIST.common)
107 PLIST_SRC+= ${PKGDIR}/PLIST.common
108 . endif
109 . if exists(${PKGDIR}/PLIST.${OPSYS})
110 PLIST_SRC+= ${PKGDIR}/PLIST.${OPSYS}
2fbfa05 Fix PLIST_SRC error introduced in rev 1.1593.
veego authored
111 . endif
112 . if exists(${PKGDIR}/PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g})
db39dfb Change the files to be used for PLIST_SRC from
veego authored
113 PLIST_SRC+= ${PKGDIR}/PLIST.${MACHINE_ARCH:C/i[3-6]86/i386/g}
2fbfa05 Fix PLIST_SRC error introduced in rev 1.1593.
veego authored
114 . endif
115 . if exists(${PKGDIR}/PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g})
db39dfb Change the files to be used for PLIST_SRC from
veego authored
116 PLIST_SRC+= ${PKGDIR}/PLIST.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
2fbfa05 Fix PLIST_SRC error introduced in rev 1.1593.
veego authored
117 . endif
118 . if exists(${PKGDIR}/PLIST)
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
119 PLIST_SRC+= ${PKGDIR}/PLIST
120 . endif
121 . if exists(${PKGDIR}/PLIST.common_end)
122 PLIST_SRC+= ${PKGDIR}/PLIST.common_end
123 . endif
124 .endif # !PLIST_SRC
125
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
126 ##### Others
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
127
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
128 _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR}
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
129 BUILD_DEPENDS?= # empty
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
130 BUILD_TARGET?= all
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
131 COMMENT?= (no description)
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
132 CONFIGURE_DIRS?= ${WRKSRC}
133 CONFIGURE_SCRIPT?= ./configure
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
134 DEPENDS?= # empty
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
135 DESCR_SRC?= ${PKGDIR}/DESCR
2b7993f As seen on tech-pkg - allow multiple digest algorithms to be used to
agc authored
136 DIGEST_ALGORITHMS?= SHA1 RMD160
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
137 DISTFILES?= ${DISTNAME}${EXTRACT_SUFX}
138 DISTINFO_FILE?= ${PKGDIR}/distinfo
139 INSTALL_DIRS?= ${BUILD_DIRS}
140 INSTALL_MAKE_FLAGS?= ${MAKE_FLAGS}
141 INSTALL_TARGET?= install
723e0dd Deprecate IS_INTERACTIVE, and introduce a finer-grained INTERACTIVE_S…
agc authored
142 INTERACTIVE_STAGE?= none
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
143 MAINTAINER?= tech-pkg@NetBSD.org
144 MAKE_FLAGS?= # empty
145 MAKEFILE?= Makefile
2b7993f As seen on tech-pkg - allow multiple digest algorithms to be used to
agc authored
146 PATCH_DIGEST_ALGORITHM?=SHA1
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
147 PKG_SUFX?= .tgz
148 PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
149 PKGREPOSITORY?= ${PACKAGES}/${PKGREPOSITORYSUBDIR}
150 PKGREPOSITORYSUBDIR?= All
151 PKGWILDCARD?= ${PKGBASE}-[0-9]*
152 SVR4_PKGNAME?= ${PKGNAME}
153 USE_DIGEST?= YES
154 WRKSRC?= ${WRKDIR}/${DISTNAME}
155
9453708 Fix a gleaming illustration of why using YES/NO variables everywhere
tv authored
156 .if (defined(INSTALL_UNSTRIPPED) && !empty(INSTALL_UNSTRIPPED:M[yY][eE][sS])) || defined(DEBUG_FLAGS)
157 _INSTALL_UNSTRIPPED= # set (flag used by platform/*.mk)
158 .endif
159
c51edb8 Merge down some more visual cleanup from tv-derecurse to reduce diver…
tv authored
160 ##### Non-overridable constants
161
162 # Latest versions of tools required for correct pkgsrc operation.
163 DIGEST_REQD= 20010302
164 PKGTOOLS_REQD= ${_OPSYS_PKGTOOLS_REQD:U20050204}
165
166 PKG_DB_TMPDIR= ${WRKDIR}/.pkgdb
167 DDIR= ${WRKDIR}/.DDIR
168 DESCR= ${PKG_DB_TMPDIR}/+DESC
169 DLIST= ${WRKDIR}/.DLIST
170 PLIST= ${WRKDIR}/.PLIST
171
172 # Files to create for versioning and build information
173 BUILD_VERSION_FILE= ${PKG_DB_TMPDIR}/+BUILD_VERSION
174 BUILD_INFO_FILE= ${PKG_DB_TMPDIR}/+BUILD_INFO
175
176 # Files containing size of pkg w/o and w/ all required pkgs
177 SIZE_PKG_FILE= ${PKG_DB_TMPDIR}/+SIZE_PKG
178 SIZE_ALL_FILE= ${PKG_DB_TMPDIR}/+SIZE_ALL
179
180 # File to denote "no deletion of a package"
181 PRESERVE_FILE= ${PKG_DB_TMPDIR}/+PRESERVE
182
183 ##### Transform USE_* into dependencies
184
185 .include "../../mk/bsd.pkg.use.mk"
186
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
187 ############################################################################
188 # Sanity checks
189 ############################################################################
190
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
191 # Fail-safe in the case of circular dependencies
192 .if defined(_PKGSRC_DEPS) && defined(PKGNAME) && !empty(_PKGSRC_DEPS:M${PKGNAME})
1442a6e Whitespace formatting nits.
tv authored
193 PKG_FAIL_REASON+= "Circular dependency detected"
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
194 .endif
195
a71ee63 Consolidate PLIST_SRC default generation and the plethora of failsafe
tv authored
196 # PKG_INSTALLATION_TYPE can only be one of two values: "pkgviews" or
197 # "overwrite".
198 .if (${PKG_INSTALLATION_TYPE} != "pkgviews") && \
199 (${PKG_INSTALLATION_TYPE} != "overwrite")
200 PKG_FAIL_REASON+= "PKG_INSTALLATION_TYPE must be \`\`pkgviews'' or \`\`overwrite''."
201 .endif
202
203 .if empty(PKG_INSTALLATION_TYPES:M${PKG_INSTALLATION_TYPE})
204 PKG_FAIL_REASON+= "This package doesn't support PKG_INSTALLATION_TYPE=${PKG_INSTALLATION_TYPE}."
205 .endif
206
207 .if (${PLIST_TYPE} != "dynamic") && (${PLIST_TYPE} != "static")
208 PKG_FAIL_REASON+= "PLIST_TYPE must be \`\`dynamic'' or \`\`static''."
209 .endif
210
211 .if (${PKG_INSTALLATION_TYPE} == "overwrite") && (${PLIST_TYPE} != "static")
212 PKG_FAIL_REASON+= "PLIST_TYPE must be \`\`static'' for \`\`overwrite'' packages."
213 .endif
214
215 # Check that we are using up-to-date pkg_* tools with this file.
216 .if !defined(NO_PKGTOOLS_REQD_CHECK)
217 . if ${PKGTOOLS_VERSION} < ${PKGTOOLS_REQD}
218 PKG_FAIL_REASON+='Error: The package tools installed on this system are out of date.'
219 PKG_FAIL_REASON+='The installed package tools are dated ${PKGTOOLS_VERSION:C|(....)(..)(..)|\1/\2/\3|} and you must update'
220 PKG_FAIL_REASON+='them to at least ${PKGTOOLS_REQD:C|(....)(..)(..)|\1/\2/\3|} using the following command:'
221 PKG_FAIL_REASON+=''
222 PKG_FAIL_REASON+=' cd ${PKGSRCDIR}/pkgtools/pkg_install && ${MAKE} clean && ${MAKE} install'
223 . endif
224 .endif # !NO_PKGTOOLS_REQD_CHECK
225
226 .if defined(ALL_TARGET)
227 PKG_FAIL_REASON+='ALL_TARGET is deprecated and must be replaced with BUILD_TARGET.'
228 .endif
229
230 .if defined(NO_WRKSUBDIR)
231 PKG_FAIL_REASON+='NO_WRKSUBDIR has been deprecated - please replace it with an explicit'
232 PKG_FAIL_REASON+='assignment of WRKSRC= $${WRKDIR}'
233 .endif # NO_WRKSUBDIR
234
235 # We need to make sure the buildlink-x11 package is not installed since it
236 # breaks builds that use imake.
237 .if defined(USE_IMAKE)
238 . if exists(${LOCALBASE}/lib/X11/config/buildlinkX11.def) || \
239 exists(${X11BASE}/lib/X11/config/buildlinkX11.def)
240 PKG_FAIL_REASON+= "${PKGNAME} uses imake, but the buildlink-x11 package was found." \
241 " Please deinstall it (pkg_delete buildlink-x11)."
242 . endif
243 .endif # USE_IMAKE
244
245 .if !defined(CATEGORIES) || !defined(DISTNAME)
246 PKG_FAIL_REASON+='CATEGORIES and DISTNAME are mandatory.'
247 .endif
248
249 .if defined(LIB_DEPENDS)
250 PKG_FAIL_REASON+='LIB_DEPENDS is deprecated and must be replaced with DEPENDS.'
251 .endif
252
253 .if defined(PKG_PATH)
254 PKG_FAIL_REASON+='Please unset PKG_PATH before doing pkgsrc work!'
255 .endif
256
257 .if defined(MASTER_SITE_SUBDIR)
258 PKG_FAIL_REASON+='MASTER_SITE_SUBDIR is deprecated and must be replaced with MASTER_SITES.'
259 .endif
260
261 .if defined(PATCH_SITE_SUBDIR)
262 PKG_FAIL_REASON+='PATCH_SITE_SUBDIR is deprecated and must be replaced with PATCH_SITES.'
263 .endif
264
265 .if defined(ONLY_FOR_ARCHS) || defined(NOT_FOR_ARCHS) \
266 || defined(ONLY_FOR_OPSYS) || defined(NOT_FOR_OPSYS)
267 PKG_FAIL_REASON+='ONLY/NOT_FOR_ARCHS/OPSYS are deprecated and must be replaced with ONLY/NOT_FOR_PLATFORM.'
268 .endif
269
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
270 # Allow variables to be set on a per-OS basis
271 OPSYSVARS+= CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS
272 .for _var_ in ${OPSYSVARS:O}
273 . if defined(${_var_}.${OPSYS})
274 ${_var_}+= ${${_var_}.${OPSYS}}
275 . elif defined(${_var_}.*)
276 ${_var_}+= ${${_var_}.*}
277 . endif
278 .endfor
279
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
280 CPPFLAGS+= ${CPP_PRECOMP_FLAGS}
281
282 ALL_ENV+= CC=${CC:Q}
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
283 ALL_ENV+= CFLAGS=${CFLAGS:M*:Q}
284 ALL_ENV+= CPPFLAGS=${CPPFLAGS:M*:Q}
285 ALL_ENV+= CXX=${CXX:M*:Q}
286 ALL_ENV+= CXXFLAGS=${CXXFLAGS:M*:Q}
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
287 ALL_ENV+= COMPILER_RPATH_FLAG=${COMPILER_RPATH_FLAG:Q}
3ac1b0c make sure we correctly set F77. Addresses PR29666
dmcmahill authored
288 ALL_ENV+= F77=${FC:Q}
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
289 ALL_ENV+= FC=${FC:Q}
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
290 ALL_ENV+= FFLAGS=${FFLAGS:M*:Q}
dc9bb84 Reset the current locale to a sane value (that is, 'C') during the build
jmmv authored
291 ALL_ENV+= LANG=C
292 ALL_ENV+= LC_COLLATE=C
293 ALL_ENV+= LC_CTYPE=C
294 ALL_ENV+= LC_MESSAGES=C
295 ALL_ENV+= LC_MONETARY=C
296 ALL_ENV+= LC_NUMERIC=C
297 ALL_ENV+= LC_TIME=C
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
298 ALL_ENV+= LDFLAGS=${LDFLAGS:M*:Q}
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
299 ALL_ENV+= LINKER_RPATH_FLAG=${LINKER_RPATH_FLAG:Q}
300 ALL_ENV+= PATH=${PATH:Q}:${LOCALBASE}/bin:${X11BASE}/bin
301 ALL_ENV+= PREFIX=${PREFIX}
302
303 MAKE_ENV+= ${ALL_ENV}
304 MAKE_ENV+= ${NO_EXPORT_CPP:D:UCPP=${CPP:Q}}
305 MAKE_ENV+= LINK_ALL_LIBGCC_HACK=${LINK_ALL_LIBGCC_HACK:Q}
306 MAKE_ENV+= LOCALBASE=${LOCALBASE}
307 MAKE_ENV+= NO_WHOLE_ARCHIVE_FLAG=${NO_WHOLE_ARCHIVE_FLAG:Q}
308 MAKE_ENV+= WHOLE_ARCHIVE_FLAG=${WHOLE_ARCHIVE_FLAG:Q}
309 MAKE_ENV+= X11BASE=${X11BASE}
310 MAKE_ENV+= X11PREFIX=${X11PREFIX}
311
312 # Constants to provide a consistent environment for packages using
313 # BSD-style Makefiles.
314 MAKE_ENV+= MAKECONF=${PKGMAKECONF:U/dev/null}
315 MAKE_ENV+= OBJECT_FMT=${OBJECT_FMT:Q}
316 MAKE_ENV+= ${USETOOLS:DUSETOOLS=${USETOOLS:Q}}
317
318 SCRIPTS_ENV+= ${ALL_ENV}
319 SCRIPTS_ENV+= _PKGSRCDIR=${_PKGSRCDIR}
320 SCRIPTS_ENV+= ${BATCH:DBATCH=yes}
321 SCRIPTS_ENV+= CURDIR=${.CURDIR}
322 SCRIPTS_ENV+= DEPENDS=${DEPENDS:Q}
323 SCRIPTS_ENV+= DISTDIR=${DISTDIR}
324 SCRIPTS_ENV+= FILESDIR=${FILESDIR}
325 SCRIPTS_ENV+= LOCALBASE=${LOCALBASE}
326 SCRIPTS_ENV+= PATCHDIR=${PATCHDIR}
327 SCRIPTS_ENV+= PKGSRCDIR=${PKGSRCDIR}
328 SCRIPTS_ENV+= SCRIPTDIR=${SCRIPTDIR}
329 SCRIPTS_ENV+= VIEWBASE=${VIEWBASE}
330 SCRIPTS_ENV+= WRKDIR=${WRKDIR}
331 SCRIPTS_ENV+= WRKSRC=${WRKSRC}
332 SCRIPTS_ENV+= X11BASE=${X11BASE}
333
334 CONFIGURE_ENV+= ${ALL_ENV}
335
891610c Merge a little visual-only cleanup from the tv-derecurse branch:
tv authored
336 # Store the result in the +BUILD_INFO file so we can query for the build
337 # options using "pkg_info -Q PKG_OPTIONS <pkg>".
338 #
339 .if defined(PKG_SUPPORTED_OPTIONS) && defined(PKG_OPTIONS)
340 BUILD_DEFS+= PKG_OPTIONS
341 .endif
723e0dd Deprecate IS_INTERACTIVE, and introduce a finer-grained INTERACTIVE_S…
agc authored
342
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
343 .if empty(DEPOT_SUBDIR)
344 PKG_FAIL_REASON+= "DEPOT_SUBDIR may not be empty."
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
345 .endif
e7f1bfb - Integrate xpkgwedge with a switch, USE_LOCALBASE_FOR_X11, which leaves
tv authored
346
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
347 .if ${PKG_INSTALLATION_TYPE} == "pkgviews"
348 #
349 # _PLIST_IGNORE_FILES basically mirrors the list of ignored files found
350 # in pkg_views(1). It's used by the dynamic PLIST generator to skip
351 # adding the named files to the PLIST.
352 #
353 _PLIST_IGNORE_FILES= +* # package metadata files
354 _PLIST_IGNORE_FILES+= info/dir
355 .if defined(INFO_DIR) && empty(INFO_DIR:Minfo)
356 _PLIST_IGNORE_FILES+= ${INFO_DIR}/dir
357 .endif
358 _PLIST_IGNORE_FILES+= *[~\#] *.OLD *.orig *,v # scratch config files
359 _PLIST_IGNORE_FILES+= ${PLIST_IGNORE_FILES}
360 .endif
361 BUILD_DEFS+= _PLIST_IGNORE_FILES
362
548c62b Add a new variable "UNLIMIT_RESOURCES" which can be used to raise pro…
tron authored
363 # Automatically increase process limit where necessary for building.
364 _ULIMIT_CMD=
365 .if defined(UNLIMIT_RESOURCES)
5c31b38 Allow more flexibility in the handling of UNLIMIT_RESOURCES.
seb authored
366 . for __tmp__ in ${UNLIMIT_RESOURCES}
367 . if defined(ULIMIT_CMD_${__tmp__})
368 _ULIMIT_CMD+= ${ULIMIT_CMD_${__tmp__}} ;
369 . endif
370 . endfor
548c62b Add a new variable "UNLIMIT_RESOURCES" which can be used to raise pro…
tron authored
371 .endif
372
b0a1264 If GNU_CONFIGURE is defined, then pass LIBS to the GNU configure script.
jlam authored
373 # If GNU_CONFIGURE is defined, then pass LIBS to the GNU configure script.
1cb4aa6 add CONFIG_SHELL to CONFIGURE_ENV. This avoids picking up bash as th…
dmcmahill authored
374 # also pass in a CONFIG_SHELL to avoid picking up bash
b0a1264 If GNU_CONFIGURE is defined, then pass LIBS to the GNU configure script.
jlam authored
375 .if defined(GNU_CONFIGURE)
1cb4aa6 add CONFIG_SHELL to CONFIGURE_ENV. This avoids picking up bash as th…
dmcmahill authored
376 CONFIG_SHELL?= ${SH}
377 CONFIGURE_ENV+= CONFIG_SHELL=${CONFIG_SHELL}
4a3ba33 In make variables, quotes protect embedded whitespace in words, so we
jlam authored
378 CONFIGURE_ENV+= LIBS=${LIBS:M*:Q}
e8b9981 Rather than work around an automake braindeadness, parameterize insta…
tv authored
379 CONFIGURE_ENV+= install_sh=${INSTALL:Q}
0c786a3 Relax need to put GNU_CONFIGURE before inclusion of bsd.prefs.mk:
tv authored
380 . if defined(USE_LIBTOOL) && defined(_OPSYS_MAX_CMDLEN_CMD)
381 CONFIGURE_ENV+= lt_cv_sys_max_cmd_len=${_OPSYS_MAX_CMDLEN_CMD:sh}
f37b1d0 Revert previous (re-add common CPP_PRECOMP_FLAGS). For consistency, …
tv authored
382 . endif
b0a1264 If GNU_CONFIGURE is defined, then pass LIBS to the GNU configure script.
jlam authored
383 .endif
384
8269c22 Added a leading underscore to the names of the *_COOKIE variables, as…
rillig authored
385 _EXTRACT_COOKIE= ${WRKDIR}/.extract_done
386 _TOOLS_COOKIE= ${WRKDIR}/.tools_done
387 _WRAPPER_COOKIE= ${WRKDIR}/.wrapper_done
388 _PATCH_COOKIE= ${WRKDIR}/.patch_done
389 _CONFIGURE_COOKIE= ${WRKDIR}/.configure_done
390 _BUILD_COOKIE= ${WRKDIR}/.build_done
391 _TEST_COOKIE= ${WRKDIR}/.test_done
392 _INSTALL_COOKIE= ${WRKDIR}/.install_done
393 _PACKAGE_COOKIE= ${WRKDIR}/.package_done
394 _INTERACTIVE_COOKIE= .interactive_stage
395 _NULL_COOKIE= ${WRKDIR}/.null
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
396
397 # Miscellaneous overridable commands:
33ed0c4 Add code to include the size of a package into both the
hubertf authored
398 SHCOMMENT?= ${ECHO_MSG} >/dev/null '***'
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
399
ca2e042 Introduce LIBABISUFFIX for platforms which require ABI-dependant libr…
sketch authored
400 LIBABISUFFIX?=
401
85d2418 Implement some parts of proposals posted to tech-pkg:
tv authored
402 TOUCH_FLAGS?= -f
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
403
404 # Figure out where the local mtree file is
8fa5f67 * Make PKGSRC_TOPDIR a private variable by renaming it to _PKGSRC_TOP…
jlam authored
405 MTREE_FILE?= ${PKGSRCDIR}/mk/${OPSYS}.pkg.dist
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
406 MTREE_ARGS?= -U -f ${MTREE_FILE} -d -e -p
407
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
408 # Debugging levels for this file, dependent on PKG_DEBUG_LEVEL definition
409 # 0 == normal, default, quiet operation
410 # 1 == all shell commands echoed before invocation
411 # 2 == shell "set -x" operation
412 PKG_DEBUG_LEVEL?= 0
413 _PKG_SILENT= @
952a343 When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
jlam authored
414 _PKG_DEBUG= # empty
415 _PKG_DEBUG_SCRIPT= # empty
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
416
417 .if ${PKG_DEBUG_LEVEL} > 0
952a343 When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
jlam authored
418 _PKG_SILENT= # empty
42ce372 Add Solaris support to pkgsrc, using Christos Zoulas' NetBSD emulation
agc authored
419 .endif
420
421 .if ${PKG_DEBUG_LEVEL} > 1
422 _PKG_DEBUG= set -x;
952a343 When PKG_DEBUG_LEVEL=2, set_PKG_DEBUG_SCRIPT is set to "${SH} -x". Use
jlam authored
423 _PKG_DEBUG_SCRIPT= ${SH} -x
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
424 .endif
425
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
426 # A few aliases for *-install targets
804c41e Introduce new variables:
jschauma authored
427 INSTALL_PROGRAM?= \
616dce3 Replace STRIPFLAG with _STRIPFLAG_INSTALL to fix pkg/15467.
yyamano authored
428 ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
804c41e Introduce new variables:
jschauma authored
429 INSTALL_GAME?= \
430 ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEMODE}
431 INSTALL_SCRIPT?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
432 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
804c41e Introduce new variables:
jschauma authored
433 INSTALL_LIB?= \
43e0322 Add a new install macro INSTALL_LIB for use when installing libraries
tv authored
434 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
804c41e Introduce new variables:
jschauma authored
435 INSTALL_DATA?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
436 ${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE}
0e6e504 Introduce GAMEDATAMODE and INSTALL_GAME_DATA, which will take care
jschauma authored
437 INSTALL_GAME_DATA?= \
438 ${INSTALL} ${COPY} -o ${GAMEOWN} -g ${GAMEGRP} -m ${GAMEDATAMODE}
804c41e Introduce new variables:
jschauma authored
439 INSTALL_MAN?= \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
440 ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE}
804c41e Introduce new variables:
jschauma authored
441 INSTALL_PROGRAM_DIR?= \
66d391f Create directories with mode 0755, since that is what the mtree
wiz authored
442 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${PKGDIRMODE}
804c41e Introduce new variables:
jschauma authored
443 INSTALL_SCRIPT_DIR?= \
2fcd7fe Add INSTALL_*_DIR macros.
hubertf authored
444 ${INSTALL_PROGRAM_DIR}
804c41e Introduce new variables:
jschauma authored
445 INSTALL_LIB_DIR?= \
43e0322 Add a new install macro INSTALL_LIB for use when installing libraries
tv authored
446 ${INSTALL_PROGRAM_DIR}
804c41e Introduce new variables:
jschauma authored
447 INSTALL_DATA_DIR?= \
66d391f Create directories with mode 0755, since that is what the mtree
wiz authored
448 ${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} -m ${PKGDIRMODE}
804c41e Introduce new variables:
jschauma authored
449 INSTALL_MAN_DIR?= \
66d391f Create directories with mode 0755, since that is what the mtree
wiz authored
450 ${INSTALL} -d -o ${MANOWN} -g ${MANGRP} -m ${PKGDIRMODE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
451
f4f6304 Fixed some quoting issues.
rillig authored
452 INSTALL_MACROS= BSD_INSTALL_PROGRAM=${INSTALL_PROGRAM:Q} \
453 BSD_INSTALL_SCRIPT=${INSTALL_SCRIPT:Q} \
454 BSD_INSTALL_LIB=${INSTALL_LIB:Q} \
455 BSD_INSTALL_DATA=${INSTALL_DATA:Q} \
456 BSD_INSTALL_MAN=${INSTALL_MAN:Q} \
457 BSD_INSTALL=${INSTALL:Q} \
458 BSD_INSTALL_PROGRAM_DIR=${INSTALL_PROGRAM_DIR:Q} \
459 BSD_INSTALL_SCRIPT_DIR=${INSTALL_SCRIPT_DIR:Q} \
460 BSD_INSTALL_LIB_DIR=${INSTALL_LIB_DIR:Q} \
461 BSD_INSTALL_DATA_DIR=${INSTALL_DATA_DIR:Q} \
462 BSD_INSTALL_MAN_DIR=${INSTALL_MAN_DIR:Q} \
463 BSD_INSTALL_GAME=${INSTALL_GAME:Q} \
464 BSD_INSTALL_GAME_DATA=${INSTALL_GAME_DATA:Q}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
465 MAKE_ENV+= ${INSTALL_MACROS}
466 SCRIPTS_ENV+= ${INSTALL_MACROS}
467
468 # The user can override the NO_PACKAGE by specifying this from
469 # the make command line
470 .if defined(FORCE_PACKAGE)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
471 . undef NO_PACKAGE
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
472 .endif
473
0c6bf26 s/PLIST_SUB/PLIST_SUBST/
sakamoto authored
474 # Set PLIST_SUBST to substitute "${variable}" to "value" in PLIST
74d9b13 Changes for building dynamic PLIST for perl packages:
jlam authored
475 PLIST_SUBST+= OPSYS=${OPSYS} \
476 OS_VERSION=${OS_VERSION} \
477 MACHINE_ARCH=${MACHINE_ARCH} \
478 MACHINE_GNU_ARCH=${MACHINE_GNU_ARCH} \
479 MACHINE_GNU_PLATFORM=${MACHINE_GNU_PLATFORM} \
a9f2d0b Add missing LN to PLIST_SUBST
rh authored
480 LN=${LN:Q} \
74d9b13 Changes for building dynamic PLIST for perl packages:
jlam authored
481 LOWER_VENDOR=${LOWER_VENDOR} \
482 LOWER_OPSYS=${LOWER_OPSYS} \
893cbf3 Add LOWER_OS_VERSION to match LOWER_OPSYS, LOWER_VENDOR, and LOWER_ARCH
abs authored
483 LOWER_OS_VERSION=${LOWER_OS_VERSION} \
497a81c Add ${PKGBASE} to the things to substitute for in PLISTs.
jlam authored
484 PKGBASE=${PKGBASE} \
13cc4c1 Invent a new variable "PKGNAME_NOREV" which holds the package name wi…
tron authored
485 PKGNAME=${PKGNAME_NOREV} \
fe5e2f6 Fix cut and paste error in last commit.
tron authored
486 PKGLOCALEDIR=${PKGLOCALEDIR} \
487 PKGVERSION=${PKGVERSION:C/nb[0-9]*$//} \
2ae742b Don't hardcode /usr/X11R6 when making directories or running X based
skrll authored
488 LOCALBASE=${LOCALBASE} \
f3a9373 Make the value of VIEWBASE available in more settings.
jlam authored
489 VIEWBASE=${VIEWBASE} \
2ae742b Don't hardcode /usr/X11R6 when making directories or running X based
skrll authored
490 X11BASE=${X11BASE} \
491 X11PREFIX=${X11PREFIX} \
756a336 So many of our PLIST use mkdir, rmdir, and true, and we have full pat…
jlam authored
492 SVR4_PKGNAME=${SVR4_PKGNAME} \
a562193 Also substitute for CHMOD, CHOWN, CHGRP in PLISTs.
jlam authored
493 CHGRP=${CHGRP:Q} \
494 CHMOD=${CHMOD:Q} \
495 CHOWN=${CHOWN:Q} \
756a336 So many of our PLIST use mkdir, rmdir, and true, and we have full pat…
jlam authored
496 MKDIR=${MKDIR:Q} \
497 RMDIR=${RMDIR:Q} \
ced2d2e mkdir -> ${MKDIR}
skrll authored
498 RM=${RM:Q} \
a00c14a Add QMAILDIR variable that defaults to /var/qmail, may be set in /etc…
zuntum authored
499 TRUE=${TRUE:Q} \
500 QMAILDIR=${QMAILDIR}
bb5add8 Add support for PLIST_SUB variable. It is a list of "VAR=VALUE" pairs,
sakamoto authored
501
5026c4b Add alternatives.mk, a file used to manipulate the alternatives system.
jmmv authored
502 # Handle alternatives
503 #
504 .include "../../mk/alternatives.mk"
505
0a7cbe8 Introduce a new variable "CONF_DEPENDS" for pkgviews: a package's
jlam authored
506 # CONF_DEPENDS notes a dependency where the config directory for the
507 # package matches the dependency's config directory. CONF_DEPENDS is
508 # only meaningful if ${PKG_INSTALLATION_TYPE} == "pkgviews".
509 #
510 CONF_DEPENDS?= # empty
511 .if !empty(CONF_DEPENDS)
512 USE_PKGINSTALL= yes
513 .endif
514
41ad09d Move the inclusion of bsd.pkg.install.mk higher so that binary packages
jlam authored
515 .if defined(USE_PKGINSTALL) && !empty(USE_PKGINSTALL:M[yY][eE][sS])
cfc824b Rename mk/bsd.pkg.install.mk to mk/install/bsd.pkginstall.mk to
jlam authored
516 . include "../../mk/install/bsd.pkginstall.mk"
41ad09d Move the inclusion of bsd.pkg.install.mk higher so that binary packages
jlam authored
517 .endif
518
8067991 Make any INSTALL or DEINSTALL scripts specifiable in the package
agc authored
519 # Set INSTALL_FILE to be the name of any INSTALL file
520 .if !defined(INSTALL_FILE) && exists(${PKGDIR}/INSTALL)
521 INSTALL_FILE= ${PKGDIR}/INSTALL
522 .endif
523
524 # Set DEINSTALL_FILE to be the name of any DEINSTALL file
525 .if !defined(DEINSTALL_FILE) && exists(${PKGDIR}/DEINSTALL)
526 DEINSTALL_FILE= ${PKGDIR}/DEINSTALL
527 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
528
1ca7a4f Allow MESSAGE_SRC to be a space-separated list of files, like PLIST_SRC,
jlam authored
529 # If MESSAGE hasn't been defined, then set MESSAGE_SRC to be a space-separated
530 # list of files to be concatenated together to generate the MESSAGE file.
531 #
6d37e91 Add OS and arch specific MESSAGE file handling. This removes the
grant authored
532 .if !defined(MESSAGE_SRC) && !defined(MESSAGE)
56af313 Partially revert to behavior of revision 1.1100 wrt MESSAGE_SRC:
seb authored
533 . if exists(${PKGDIR}/MESSAGE)
534 MESSAGE_SRC= ${PKGDIR}/MESSAGE
535 . else
536 . if exists(${PKGDIR}/MESSAGE.common)
6d37e91 Add OS and arch specific MESSAGE file handling. This removes the
grant authored
537 MESSAGE_SRC= ${PKGDIR}/MESSAGE.common
56af313 Partially revert to behavior of revision 1.1100 wrt MESSAGE_SRC:
seb authored
538 . endif
539 . if exists(${PKGDIR}/MESSAGE.${OPSYS})
6d37e91 Add OS and arch specific MESSAGE file handling. This removes the
grant authored
540 MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}
56af313 Partially revert to behavior of revision 1.1100 wrt MESSAGE_SRC:
seb authored
541 . endif
f47f0f3 Add architecture specific MESSAGE file handling.
salo authored
542 . if exists(${PKGDIR}/MESSAGE.${MACHINE_ARCH:C/i[3-6]86/i386/g})
543 MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${MACHINE_ARCH:C/i[3-6]86/i386/g}
544 . endif
dcb217c use the form MESSAGE.${OPSYS}-${MACHINE_PLATFORM} for automatic
grant authored
545 . if exists(${PKGDIR}/MESSAGE.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g})
546 MESSAGE_SRC+= ${PKGDIR}/MESSAGE.${OPSYS}-${MACHINE_ARCH:C/i[3-6]86/i386/g}
56af313 Partially revert to behavior of revision 1.1100 wrt MESSAGE_SRC:
seb authored
547 . endif
6d37e91 Add OS and arch specific MESSAGE file handling. This removes the
grant authored
548 . endif
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
549 .endif
550
551 .if defined(MESSAGE_SRC)
e377186 Rework the way that packages are registered during a "make install". We
jlam authored
552 MESSAGE= ${PKG_DB_TMPDIR}/+DISPLAY
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
553
554 # Set MESSAGE_SUBST to substitute "${variable}" to "value" in MESSAGE
555 MESSAGE_SUBST+= PKGNAME=${PKGNAME} \
03b74cd Add PKGBASE to MESSAGE_SUBST for substituting variables in MESSAGEs.
reed authored
556 PKGBASE=${PKGBASE} \
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
557 PREFIX=${PREFIX} \
558 LOCALBASE=${LOCALBASE} \
f3a9373 Make the value of VIEWBASE available in more settings.
jlam authored
559 VIEWBASE=${VIEWBASE} \
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
560 X11PREFIX=${X11PREFIX} \
625d612 Also substitute for ${PKG_SYSCONFDIR} in MESSAGE files.
jlam authored
561 X11BASE=${X11BASE} \
42380fa Add ${QMAILDIR} to MESSAGE_SUBST, as it is going to be used in all qm…
zuntum authored
562 PKG_SYSCONFDIR=${PKG_SYSCONFDIR} \
701973b Recognize ROOT_USER and ROOT_GROUP in MESSAGE files.
jlam authored
563 ROOT_GROUP=${ROOT_GROUP} \
564 ROOT_USER=${ROOT_USER} \
42380fa Add ${QMAILDIR} to MESSAGE_SUBST, as it is going to be used in all qm…
zuntum authored
565 QMAILDIR=${QMAILDIR}
1ca7a4f Allow MESSAGE_SRC to be a space-separated list of files, like PLIST_SRC,
jlam authored
566
567 MESSAGE_SUBST_SED= ${MESSAGE_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/}
89a889b Make the REQ and MESSAGE files specifiable from package Makefiles,
agc authored
568 .endif
569
3bfda94 Due to the special handling of pkgtools/digest in pkgsrc (it must be
jlam authored
570 # If pkgsrc is supposed to ensure that tests are run before installation
571 # of the package, then the build targets should be "build test", otherwise
572 # just "build" suffices. _PKGSRC_BUILD_TARGETS is used in the "all",
573 # "install", and "uptodate-digest" targets.
574 #
575 .if !empty(PKGSRC_RUN_TEST:M[yY][eE][sS])
576 _PKGSRC_BUILD_TARGETS= build test
577 .else
578 _PKGSRC_BUILD_TARGETS= build
579 .endif
580
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
581 .PHONY: uptodate-digest
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
582 uptodate-digest:
6dd50f7 Test was reversed.
jlam authored
583 .if !empty(USE_DIGEST:M[yY][eE][sS])
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
584 ${_PKG_SILENT}${_PKG_DEBUG} \
80258e3 Change uptodate-digest check from excluding digest on 'digest-* | pkg…
abs authored
585 if [ -f ${DISTINFO_FILE} -a \( ! -f ${DIGEST} -o ${DIGEST_VERSION} -lt ${DIGEST_REQD} \) ]; then \
8fa5f67 * Make PKGSRC_TOPDIR a private variable by renaming it to _PKGSRC_TOP…
jlam authored
586 { cd ${PKGSRCDIR}/pkgtools/digest; \
80258e3 Change uptodate-digest check from excluding digest on 'digest-* | pkg…
abs authored
587 ${MAKE} clean; \
588 if [ -f ${DIGEST} ]; then \
589 ${MAKE} ${MAKEFLAGS} deinstall; \
590 fi; \
3bfda94 Due to the special handling of pkgtools/digest in pkgsrc (it must be
jlam authored
591 ${MAKE} ${MAKEFLAGS} ${_PKGSRC_BUILD_TARGETS}; \
592 if [ -f ${DIGEST} ]; then \
593 ${MAKE} ${MAKEFLAGS} deinstall; \
594 fi; \
80258e3 Change uptodate-digest check from excluding digest on 'digest-* | pkg…
abs authored
595 ${MAKE} ${MAKEFLAGS} ${DEPENDS_TARGET}; \
596 ${MAKE} ${MAKEFLAGS} clean; } \
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
597 fi
3e1f9b1 If USE_DIGEST is "no", then skip the check for an up-to-date digest.
jlam authored
598 .else
599 @${DO_NADA}
600 .endif
0539cd4 Add support for message digests other than md5 into pkgsrc. This is done
agc authored
601
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
602 .if !defined(PKG_ARGS_COMMON)
005bc33 Revert previous. There are extra quotes in COMMENT files created by make
bouyer authored
603 PKG_ARGS_COMMON= -v -c -${COMMENT:Q}" " -d ${DESCR} -f ${PLIST}
659515a Change COMMENT handling:
wiz authored
604 PKG_ARGS_COMMON+= -l -b ${BUILD_VERSION_FILE} -B ${BUILD_INFO_FILE}
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
605 PKG_ARGS_COMMON+= -s ${SIZE_PKG_FILE} -S ${SIZE_ALL_FILE}
8b08eac Undo implicit recursive package registration. The buildlink[23] syst…
tv authored
606 PKG_ARGS_COMMON+= -P "`${MAKE} ${MAKEFLAGS} run-depends-list | ${SORT} -u`"
f28b512 Don't write conflicts into the binary packages unless they're "overwr…
jlam authored
607 . if defined(CONFLICTS) && (${PKG_INSTALLATION_TYPE} == "overwrite")
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
608 PKG_ARGS_COMMON+= -C "${CONFLICTS}"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
609 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
610 . if defined(INSTALL_FILE)
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
611 PKG_ARGS_COMMON+= -i ${INSTALL_FILE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
612 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
613 . if defined(DEINSTALL_FILE)
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
614 PKG_ARGS_COMMON+= -k ${DEINSTALL_FILE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
615 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
616 . if defined(MESSAGE)
a28eea9 Add automatic ${VARIABLE} handling for MESSAGE files.
wiz authored
617 PKG_ARGS_COMMON+= -D ${MESSAGE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
618 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
619 . if !defined(NO_MTREE)
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
620 PKG_ARGS_COMMON+= -m ${MTREE_FILE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
621 . endif
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
622 . if defined(PKG_PRESERVE)
2b46b12 Add the PKG_PRESERVE capability to bsd.pkg.mk.
agc authored
623 PKG_ARGS_COMMON+= -n ${PRESERVE_FILE}
624 . endif
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
625
626 PKG_ARGS_INSTALL= -p ${PREFIX} ${PKG_ARGS_COMMON}
de09ff8 Don't use regexp substitution where plain substitution is intended,
hubertf authored
627 PKG_ARGS_BINPKG= -p ${PREFIX:S/^${DESTDIR}//} -L ${PREFIX} ${PKG_ARGS_COMMON}
675041e As per discussion on tech-pkg, correct behavior of `make package' in the
jwise authored
628 .endif # !PKG_ARGS_COMMON
629
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
630 .if ${PKG_INSTALLATION_TYPE} == "pkgviews"
631 PKG_ARGS_INSTALL+= -U # don't update the pkgdb.byfile.db
632 PKG_ARGS_BINPKG+= -E # create an empty views file in the binpkg
633 .endif
634
04f7e63 Previous commit to bsd.pkg.mk caught some "SMART_MESSAGES" work - doc…
agc authored
635 # Define SMART_MESSAGES in /etc/mk.conf for messages giving the tree
2899a74 Typo in comment for SMART_MESSAGES.
jlam authored
636 # of dependencies for building, and the current target.
16452d1 Replaced .ifdef with .if defined() and .ifndef with .if !defined(). This
rillig authored
637 .if defined(SMART_MESSAGES)
fce3306 Fix PACKAGE_DEPENDS_QUICK when installing on Solaris - escape the
agc authored
638 _PKGSRC_IN?= ===> ${.TARGET} [${PKGNAME}${_PKGSRC_DEPS}] ===
639 .else
640 _PKGSRC_IN?= ===
641 .endif
642
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
643 # Used to print all the '===>' style prompts - override this to turn them off.
644 ECHO_MSG?= ${ECHO}
645
6348997 Introduce TRUE?=/usr/bin/true, and use it.
hubertf authored
646 # How to do nothing. Override if you, for some strange reason, would rather
647 # do something.
648 DO_NADA?= ${TRUE}
649
c502b71 Implement a new PASSIVE_FETCH definition, which can be set in the
agc authored
650 # If this host is behind a filtering firewall, use passive ftp(1)
651 .if defined(PASSIVE_FETCH)
652 FETCH_BEFORE_ARGS += -p
653 .endif
654
74e5f84 Remove MASTER_SITE_* definitions from bsd.pkg.mk and put them
xtraeme authored
655 # Include popular master sites
656 .include "../../mk/bsd.sites.mk"
657
f82ed56 Automatically set MASTER_SITE_LOCAL from MASTER_SITE_BACKUP, and make…
hubertf authored
658 .if defined(DIST_SUBDIR)
8a6c9b4 Don't apply ${DIST_SUBDIR} twice.
hubertf authored
659 _MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP:=${DIST_SUBDIR}/}
660 . if defined(MASTER_SITE_OVERRIDE)
661 _MASTER_SITE_OVERRIDE:= ${MASTER_SITE_OVERRIDE:=${DIST_SUBDIR}/}
662 . endif # MASTER_SITE_OVERRIDE
663 .else # !DIST_SUBDIR
664 _MASTER_SITE_BACKUP:= ${MASTER_SITE_BACKUP}
665 . if defined(MASTER_SITE_OVERRIDE)
666 _MASTER_SITE_OVERRIDE:= ${MASTER_SITE_OVERRIDE}
667 . endif # MASTER_SITE_OVERRIDE
608d9dc Only add DIST_SUBDIR to MASTER_SITE_OVERRIDE if MASTER_SITE_OVERRIDE
hubertf authored
668 .endif # DIST_SUBDIR
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
669
670 # Where to put distfiles that don't have any other master site
671 MASTER_SITE_LOCAL?= \
b593c1a Add "ftp.fi.netbsd.org" to "MASTER_SITE_LOCAL" so that e.g. building
tron authored
672 ${MASTER_SITE_BACKUP:=LOCAL_PORTS/} \
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
673
674 ALLFILES?= ${DISTFILES} ${PATCHFILES}
8fb71f4 Speed up the evaluation of ${CKSUMFILES} vs. ${IGNOREFILES} a little …
tv authored
675 CKSUMFILES?= ${ALLFILES}
676 .for __tmp__ in ${IGNOREFILES}
677 CKSUMFILES:= ${CKSUMFILES:N${__tmp__}}
678 .endfor
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
679
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
680 # List of all files, with ${DIST_SUBDIR} in front. Used for fetch and checksum.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
681 .if defined(DIST_SUBDIR)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
682 . if ${CKSUMFILES} != ""
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
683 _CKSUMFILES?= ${CKSUMFILES:S/^/${DIST_SUBDIR}\//}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
684 . endif
8c4b5d5 When DIST_SUBDIR is set, make sure various download variables don't get
cube authored
685 . if !empty(DISTFILES)
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
686 _DISTFILES?= ${DISTFILES:S/^/${DIST_SUBDIR}\//}
8c4b5d5 When DIST_SUBDIR is set, make sure various download variables don't get
cube authored
687 . else
688 _DISTFILES?= # empty
689 . endif
690 . if defined(IGNOREFILES) && !empty(IGNOREFILES)
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
691 _IGNOREFILES?= ${IGNOREFILES:S/^/${DIST_SUBDIR}\//}
8c4b5d5 When DIST_SUBDIR is set, make sure various download variables don't get
cube authored
692 . endif
693 . if defined(PATCHFILES) && !empty(PATCHFILES)
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
694 _PATCHFILES?= ${PATCHFILES:S/^/${DIST_SUBDIR}\//}
8c4b5d5 When DIST_SUBDIR is set, make sure various download variables don't get
cube authored
695 . else
696 _PATCHFILES?= # empty
697 . endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
698 .else
699 _CKSUMFILES?= ${CKSUMFILES}
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
700 _DISTFILES?= ${DISTFILES}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
701 _IGNOREFILES?= ${IGNOREFILES}
070ed36 Fix MD5 checksum test in "do-fetch:" target to work with "DIST_SUBDIR".
tron authored
702 _PATCHFILES?= ${PATCHFILES}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
703 .endif
d811f67 Re-work the fetch target(s), as discussed on "tech-pkg". The primary
fredb authored
704 _ALLFILES?= ${_DISTFILES} ${_PATCHFILES}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
705
2465e63 Add _DISTFILES and _PATCHFILES definitions to the list of definitions
agc authored
706 BUILD_DEFS+= _DISTFILES _PATCHFILES
707
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
708 .if defined(GNU_CONFIGURE)
444cb24 New variable GNU_CONFIGURE_PREFIX whose value is the argument to the
jlam authored
709 #
d405635 It's GNU_CONFIGURE_PREFIX, not CONFIGURE_PREFIX.
jlam authored
710 # GNU_CONFIGURE_PREFIX is the argument to the --prefix option passed to the
444cb24 New variable GNU_CONFIGURE_PREFIX whose value is the argument to the
jlam authored
711 # GNU configure script.
712 #
713 GNU_CONFIGURE_PREFIX?= ${PREFIX}
90653cf Occasionally we do not want the "--host=${MACHINE_GNU_PLATFORM}" argu…
agc authored
714 USE_GNU_CONFIGURE_HOST?= yes
715 . if !empty(USE_GNU_CONFIGURE_HOST:M[yY][eE][sS])
444cb24 New variable GNU_CONFIGURE_PREFIX whose value is the argument to the
jlam authored
716 CONFIGURE_ARGS+= --host=${MACHINE_GNU_PLATFORM}
90653cf Occasionally we do not want the "--host=${MACHINE_GNU_PLATFORM}" argu…
agc authored
717 . endif
444cb24 New variable GNU_CONFIGURE_PREFIX whose value is the argument to the
jlam authored
718 CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
719 HAS_CONFIGURE= yes
d598c3a Rename NO_CONFIGURE_INFODIR to CONFIGURE_HAS_INFODIR (which defaults to
reed authored
720 CONFIGURE_HAS_INFODIR?= yes
721 . if !empty(INFO_FILES) && !empty(CONFIGURE_HAS_INFODIR:M[yY][eE][sS])
ebc2c7f If using GNU_CONFIGURE then set --infodir to ${PREFIX}/${INFO_DIR}.
reed authored
722 CONFIGURE_ARGS+= --infodir=${PREFIX}/${INFO_DIR}
723 . endif
df695c5 if using GNU configure and CONFIG_{GUESS,SUB}_OVERRIDE is not defined,
grant authored
724 #
725 # By default, override config.guess and config.sub for GNU configure
726 # packages. pkgsrc's updated versions of these scripts allows GNU
727 # configure to recognise NetBSD ports such as shark.
728 #
2c41357 Make CONFIG_{GUESS,SUB}_OVERRIDE slighly more powerful by allowing th…
jlam authored
729 CONFIG_GUESS_OVERRIDE?= \
730 config.guess */config.guess */*/config.guess
731 CONFIG_SUB_OVERRIDE?= \
732 config.sub */config.sub */*/config.sub
6d20fd6 Add override for uncommon "config.rpath" GNU config snippet. Use pla…
tv authored
733 CONFIG_RPATH_OVERRIDE?= # set by platform file as needed
9de0bce Default to overriding config.status after GNU configure has been run.…
jlam authored
734 #
735 # By default, override config.status for GNU configure packages. We
736 # never want it to execute after the configure phase has ended as it
737 # might overwrite any post-configure changes we might have made to the
738 # generated files.
739 #
740 CONFIG_STATUS_OVERRIDE?= \
741 config.status */config.status */*/config.status
a7639cc Update buildlink-x11 to 0.5. Changes from previous version are the
jlam authored
742 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
743
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
744 #
dc0503f Refer doc/pkgsrc.txt instead of Packages.txt.
wiz authored
745 # Config file related settings - see doc/pkgsrc.txt
27734d7 Create a new knob: PKG_SYSCONFVAR
jlam authored
746 #
747 PKG_SYSCONFVAR?= ${PKGBASE}
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
748 PKG_SYSCONFSUBDIR?= # empty
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
749 .if ${PKG_INSTALLATION_TYPE} == "overwrite"
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
750 PKG_SYSCONFDEPOTBASE= # empty
b6d609c Package Makefiles should refer to PKG_SYSCONFBASEDIR instead of
jlam authored
751 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE}
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
752 .else
753 . if !empty(PKG_SYSCONFBASE:M${PREFIX}) || \
754 !empty(PKG_SYSCONFBASE:M${PREFIX}/*)
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
755 PKG_SYSCONFDEPOTBASE= # empty
b6d609c Package Makefiles should refer to PKG_SYSCONFBASEDIR instead of
jlam authored
756 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFBASE}
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
757 . if !empty(CONF_DEPENDS)
758 _PLIST_IGNORE_FILES+= ${PKG_SYSCONFDIR:S,^${PREFIX}/,,}
81787ae Merge pkgviews-mk branch into the HEAD by running:
jlam authored
759 . endif
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
760 . else
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
761 PKG_SYSCONFDEPOTBASE= ${PKG_SYSCONFBASE}/${DEPOT_SUBDIR}
762 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDEPOTBASE}/${PKGNAME}
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
763 . endif
764 .endif
9c8fc30 Set DFLT_PKG_SYSCONDIR to the location that PKG_SYSCONFDIR would have
jlam authored
765 .if empty(PKG_SYSCONFSUBDIR)
766 DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR}
767 .else
768 DFLT_PKG_SYSCONFDIR:= ${PKG_SYSCONFBASEDIR}/${PKG_SYSCONFSUBDIR}
769 .endif
770 PKG_SYSCONFDIR= ${DFLT_PKG_SYSCONFDIR}
771 .if defined(PKG_SYSCONFDIR.${PKG_SYSCONFVAR})
772 PKG_SYSCONFDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
773 PKG_SYSCONFBASEDIR= ${PKG_SYSCONFDIR.${PKG_SYSCONFVAR}}
774 PKG_SYSCONFDEPOTBASE= # empty
775 .endif
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
776
4d05ff6 Visual cleanup from tv-derecurse:
tv authored
777 ALL_ENV+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
0a7cbe8 Introduce a new variable "CONF_DEPENDS" for pkgviews: a package's
jlam authored
778 BUILD_DEFS+= PKG_SYSCONFBASEDIR PKG_SYSCONFDIR
5da865d Move the PKG_SYSCONFDIR logic below the definition of PKGNAME. PKGNA…
jlam authored
779
57095a1 Split replace.mk into two parts, one of which is included by bsd.pref…
jlam authored
780 # These are all of the tools use by pkgsrc Makefiles. This should
781 # eventually be split up into lists of tools required by different
782 # phases of a pkgsrc build.
783 #
b5a95f9 Make a distinction between the tools that pkgsrc needs and the tools
jlam authored
784 PKGSRC_USE_TOOLS+= \
25e3da5 We only need "date" to write the date into the +PRESERVE file.
jlam authored
785 [ awk basename cat chgrp chmod chown cmp cp cut dirname echo \
786 egrep env false file find grep head hostname id install ln ls \
b97b0d4 No package seems to be using ${NICE} so don't require it.
jlam authored
787 mkdir mv pax pwd rm rmdir sed sh sort tail test touch tr true \
788 wc xargs
29dde03 tsort is only used by bsd.bulk-pkg.mk.
jlam authored
789
b61b2f5 Fix mistake in previous commit -- expr is required by the wrapper
jlam authored
790 # bsd.wrapper.mk
791 PKGSRC_USE_TOOLS+= expr
792
96fda8d tee is only used by bsd.bulk-pkg.mk.
jlam authored
793 # bsd.bulk-pkg.mk uses certain tools
29dde03 tsort is only used by bsd.bulk-pkg.mk.
jlam authored
794 .if defined(BATCH)
b61b2f5 Fix mistake in previous commit -- expr is required by the wrapper
jlam authored
795 PKGSRC_USE_TOOLS+= tee tsort
29dde03 tsort is only used by bsd.bulk-pkg.mk.
jlam authored
796 .endif
44e50ed We only need mtree if NO_MTREE isn't defined.
jlam authored
797
798 .if !defined(NO_MTREE)
799 PKGSRC_USE_TOOLS+= mtree
800 .endif
57095a1 Split replace.mk into two parts, one of which is included by bsd.pref…
jlam authored
801
25e3da5 We only need "date" to write the date into the +PRESERVE file.
jlam authored
802 .if defined(PKG_PRESERVE)
803 PKGSRC_USE_TOOLS+= date
804 .endif
805
c4398dc Teach the new tools framework about MAIL_CMD. We use mail/nail as a
jlam authored
806 # We need a mail command to send mail to ${PKGSRC_MESSAGE_RECIPIENTS}.
807 .if !empty(PKGSRC_MESSAGE_RECIPIENTS)
b5a95f9 Make a distinction between the tools that pkgsrc needs and the tools
jlam authored
808 PKGSRC_USE_TOOLS+= mail
c4398dc Teach the new tools framework about MAIL_CMD. We use mail/nail as a
jlam authored
809 .endif
810
5ba65b6 Consolidate the bits that add to PKGSRC_USE_TOOLS, and improve the
jlam authored
811 # We need shlock if we're using locking to synchronize multiple builds
812 # over the same pkgsrc tree.
813 #
814 .if ${PKGSRC_LOCKTYPE} != "none"
815 PKGSRC_USE_TOOLS+= shlock
816 .endif
817
59b6e71 Fix the MANZ handling in bsd.pkg.mk. If MANZ is defined, then we want
jlam authored
818 # If MANZ is defined, then we want the final man pages to be compressed.
819 # If MANZ is not defined, then we want the final man pages to be
820 # uncompressed.
821 #
822 # We need to figure out if during installation, we need either gunzip or
823 # gzip to decompress or compress the installed man pages. If a package
824 # sets MANCOMPRESSED to "yes" or "no", then it's an indication to the
825 # install code that the package itself installed the man pages either
826 # compressed or uncompressed. If a package sets MANCOMPRESSED_IF_MANZ,
827 # then the package uses BSD-style makefiles, so we need to determine if
828 # the BSD-style makefile causes the man pages to be compressed or not.
829 #
830 .if !defined(_MANCOMPRESSED)
d9aa9b7 Turn _MANCOMPRESSED into a strictly "yes" and "no" variable
jlam authored
831 . if defined(MANCOMPRESSED) && !empty(MANCOMPRESSED:M[yY][eE][sS])
832 _MANCOMPRESSED= yes
833 . else
834 _MANCOMPRESSED= no
835 . endif
59b6e71 Fix the MANZ handling in bsd.pkg.mk. If MANZ is defined, then we want
jlam authored
836 . if defined(MANCOMPRESSED_IF_MANZ) && defined(PKGMAKECONF)
837 _MANCOMPRESSED!= \
838 { ${ECHO} ".include \""${PKGMAKECONF:Q}"\""; \
839 ${ECHO} "all:"; \
840 ${ECHO} ".if defined(MANZ)"; \
841 ${ECHO} " @${ECHO} yes"; \
842 ${ECHO} ".else"; \
843 ${ECHO} " @${ECHO} no"; \
844 ${ECHO} ".endif"; \
845 } | ${MAKE} -f - all
846 . endif
847 .endif
848 _MANZ= ${MANZ:Dyes:Uno}
849 MAKEVARS+= _MANCOMPRESSED _MANZ
850
851 .if !empty(_MANCOMPRESSED:M[yY][eE][sS]) && empty(_MANZ:M[yY][eE][sS])
852 PKGSRC_USE_TOOLS+= gunzip
853 .endif
854 .if empty(_MANCOMPRESSED:M[yY][eE][sS]) && !empty(_MANZ:M[yY][eE][sS])
855 PKGSRC_USE_TOOLS+= gzip
856 .endif
857
95d512b Separate out the variables and targets for the "extract" phase into a
jlam authored
858 # Extract
859 .include "../../mk/bsd.pkg.extract.mk"
860
a043392 Separate out the variables and targets for the "patch" phase into a
jlam authored
861 # Patch
862 .include "../../mk/bsd.pkg.patch.mk"
863
e0d9e4f Finish removing instances of _USE_NEW_TOOLS from pkgsrc.
jlam authored
864 # Tools
416554c Add a new yes/no variable USE_NEW_TOOLS to ease testing the new tools
jlam authored
865 .include "../../mk/tools/bsd.tools.mk"
eccaef6 Move the inclusion of tools.mk ahead of bsd.buildlink3.mk so that too…
jlam authored
866
900210b Simplify unprivileged builds by adding a new variable, UNPRIVILEGED, …
jmmv authored
867 # Unprivileged builds
868 .include "../../mk/unprivileged.mk"
869
5b62a95 compiler.mk uses the following tools to compute the values of variables
jlam authored
870 # If NO_BUILD is defined, default to not needing a compiler.
871 .if defined(NO_BUILD)
872 USE_LANGUAGES?= # empty
873 .endif
874
875 # Get the proper dependencies and set the PATH to use the compiler
876 # named in PKGSRC_COMPILER.
877 #
878 .include "../../mk/compiler.mk"
879
427307f Always include wrapper/bl3, period, even if NO_BUILD.
tv authored
880 .include "../../mk/wrapper/bsd.wrapper.mk"
93cd8e1 Merge pkgsrc/mk from the buildlink2 branch back into the main trunk.
jlam authored
881
437ad7a Process RECOMMENDED *after* including bsd.buildlink3.mk; else it has no
tv authored
882 .if defined(RECOMMENDED)
883 . if !empty(IGNORE_RECOMMENDED:M[nN][oO])
884 DEPENDS+= ${RECOMMENDED}
885 . else
886 BUILD_DEFS+= IGNORE_RECOMMENDED
887 . endif
888 .endif
889
591e989 Move the "dependency reduction" code from buildlink3 to bsd.pkg.mk so
jlam authored
890 # Remove some redundant dependencies from the DEPENDS list.
891 .include "../../mk/reduce-depends.mk"
892 DEPENDS:= ${REDUCED_DEPENDS}
893
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
894 # Find out the PREFIX of dependencies where the PREFIX is needed at build time.
895 .if defined(EVAL_PREFIX)
d0cb1b1 Instead of structuring code so that variables defined by the EVAL_PREFIX
jlam authored
896 FIND_PREFIX:= ${EVAL_PREFIX}
897 . include "../../mk/find-prefix.mk"
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
898 .endif
899
900 .if !defined(_PATH_ORIG)
901 _PATH_ORIG:= ${PATH}
902 MAKEFLAGS+= _PATH_ORIG=${_PATH_ORIG:Q}
7007706 Fix handling of PREPEND_PATH in dependency-recursed builds.
tv authored
903 .endif
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
904
7007706 Fix handling of PREPEND_PATH in dependency-recursed builds.
tv authored
905 .if !empty(PREPEND_PATH)
605975d Merge down deferred PREPEND_PATH handling from the tv-derecurse branch.
tv authored
906 # This is very Special. Because PREPEND_PATH is set with += in reverse order,
907 # the awk expression reverses the order again (since bootstrap bmake doesn't
908 # yet support the :[-1..1] construct).
909 _PATH_CMD= ${ECHO} `${ECHO} ${PREPEND_PATH:Q} | ${AWK} '{ORS=":";for (i=NF;i>0;i--) print $$i}'`${_PATH_ORIG}
910 PATH= ${_PATH_CMD:sh} # DOES NOT use :=, to defer evaluation
911 .endif
1221299 * Move pkgsrc/mk/compiler/bsd.compiler.mk to pkgsrc/mk/compiler.mk.
jlam authored
912
e0f0c1d Rename PATH_ENV to BUILD_ENV, which better expresses what it's for.
jlam authored
913 # Add these bits to the environment use when invoking the sub-make
914 # processes for build-related phases.
915 #
e7d8e66 Move the PREPEND_PATH for LOCALBASE/bin (and optionally X11BASE/bin) …
tv authored
916 BUILD_ENV+= PATH=${PATH:Q}
326967f We only prepend a directory to the PATH if we haven't already done so
jlam authored
917
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
918 .MAIN: all
919
920 ################################################################
67feee0 This is NetBSD. s/port/package/g
agc authored
921 # Many ways to disable a package.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
922 #
23b1b09 Revert last change. I only tested this on netbsd-1-4; it doesn't seem to
fredb authored
923 # 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
924 #
6f877bc Correct a factual error in the comment "ways to disable a package":
fredb authored
925 # Don't build a package if it's restricted and we don't want to
926 # get into that.
927 #
af7d172 Add a new mechanism for handling "crypto" packages, as discussed
fredb authored
928 # Don't build any package that utilizes strong cryptography, for
929 # when the law of the land forbids it.
930 #
6f877bc Correct a factual error in the comment "ways to disable a package":
fredb authored
931 # Don't attempt to build packages against X if we don't have X.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
932 #
67feee0 This is NetBSD. s/port/package/g
agc authored
933 # Don't build a package if it's broken.
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
934 ################################################################
935
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
936 .if !defined(NO_SKIP)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
937 . if (defined(NO_BIN_ON_CDROM) && defined(FOR_CDROM))
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
938 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
939 " "${NO_BIN_ON_CDROM:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
940 . endif
941 . if (defined(NO_SRC_ON_CDROM) && defined(FOR_CDROM))
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
942 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
943 " "${NO_SRC_ON_CDROM:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
944 . endif
945 . if (defined(RESTRICTED) && defined(NO_RESTRICTED))
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
946 PKG_FAIL_REASON+= "${PKGNAME} is restricted:" \
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
947 " "${RESTRICTED:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
948 . endif
949 . if !(${MKCRYPTO} == "YES" || ${MKCRYPTO} == yes)
5bdfc68 Deprecate USE_SSL.
wiz authored
950 . if defined(CRYPTO)
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
951 PKG_FAIL_REASON+= "${PKGNAME} may not be built, because it utilizes strong cryptography"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
952 . endif
af7d172 Add a new mechanism for handling "crypto" packages, as discussed
fredb authored
953 . endif
c62edef Use X11_TYPE check instead of USE_PKGSRC_XFREE86. It's safe to use the
jlam authored
954 . if defined(USE_X11) && !exists(${X11BASE})
955 . if ${X11_TYPE} == "native"
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
956 PKG_FAIL_REASON+= "${PKGNAME} uses X11, but ${X11BASE} not found"
c62edef Use X11_TYPE check instead of USE_PKGSRC_XFREE86. It's safe to use the
jlam authored
957 . else
958 ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${X11BASE}
959 ${_PKG_SILENT}${_PKG_DEBUG}${CHOWN} ${ROOT_USER}:${ROOT_GROUP} ${X11BASE}
960 ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} ${PKGDIRMODE} ${X11BASE}
961 . endif
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
962 . endif
963 . if defined(BROKEN)
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
964 PKG_FAIL_REASON+= "${PKGNAME} is marked as broken:" ${BROKEN:Q}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
965 . endif
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
966
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
967 . if defined(LICENSE)
d23c566 Found another two uses of .ifndef and .ifdef.
rillig authored
968 . if defined(ACCEPTABLE_LICENSES)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
969 . for _lic in ${ACCEPTABLE_LICENSES}
970 . if ${LICENSE} == "${_lic}"
ac8a769 Add an ACCEPTABLE_LICENCES definition to /etc/mk.conf. This is a
agc authored
971 _ACCEPTABLE= yes
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
972 . endif # LICENSE == _lic
973 . endfor # _lic
974 . endif # ACCEPTABLE_LICENSES
d23c566 Found another two uses of .ifndef and .ifdef.
rillig authored
975 . if !defined(_ACCEPTABLE)
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
976 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
977 " To view the license, enter \"${MAKE} show-license\"." \
978 " To indicate acceptance, add this line to your /etc/mk.conf:" \
979 " ACCEPTABLE_LICENSES+=${LICENSE}"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
980 . endif # _ACCEPTABLE
981 . endif # LICENSE
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
982
0dac5d1 Move all settings of IGNORE into one spot. No need for the arch-checking
hubertf authored
983 # Define __PLATFORM_OK only if the OS matches the pkg's allowed list.
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
984 . if defined(ONLY_FOR_PLATFORM) && !empty(ONLY_FOR_PLATFORM)
985 . for __tmp__ in ${ONLY_FOR_PLATFORM}
986 . if ${MACHINE_PLATFORM:M${__tmp__}} != ""
0dac5d1 Move all settings of IGNORE into one spot. No need for the arch-checking
hubertf authored
987 __PLATFORM_OK?= yes
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
988 . endif # MACHINE_PLATFORM
989 . endfor # __tmp__
990 . else # !ONLY_FOR_PLATFORM
991 __PLATFORM_OK?= yes
992 . endif # ONLY_FOR_PLATFORM
993 . for __tmp__ in ${NOT_FOR_PLATFORM}
994 . if ${MACHINE_PLATFORM:M${__tmp__}} != ""
995 . undef __PLATFORM_OK
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
996 . endif # MACHINE_PLATFORM
997 . endfor # __tmp__
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
998 . if !defined(__PLATFORM_OK)
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
999 PKG_SKIP_REASON+= "${PKGNAME} is not available for ${MACHINE_PLATFORM}"
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1000 . endif # !__PLATFORM_OK
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1001
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1002 #
1003 # Now print some error messages that we know we should ignore the pkg
1004 #
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1005 . if defined(PKG_FAIL_REASON) || defined(PKG_SKIP_REASON)
ef1e4cb do not check for ACCEPTABLE_LICENCES when deinstalling. closes PR pk…
assar authored
1006 fetch checksum extract patch configure all build install package \
2aede62 Do not attempt to update a package (deleting the package and all its
rh authored
1007 update install-depends:
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
1008 . if defined(SKIP_SILENT)
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1009 @${DO_NADA}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1010 . else
9d9ab7e Whitespace police - no functional change
agc authored
1011 @for str in ${PKG_FAIL_REASON} ${PKG_SKIP_REASON}; do \
1012 ${ECHO} "${_PKGSRC_IN}> $$str"; \
a5d8a47 * Prevent " etc. in RESTRICTED (NO_{SRC,BIN}_ON_{CDROM,FTP}) and BROKEN
hubertf authored
1013 done
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1014 . endif
ed320c6 Replace IGNORE into PKG_FAIL_REASON and PKG_SKIP_REASON, so pkgsrc
schmonz authored
1015 . if defined(PKG_FAIL_REASON)
1016 @${FALSE}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1017 . endif
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
1018 . endif # SKIP
1019 .endif # !NO_SKIP
b0811b3 Re-move .if!defined(__ARCH_OK) to fix use of NO_IGNORE; document some…
hubertf authored
1020
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1021 # Add these defs to the ones dumped into +BUILD_DEFS
880a45c * Make sure PKGPATH gets added to BUILD_DEFS (I thought it was there…
hubertf authored
1022 BUILD_DEFS+= PKGPATH
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1023 BUILD_DEFS+= OPSYS OS_VERSION MACHINE_ARCH MACHINE_GNU_ARCH
e3afa10 make sure FFLAGS ends up in MAKE_ENV as well as BUILD_DEFS. This all…
dmcmahill authored
1024 BUILD_DEFS+= CPPFLAGS CFLAGS FFLAGS LDFLAGS
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1025 BUILD_DEFS+= CONFIGURE_ENV CONFIGURE_ARGS
d4d3dcb Add 'RESTRICTED' to ${BUILD_DEFS}, so that any restrictions are recorded
fredb authored
1026 BUILD_DEFS+= OBJECT_FMT LICENSE RESTRICTED
866552e * Replace MIRROR_DISTFILES with NO_SRC_ON_FTP
hubertf authored
1027 BUILD_DEFS+= NO_SRC_ON_FTP NO_SRC_ON_CDROM
1028 BUILD_DEFS+= NO_BIN_ON_FTP NO_BIN_ON_CDROM
fda657b + Add and document the PKG_RELATIVE_SYMLINKS option, which makes sure
agc authored
1029
f38c8ae add OSVERSION_SPECIFIC to BUILD_DEFS if defined so it ends up in the …
dmcmahill authored
1030 .if defined(OSVERSION_SPECIFIC)
1031 BUILD_DEFS+= OSVERSION_SPECIFIC
1032 .endif # OSVERSION_SPECIFIC
1033
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
1034 .PHONY: all
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1035 .if !target(all)
3bfda94 Due to the special handling of pkgtools/digest in pkgsrc (it must be
jlam authored
1036 all: ${_PKGSRC_BUILD_TARGETS}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1037 .endif
1038
1039 .if !defined(DEPENDS_TARGET)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1040 . if make(package)
8c2dd40 Set DEPENDS_TARGET=package during a "make package", and propagate
kim authored
1041 DEPENDS_TARGET= package
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1042 . elif make(update)
7c10a7d Default DEPENDS_TARGET to replace if UPDATE_TARGET == replace. This …
rh authored
1043 . if defined(UPDATE_TARGET) && ${UPDATE_TARGET} == "replace"
1044 DEPENDS_TARGET= ${UPDATE_TARGET}
1045 . else
8da6282 Use UPDATE_TARGET (new) instead of DEPENDS_TARGET for 'make update'. …
rh authored
1046 DEPENDS_TARGET= update
7c10a7d Default DEPENDS_TARGET to replace if UPDATE_TARGET == replace. This …
rh authored
1047 . endif
7ac1726 bin-install: set DEPENDS_TARGET=bin-install, so depends are still
hubertf authored
1048 . elif make(bin-install)
1049 DEPENDS_TARGET= bin-install
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1050 . else
3c07452 Use "reinstall" as default for DEPENDS_TARGET, to use any pkg already
hubertf authored
1051 DEPENDS_TARGET= reinstall
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1052 . endif
f4e645f - Add OpenBSD and FreeBSD Ids in the header
hubertf authored
1053 .endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1054
8da6282 Use UPDATE_TARGET (new) instead of DEPENDS_TARGET for 'make update'. …
rh authored
1055 .if !defined(UPDATE_TARGET)
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1056 . if ${DEPENDS_TARGET} == "update"
1057 . if make(package)
8da6282 Use UPDATE_TARGET (new) instead of DEPENDS_TARGET for 'make update'. …
rh authored
1058 UPDATE_TARGET= package
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1059 . else
8da6282 Use UPDATE_TARGET (new) instead of DEPENDS_TARGET for 'make update'. …
rh authored
1060 UPDATE_TARGET= install
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1061 . endif
1062 . else
8da6282 Use UPDATE_TARGET (new) instead of DEPENDS_TARGET for 'make update'. …
rh authored
1063 UPDATE_TARGET= ${DEPENDS_TARGET}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1064 . endif
8da6282 Use UPDATE_TARGET (new) instead of DEPENDS_TARGET for 'make update'. …
rh authored
1065 .endif
1066
eb5e5d4 Set UPDATE_RUNNING=YES when deinstalling due to a update or replace t…
erh authored
1067 UPDATE_RUNNING?= NO
1068
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1069 ################################################################
1070 # The following are used to create easy dummy targets for
1071 # disabling some bit of default target behavior you don't want.
1072 # They still check to see if the target exists, and if so don't
1073 # do anything, since you might want to set this globally for a
67feee0 This is NetBSD. s/port/package/g
agc authored
1074 # group of packages in a Makefile.inc, but still be able to
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1075 # override from an individual Makefile.
1076 ################################################################
1077
1078 # Disable checksum
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
1079 .PHONY: checksum
8269c22 Added a leading underscore to the names of the *_COOKIE variables, as…
rillig authored
1080 .if (defined(NO_CHECKSUM) || exists(${_EXTRACT_COOKIE})) && !target(checksum)
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1081 checksum: fetch
1082 @${DO_NADA}
1083 .endif
1084
6961536 Initial commit of a new wrapper script framework that encapsulates
jlam authored
1085 # Disable wrapper
1086 .PHONY: wrapper
edba5d7 USE_BUILDLINK3 is no longer optional (and cannot be turned off). Per…
tv authored
1087 .if defined(NO_BUILD) && !target(wrapper)
6961536 Initial commit of a new wrapper script framework that encapsulates
jlam authored
1088 wrapper: tools
8269c22 Added a leading underscore to the names of the *_COOKIE variables, as…
rillig authored
1089 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${_WRAPPER_COOKIE}
93cd8e1 Merge pkgsrc/mk from the buildlink2 branch back into the main trunk.
jlam authored
1090 .endif
1091
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1092 # Disable configure
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
1093 .PHONY: configure
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1094 .if defined(NO_CONFIGURE) && !target(configure)
6961536 Initial commit of a new wrapper script framework that encapsulates
jlam authored
1095 configure: wrapper
8269c22 Added a leading underscore to the names of the *_COOKIE variables, as…
rillig authored
1096 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${_CONFIGURE_COOKIE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1097 .endif
1098
1099 # Disable build
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
1100 .PHONY: build
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1101 .if defined(NO_BUILD) && !target(build)
1102 build: configure
8269c22 Added a leading underscore to the names of the *_COOKIE variables, as…
rillig authored
1103 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${_BUILD_COOKIE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1104 .endif
1105
1106 # Disable install
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
1107 .PHONY: install
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1108 .if defined(NO_INSTALL) && !target(install)
1109 install: build
8269c22 Added a leading underscore to the names of the *_COOKIE variables, as…
rillig authored
1110 ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${_INSTALL_COOKIE}
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1111 .endif
1112
1113 # Disable package
5dc948e Mark all targets that do not correspond to real files with the .PHONY
jmmv authored
1114 .PHONY: package
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1115 .if defined(NO_PACKAGE) && !target(package)
1116 package:
2f0aa0b * Garbage collect IGNORE -> SKIP migration.
uebayasi authored
1117 . if defined(SKIP_SILENT)
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1118 @${DO_NADA}
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1119 . else
fce3306 Fix PACKAGE_DEPENDS_QUICK when installing on Solaris - escape the
agc authored
1120 @${ECHO_MSG} "${_PKGSRC_IN}> ${PKGNAME} may not be packaged: ${NO_PACKAGE}."
cee7bd8 Change indentation (whitespace changes only!):
hubertf authored
1121 . endif
4f7dd97 Initial import of FreeBSD's ports makefiles.
agc authored
1122 .endif
1123
1124 ################################################################
1125 # More standard targets start here.
1126 #
1127 # These are the body of the build/install framework. If you are
1128 # not happy with the default actions, and you can't solve it by
1129 # adding pre-* or post-* targets/scripts, override these.
1130 ################################################################
1131
5f8fed8 2nd round for PKG_RESUME_TRANSFERS:
xtraeme authored
1132 ###
1133 ### _RESUME_TRANSFER:
1134 ###
1135 ### Macro to resume a previous transfer, needs to have defined
1136 ### the following options in mk.conf:
1137 ###
1138 ### PKG_RESUME_TRANSFERS
1139 ### FETCH_RESUME_ARGS (if FETCH_CMD != default)
1140 ### FETCH_OUTPUT_ARGS (if FETCH_CMD != default)
1141 ###
1142 ### For example if you want to use wget (pkgsrc/net/wget):
1143 ###