summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>1998-08-11 19:30:48 +0000
committertv <tv@pkgsrc.org>1998-08-11 19:30:48 +0000
commit985a1a266ccff20e3296b1c451b2959c44b8afc3 (patch)
tree8d3ac3ec221a84a40ff881347297fa2f73f2e947
parent4fe41e871fd87da46650b7d3c1f24f21bc89ffb9 (diff)
downloadpkgsrc-985a1a266ccff20e3296b1c451b2959c44b8afc3.tar.gz
- Introduce CROSSBASE and a USE_CROSSBASE option, for use with pkgs from
the "cross" subdirectory. Defaults to ${LOCALBASE}/cross. - PREFIX is not user settable. Do not conditionally set it such that environment variables and mk.conf can override it. Issue an error if PREFIX is attempted to be set from mk.conf, environment, or command line.
-rw-r--r--mk/bsd.pkg.mk11
-rw-r--r--mk/bsd.prefs.mk8
2 files changed, 14 insertions, 5 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 5b86d97a584..f65742fe918 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.141 1998/08/07 12:30:29 agc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.142 1998/08/11 19:30:48 tv Exp $
#
# This file is in the public domain.
#
@@ -61,6 +61,7 @@ LOCALBASE?= ${DESTDIR}/usr/pkg
LOCALBASE?= ${DESTDIR}/usr/local
.endif
X11BASE?= ${DESTDIR}/usr/X11R6
+CROSSBASE?= ${LOCALBASE}/cross
PKGSRCDIR= ${.CURDIR}/../..
DISTDIR?= ${PKGSRCDIR}/distfiles
@@ -110,13 +111,15 @@ PKGDIR?= ${.CURDIR}/pkg
.if defined(USE_IMAKE) || defined(USE_MOTIF) || defined(USE_X11)
.if defined(USE_LOCALBASE_FOR_X11)
-PREFIX?= ${LOCALBASE}
+PREFIX= ${LOCALBASE}
BUILD_DEPENDS+= ${X11BASE}/lib/X11/config/xpkgwedge.def:../../x11/xpkgwedge
.else
-PREFIX?= ${X11BASE}
+PREFIX= ${X11BASE}
.endif
+.elif defined(USE_CROSSBASE)
+PREFIX= ${CROSSBASE}
.else
-PREFIX?= ${LOCALBASE}
+PREFIX= ${LOCALBASE}
.endif
.if defined(USE_GMAKE)
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 064d6ba3fd3..9331773127d 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.1 1998/06/03 11:15:29 agc Exp $
+# $NetBSD: bsd.prefs.mk,v 1.2 1998/08/11 19:30:48 tv Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -17,3 +17,9 @@ OPSYS!= /usr/bin/uname -s
.include "/etc/mk.conf"
.endif
+.if defined(PREFIX)
+.BEGIN:
+ @${ECHO_MSG} "You can NOT set PREFIX manually or in mk.conf. Set LOCALBASE or X11BASE"
+ @${ECHO_MSG} "depending on your needs. See the pkg system documentation for more info."
+ @${FALSE}
+.endif