diff options
author | jlam <jlam@pkgsrc.org> | 2004-02-06 04:37:02 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-02-06 04:37:02 +0000 |
commit | d72bb0e381ac340e9822b3b8a4a2d4a4f6df46f6 (patch) | |
tree | f6ef70f7dd739d99171898ff7944f83d524e3f1e /mk/bsd.prefs.mk | |
parent | fd4c71ddde3378e0d549a90a5a311d8243a37f6e (diff) | |
download | pkgsrc-d72bb0e381ac340e9822b3b8a4a2d4a4f6df46f6.tar.gz |
Hiding the PATH from certain phases of the build only accidentally worked
due to a type on gcc.mk that causes the ${_GCC_PREFIX}/bin to always be
prepended to the PATH. The problem that was hiding was "make" resolving
to ${TOOLS_DIR}/bin/make if the package used GNU make, which broke
building since the package Makefile is a BSD Makefile and we passed
PATH to some phases of the build. Fix this by expanding MAKE to the
full path to ${MAKE} in bsd.prefs.mk. We also garbage collect the now
useless checks for PHASES_AFTER_BUILDLINK that cluttered the PREPEND_PATH
code.
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r-- | mk/bsd.prefs.mk | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 9b941a2e53d..3dfdbda988d 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.148 2004/02/05 03:39:17 jlam Exp $ +# $NetBSD: bsd.prefs.mk,v 1.149 2004/02/06 04:37:02 jlam Exp $ # # Make file, included to get the site preferences, if any. Should # only be included by package Makefiles before any .if defined() @@ -18,6 +18,22 @@ BSD_PREFS_MK:= ${BSD_PREFS_MK}+ BSD_PKG_MK=1 __PREFIX_SET__:=${PREFIX} +# Expand MAKE to a full path. +.if !defined(_MAKE) +_MAKE:= ${MAKE} +. for _dir_ in ${PATH:C/\:/ /g} +. if empty(_MAKE:M/*) +. if exists(${_dir_}/${MAKE}) +_MAKE:= ${_dir_}/${MAKE} +. endif +. endif +. endfor +. if !empty(_MAKE:M/*) +MAKEFLAGS+= _MAKE="${_MAKE}" +. endif +.endif +MAKE:= ${_MAKE} + .if exists(/usr/bin/uname) UNAME=/usr/bin/uname .elif exists(/bin/uname) |