diff options
author | tv <tv> | 1999-05-23 22:10:01 +0000 |
---|---|---|
committer | tv <tv> | 1999-05-23 22:10:01 +0000 |
commit | e99917689c2084d90ad46a3a85f1c0fddaab1f74 (patch) | |
tree | ce66b8306a9527bcc2d12799d27ea9e18e43a916 | |
parent | daac70d90b39474b81dc7a2107de798424768ed7 (diff) | |
download | pkgsrc-e99917689c2084d90ad46a3a85f1c0fddaab1f74.tar.gz |
- Move the inclusion of bsd.own.mk to bsd.prefs.mk, and multiple-include
protect bsd.prefs.mk. Now there's no multiple inclusion of mk.conf,
clobbering variables modified between bsd.prefs.mk and bsd.pkg.mk, when
set with VARNAME=value.
- Let bsd.own.mk include mk.conf/MAKECONF; we don't need to do that
manually.
- Don't define BSD_PKG_MK or OPSYS in bsd.pkg.mk, as bsd.prefs.mk does
precisely that just a couple lines below.
-rw-r--r-- | mk/bsd.pkg.mk | 30 | ||||
-rw-r--r-- | mk/bsd.prefs.mk | 28 |
2 files changed, 23 insertions, 35 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index a8410fdfd73..e7f0cb9ab23 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.270 1999/05/22 15:47:23 tv Exp $ +# $NetBSD: bsd.pkg.mk,v 1.271 1999/05/23 22:10:01 tv Exp $ # # This file is in the public domain. # @@ -17,16 +17,7 @@ # NEVER override the "regular" targets unless you want to open # a major can of worms. -# Let people know this is bsd.pkg.mk, so they can set up their -# /etc/mk.conf accordingly -BSD_PKG_MK=1 - -# Get the operating system type -.ifndef OPSYS -OPSYS!= /usr/bin/uname -s -.endif - -# Include any preferences, if not already included +# Include any preferences, if not already included, and common definitions .include "../../mk/bsd.prefs.mk" .if defined(ONLY_FOR_ARCHS) @@ -270,23 +261,6 @@ MTREE_CMD?= /usr/sbin/mtree .endif MTREE_ARGS?= -U -f ${MTREE_FILE} -d -e -p -.if (${OPSYS} == "NetBSD") -NEED_OWN_INSTALL_TARGET= no -.include <bsd.own.mk> -SHAREOWN = ${DOCOWN} -SHAREGRP = ${DOCGRP} -SHAREMODE = ${DOCMODE} -.elif (${OPSYS} == "SunOS") -NEED_OWN_INSTALL_TARGET= no -.include <bsd.own.mk> -SHAREOWN = ${DOCOWN} -SHAREGRP = ${DOCGRP} -SHAREMODE = ${DOCMODE} -.elif (${OPSYS} == "OpenBSD") -.include <bsd.own.mk> -MAKE_ENV+= EXTRA_SYS_MK_INCLUDES="<bsd.own.mk>" -.endif - # Debugging levels for this file, dependent on PKG_DEBUG_LEVEL definition # 0 == normal, default, quiet operation # 1 == all shell commands echoed before invocation diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 2017e9e2bae..fe9587eb949 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,10 +1,13 @@ -# $NetBSD: bsd.prefs.mk,v 1.4 1998/11/26 23:39:15 hubertf Exp $ +# $NetBSD: bsd.prefs.mk,v 1.5 1999/05/23 22:10:01 tv Exp $ # # Make file, included to get the site preferences, if any. Should # only be included by package Makefiles before any .if defined() # statements, to make sure any variables defined in /etc/mk.conf or # $MAKECONF are used. +# Do not recursively include mk.conf, redefine OPSYS, include bsd.own.mk, etc. +.ifndef BSD_PKG_MK + # Let people know this is bsd.pkg.mk, so they can set up their # /etc/mk.conf accordingly BSD_PKG_MK=1 @@ -16,12 +19,21 @@ OPSYS!= /usr/bin/uname -s # Don't complain about environment settings on recursive makes. __PREFIX_SET__=${PREFIX} -.if defined(MAKECONF) && exists(${MAKECONF}) -.include "${MAKECONF}" -.elif ${OPSYS} == "FreeBSD" && exists(/etc/make.conf) -.include "/etc/make.conf" -.elif exists(/etc/mk.conf) -.include "/etc/mk.conf" +.if (${OPSYS} == "NetBSD") +NEED_OWN_INSTALL_TARGET= no +.include <bsd.own.mk> +SHAREOWN = ${DOCOWN} +SHAREGRP = ${DOCGRP} +SHAREMODE = ${DOCMODE} +.elif (${OPSYS} == "SunOS") +NEED_OWN_INSTALL_TARGET= no +.include <bsd.own.mk> +SHAREOWN = ${DOCOWN} +SHAREGRP = ${DOCGRP} +SHAREMODE = ${DOCMODE} +.elif (${OPSYS} == "OpenBSD") +.include <bsd.own.mk> +MAKE_ENV+= EXTRA_SYS_MK_INCLUDES="<bsd.own.mk>" .endif .if defined(PREFIX) && (${PREFIX} != ${__PREFIX_SET__}) @@ -30,3 +42,5 @@ __PREFIX_SET__=${PREFIX} @${ECHO_MSG} "depending on your needs. See the pkg system documentation for more info." @${FALSE} .endif + +.endif |