| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: bsd.prefs.mk,v 1.293 2009/05/19 09:33:53 wiz Exp $ | | 1 | # $NetBSD: bsd.prefs.mk,v 1.294 2009/05/23 23:48:44 joerg Exp $ |
2 | # | | 2 | # |
3 | # This file includes the mk.conf file, which contains the user settings. | | 3 | # This file includes the mk.conf file, which contains the user settings. |
4 | # | | 4 | # |
5 | # Packages should include this file before any of the .if directives, as | | 5 | # Packages should include this file before any of the .if directives, as |
6 | # well as before modifying variables like CFLAGS, LDFLAGS, and so on. | | 6 | # well as before modifying variables like CFLAGS, LDFLAGS, and so on. |
7 | # Otherwise the behavior may be unexpected. | | 7 | # Otherwise the behavior may be unexpected. |
8 | # | | 8 | # |
9 | # When mk.conf is included by this file, the following variables are | | 9 | # When mk.conf is included by this file, the following variables are |
10 | # defined: | | 10 | # defined: |
11 | # | | 11 | # |
12 | # ACCEPTABLE_LICENSES | | 12 | # ACCEPTABLE_LICENSES |
13 | # This variable is set to the list of Open Source licenses. See | | 13 | # This variable is set to the list of Open Source licenses. See |
14 | # mk/license.mk for details. | | 14 | # mk/license.mk for details. |
| @@ -389,26 +389,30 @@ USE_DESTDIR:= yes | | | @@ -389,26 +389,30 @@ USE_DESTDIR:= yes |
389 | .if empty(PKG_DESTDIR_SUPPORT) || empty(USE_DESTDIR:M[Yy][Ee][Ss]) | | 389 | .if empty(PKG_DESTDIR_SUPPORT) || empty(USE_DESTDIR:M[Yy][Ee][Ss]) |
390 | . if empty(USE_DESTDIR:M[Yy][Ee][Ss]) && empty(USE_DESTDIR:M[Nn][Oo]) | | 390 | . if empty(USE_DESTDIR:M[Yy][Ee][Ss]) && empty(USE_DESTDIR:M[Nn][Oo]) |
391 | PKG_FAIL_REASON+= "USE_DESTDIR must be either \`\`yes'' or \`\`no''" | | 391 | PKG_FAIL_REASON+= "USE_DESTDIR must be either \`\`yes'' or \`\`no''" |
392 | . endif | | 392 | . endif |
393 | _USE_DESTDIR= no | | 393 | _USE_DESTDIR= no |
394 | .elif ${PKG_DESTDIR_SUPPORT} == "user-destdir" | | 394 | .elif ${PKG_DESTDIR_SUPPORT} == "user-destdir" |
395 | _USE_DESTDIR= user-destdir | | 395 | _USE_DESTDIR= user-destdir |
396 | .elif ${PKG_DESTDIR_SUPPORT} == "destdir" | | 396 | .elif ${PKG_DESTDIR_SUPPORT} == "destdir" |
397 | _USE_DESTDIR= destdir | | 397 | _USE_DESTDIR= destdir |
398 | .else | | 398 | .else |
399 | PKG_FAIL_REASON+= "PKG_DESTDIR_SUPPORT must be \`\`destdir'' or \`\`user-destdir''." | | 399 | PKG_FAIL_REASON+= "PKG_DESTDIR_SUPPORT must be \`\`destdir'' or \`\`user-destdir''." |
400 | .endif | | 400 | .endif |
401 | | | 401 | |
| | | 402 | .if defined(PKG_DEVELOPER) && empty(PKG_DESTDIR_SUPPORT) |
| | | 403 | WARNINGS+= "[bsd.prefs.mk] The package ${PKGNAME} misses DESTDIR support." |
| | | 404 | .endif |
| | | 405 | |
402 | # When using staged installation, everything gets installed into | | 406 | # When using staged installation, everything gets installed into |
403 | # ${DESTDIR}${PREFIX} instead of ${PREFIX} directly. | | 407 | # ${DESTDIR}${PREFIX} instead of ${PREFIX} directly. |
404 | # | | 408 | # |
405 | .if ${_USE_DESTDIR} != "no" | | 409 | .if ${_USE_DESTDIR} != "no" |
406 | DESTDIR= ${WRKDIR}/.destdir | | 410 | DESTDIR= ${WRKDIR}/.destdir |
407 | . if ${_USE_DESTDIR} == "destdir" | | 411 | . if ${_USE_DESTDIR} == "destdir" |
408 | _MAKE_PACKAGE_AS_ROOT= yes | | 412 | _MAKE_PACKAGE_AS_ROOT= yes |
409 | _MAKE_CLEAN_AS_ROOT= yes | | 413 | _MAKE_CLEAN_AS_ROOT= yes |
410 | _MAKE_INSTALL_AS_ROOT= yes | | 414 | _MAKE_INSTALL_AS_ROOT= yes |
411 | . elif ${_USE_DESTDIR} == "user-destdir" | | 415 | . elif ${_USE_DESTDIR} == "user-destdir" |
412 | _MAKE_PACKAGE_AS_ROOT= no | | 416 | _MAKE_PACKAGE_AS_ROOT= no |
413 | _MAKE_CLEAN_AS_ROOT= no | | 417 | _MAKE_CLEAN_AS_ROOT= no |
414 | _MAKE_INSTALL_AS_ROOT= no | | 418 | _MAKE_INSTALL_AS_ROOT= no |