| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: djbware.mk,v 1.27 2020/03/20 19:40:39 rillig Exp $ | | 1 | # $NetBSD: djbware.mk,v 1.28 2020/05/02 11:43:09 rillig Exp $ |
2 | # | | 2 | # |
3 | # Makefile fragment for packages with djb-style build machinery | | 3 | # Makefile fragment for packages with djb-style build machinery |
4 | # | | 4 | # |
5 | # Common functions provided: | | 5 | # Common functions provided: |
6 | # * a boilerplate RESTRICTED clause | | 6 | # * a boilerplate RESTRICTED clause |
7 | # * typical defaults for BUILD_TARGET and INSTALL_TARGET | | 7 | # * typical defaults for BUILD_TARGET and INSTALL_TARGET |
8 | # * typical values for conf-* files | | 8 | # * typical values for conf-* files |
9 | # * replace inline definitions of errno with "#include <errno.h>" | | 9 | # * replace inline definitions of errno with "#include <errno.h>" |
10 | # | | 10 | # |
11 | # TODO: | | 11 | # TODO: |
12 | # * centralize handling of third-party manpages | | 12 | # * centralize handling of third-party manpages |
13 | # * centralize MASTER_SITES and SITES_foo | | 13 | # * centralize MASTER_SITES and SITES_foo |
14 | # * centralize compiler hack for arm{,32} | | 14 | # * centralize compiler hack for arm{,32} |
| @@ -79,34 +79,34 @@ do-configure: | | | @@ -79,34 +79,34 @@ do-configure: |
79 | .endif | | 79 | .endif |
80 | | | 80 | |
81 | .if !target(do-build) && !empty(DJB_SLASHPACKAGE:M[yY][eE][sS]) | | 81 | .if !target(do-build) && !empty(DJB_SLASHPACKAGE:M[yY][eE][sS]) |
82 | do-build: | | 82 | do-build: |
83 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} package/compile ${DJB_BUILD_ARGS} | | 83 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} package/compile ${DJB_BUILD_ARGS} |
84 | .endif | | 84 | .endif |
85 | | | 85 | |
86 | .if !empty(DJB_ERRNO_HACK:M[yY][eE][sS]) | | 86 | .if !empty(DJB_ERRNO_HACK:M[yY][eE][sS]) |
87 | PKG_SUPPORTED_OPTIONS+= djbware-errno-hack | | 87 | PKG_SUPPORTED_OPTIONS+= djbware-errno-hack |
88 | PKG_SUGGESTED_OPTIONS+= djbware-errno-hack | | 88 | PKG_SUGGESTED_OPTIONS+= djbware-errno-hack |
89 | | | 89 | |
90 | .include "bsd.fast.prefs.mk" | | 90 | .include "bsd.fast.prefs.mk" |
91 | | | 91 | |
92 | .if exists(${PKGDIR}/options.mk) | | 92 | . if exists(${PKGDIR}/options.mk) |
93 | . include "${PKGDIR}/options.mk" | | 93 | . include "${PKGDIR}/options.mk" |
94 | .else | | 94 | . else |
95 | # Note: This expression is the same as ${PKGBASE}, but the latter is | | 95 | # Note: This expression is the same as ${PKGBASE}, but the latter is |
96 | # not defined yet, so we cannot use it here. | | 96 | # not defined yet, so we cannot use it here. |
97 | PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//} | | 97 | PKG_OPTIONS_VAR= PKG_OPTIONS.${PKGNAME:C/-[0-9].*//} |
98 | .include "bsd.options.mk" | | 98 | . include "bsd.options.mk" |
99 | .endif | | 99 | . endif |
100 | | | 100 | |
101 | .if !empty(PKG_OPTIONS:Mdjbware-errno-hack) | | 101 | . if !empty(PKG_OPTIONS:Mdjbware-errno-hack) |
102 | SUBST_CLASSES+= djbware | | 102 | SUBST_CLASSES+= djbware |
103 | SUBST_STAGE.djbware= do-configure | | 103 | SUBST_STAGE.djbware= do-configure |
104 | SUBST_FILES.djbware+= error.h | | 104 | SUBST_FILES.djbware+= error.h |
105 | SUBST_SED.djbware= -e 's|^extern\ int\ errno\;|\#include \<errno.h\>|' | | 105 | SUBST_SED.djbware= -e 's|^extern\ int\ errno\;|\#include \<errno.h\>|' |
106 | SUBST_MESSAGE.djbware= Correcting definition of errno. | | 106 | SUBST_MESSAGE.djbware= Correcting definition of errno. |
107 | .endif | | 107 | . endif |
108 | .else | | 108 | .else |
109 | .sinclude "${PKGDIR}/options.mk" | | 109 | . sinclude "${PKGDIR}/options.mk" |
110 | .endif | | 110 | .endif |
111 | | | 111 | |
112 | .endif # DJBWARE_MK | | 112 | .endif # DJBWARE_MK |