summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-02-18 13:32:38 +0000
committerjlam <jlam@pkgsrc.org>2004-02-18 13:32:38 +0000
commitc40ee95964564e28bc4d27851d406f8cd0048057 (patch)
tree4a6b9245550fffa4e5469f8b4f800859f0b85289 /mk/bsd.pkg.mk
parenta59f9c214394899b3d1eb6baa2719d8eb3c61f2d (diff)
downloadpkgsrc-c40ee95964564e28bc4d27851d406f8cd0048057.tar.gz
* Move pkgsrc/mk/compiler/bsd.compiler.mk to pkgsrc/mk/compiler.mk.
Package Makefiles may now directly include compiler.mk. * Don't include compiler.mk within bsd.prefs.mk any longer. It was only included for the purposes of defining CC_VERSION. Packages that want to test the value of CC_VERSION should now first include "../../mk/compiler.mk". Any GCC_REQD statements in package Makefiles should be set before compiler.mk is included. * Simpllfy pkgsrc/mk/compiler/*.mk files as a result of not needing to be included indirectly by bsd.prefs.mk. We remove the special handling associated with detecting whether the file was included from within bsd.prefs.mk. These files are now much more straightforward to write and understand. * G/C the BSD_PREFS_MK stack mechanism as the only users (compiler/*) no longer need it. * Ensure that directories are prepended to the PATH only from within bsd.pkg.mk.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk19
1 files changed, 11 insertions, 8 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index d07b3f6539e..da9a4e751b4 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1409 2004/02/17 12:16:39 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1410 2004/02/18 13:32:38 jlam Exp $
#
# This file is in the public domain.
#
@@ -1352,15 +1352,10 @@ SCRIPTS_ENV+= CURDIR=${.CURDIR} DISTDIR=${DISTDIR} \
SCRIPTS_ENV+= BATCH=yes
.endif
-# Initialize a variable used by Makefiles to check whether to prepend
-# to the PATH.
-#
-PREPEND_PATH?= # empty
-
# Get the proper dependencies and set the PATH to use the compiler
# named in PKGSRC_COMPILER.
#
-.include "../../mk/compiler/bsd.compiler.mk"
+.include "../../mk/compiler.mk"
.if !empty(USE_BUILDLINK2:M[nN][oO]) && !empty(USE_BUILDLINK3:M[nN][oO])
NO_BUILDLINK= # defined
@@ -1375,8 +1370,16 @@ NO_BUILDLINK= # defined
.include "../../mk/tools.mk"
+_PREPENDED_TO_PATH?= # empty
+.for _dir_ in ${PREPEND_PATH}
+. if empty(_PREPENDED_TO_PATH:M${_dir_})
+_PREPENDED_TO_PATH+= ${_dir_}
+PATH:= ${_dir_}:${PATH}
+. endif
+.endfor
+
PATH_ENV+= PATH=${PATH:Q}
-PATH_ENV+= PREPEND_PATH=${PREPEND_PATH:Q}
+PATH_ENV+= _PREPENDED_TO_PATH=${_PREPENDED_TO_PATH:Q}
.MAIN: all