| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: gmake.mk,v 1.3 2013/06/12 20:37:43 riastradh Exp $ | | 1 | # $NetBSD: gmake.mk,v 1.4 2014/01/15 06:53:06 ryoon Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. | | 3 | # Copyright (c) 2005 The NetBSD Foundation, Inc. |
4 | # All rights reserved. | | 4 | # All rights reserved. |
5 | # | | 5 | # |
6 | # This code is derived from software contributed to The NetBSD Foundation | | 6 | # This code is derived from software contributed to The NetBSD Foundation |
7 | # by Johnny C. Lam. | | 7 | # by Johnny C. Lam. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -54,21 +54,28 @@ _TOOLS_USE_PKGSRC.gmake= no | | | @@ -54,21 +54,28 @@ _TOOLS_USE_PKGSRC.gmake= no |
54 | . if !empty(_TOOLS_USE_PKGSRC.gmake:M[nN][oO]) | | 54 | . if !empty(_TOOLS_USE_PKGSRC.gmake:M[nN][oO]) |
55 | _TOOLS_USE_PKGSRC.gmake!= \ | | 55 | _TOOLS_USE_PKGSRC.gmake!= \ |
56 | if ${PKG_ADMIN} pmatch ${_dep_:Q} ${_TOOLS_PKG.gmake:Q}; then \ | | 56 | if ${PKG_ADMIN} pmatch ${_dep_:Q} ${_TOOLS_PKG.gmake:Q}; then \ |
57 | ${ECHO} no; \ | | 57 | ${ECHO} no; \ |
58 | else \ | | 58 | else \ |
59 | ${ECHO} yes; \ | | 59 | ${ECHO} yes; \ |
60 | fi | | 60 | fi |
61 | . endif | | 61 | . endif |
62 | . endfor | | 62 | . endfor |
63 | . endif | | 63 | . endif |
64 | MAKEVARS+= _TOOLS_USE_PKGSRC.gmake | | 64 | MAKEVARS+= _TOOLS_USE_PKGSRC.gmake |
65 | .endif | | 65 | .endif |
66 | | | 66 | |
| | | 67 | .if defined(_TOOLS_USE_PKGSRC.gmake) && !empty(_TOOLS_USE_PKGSRC.gmake) |
| | | 68 | . if !empty(_TOOLS_USE_PKGSRC.gmake:M[yY][eE][sS]) |
| | | 69 | TOOLS_FIND_PREFIX+= GMAKEDIR=gmake |
| | | 70 | TOOLS_PLATFORM.gmake= ${GMAKEDIR}/bin/gmake |
| | | 71 | . endif |
| | | 72 | .endif |
| | | 73 | |
67 | # XXX Kludge to prevent pkgsrc's internal variable TARGET_ARCH for | | 74 | # XXX Kludge to prevent pkgsrc's internal variable TARGET_ARCH for |
68 | # cross-compilation from leaking into gmake's environment, where it | | 75 | # cross-compilation from leaking into gmake's environment, where it |
69 | # will break the default rules. Remove either when we start using | | 76 | # will break the default rules. Remove either when we start using |
70 | # `env -i' for the build phase or when we replace TARGET_ARCH by | | 77 | # `env -i' for the build phase or when we replace TARGET_ARCH by |
71 | # TARGET_MACHINE_PLATFORM. | | 78 | # TARGET_MACHINE_PLATFORM. |
72 | .if defined(TARGET_ARCH) | | 79 | .if defined(TARGET_ARCH) |
73 | MAKE_ENV+= TARGET_ARCH= | | 80 | MAKE_ENV+= TARGET_ARCH= |
74 | .endif | | 81 | .endif |