diff options
author | jlam <jlam> | 2002-10-19 20:33:59 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-10-19 20:33:59 +0000 |
commit | d4c62532a3804607a56dce426bedfd03f0d6c0d2 (patch) | |
tree | 5f1fc01ded712a7ca80cc9617578b6ca38bb0c92 /mk | |
parent | f3bef8c49c6596340659f1960cc43e4173e97d0d (diff) | |
download | pkgsrc-d4c62532a3804607a56dce426bedfd03f0d6c0d2.tar.gz |
Move some variable definitions from bsd.pkg.mk to bsd.prefs.mk so that
they may be used in conditional statements in *.mk files before bsd.pkg.mk
is included.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 34 | ||||
-rw-r--r-- | mk/bsd.prefs.mk | 38 |
2 files changed, 38 insertions, 34 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index aad762753c8..c0437cf5bcc 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1067 2002/10/13 09:38:58 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1068 2002/10/19 20:33:59 jlam Exp $ # # This file is in the public domain. # @@ -47,21 +47,11 @@ CHECK_SHLIBS?= YES # run check-shlibs after install SHLIB_HANDLING?= YES # do automatic shared lib handling NOCLEAN?= NO # don't clean up after update -_PKGSRCDIR?= ${.CURDIR:C|/[^/]*/[^/]*$||} -PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|} PKGBASE?= ${PKGNAME:C/-[^-]*$//} PKGVERSION?= ${PKGNAME:C/^.*-//} PKGWILDCARD?= ${PKGBASE}-[0-9]* -DISTDIR?= ${_PKGSRCDIR}/distfiles _DISTDIR?= ${DISTDIR}/${DIST_SUBDIR} -PACKAGES?= ${_PKGSRCDIR}/packages -TEMPLATES?= ${_PKGSRCDIR}/templates - -PATCHDIR?= ${.CURDIR}/patches -SCRIPTDIR?= ${.CURDIR}/scripts -FILESDIR?= ${.CURDIR}/files -PKGDIR?= ${.CURDIR} INTERACTIVE_STAGE?= none @@ -484,28 +474,6 @@ _PKG_DEBUG= set -x; _PKG_DEBUG_SCRIPT= ${SH} -x .endif -# If WRKOBJDIR is set, use that tree to build -.ifdef WRKOBJDIR -BUILD_DIR?= ${WRKOBJDIR}/${PKGPATH} -.else -BUILD_DIR?= ${.CURDIR} -.endif # WRKOBJDIR - -# If OBJHOSTNAME is set, use first component of hostname in directory name -# If OBJMACHINE is set, use ${MACHINE_ARCH} in the working directory name -.if defined(OBJHOSTNAME) -. if !defined(_HOSTNAME) -_HOSTNAME!= ${UNAME} -n -MAKEFLAGS+= _HOSTNAME=${_HOSTNAME} -. endif -WRKDIR_BASENAME?= work.${_HOSTNAME:C|\..*||} -.elif defined(OBJMACHINE) -WRKDIR_BASENAME?= work.${MACHINE_ARCH} -.else -WRKDIR_BASENAME?= work -.endif - -WRKDIR?= ${BUILD_DIR}/${WRKDIR_BASENAME} WRKSRC?= ${WRKDIR}/${DISTNAME} .if defined(NO_WRKSUBDIR) diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index d3d019779e2..5217a18c738 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.81 2002/10/12 20:25:49 bouyer Exp $ +# $NetBSD: bsd.prefs.mk,v 1.82 2002/10/19 20:33:59 jlam Exp $ # # Make file, included to get the site preferences, if any. Should # only be included by package Makefiles before any .if defined() @@ -346,6 +346,42 @@ ZOULARIS_VERSION= 20000522 MAKEFLAGS+= ZOULARIS_VERSION="${ZOULARIS_VERSION}" .endif +_PKGSRCDIR?= ${.CURDIR:C|/[^/]*/[^/]*$||} +PKGPATH?= ${.CURDIR:C|.*/([^/]*/[^/]*)$|\1|} + +DISTDIR?= ${_PKGSRCDIR}/distfiles +PACKAGES?= ${_PKGSRCDIR}/packages +TEMPLATES?= ${_PKGSRCDIR}/templates + +PATCHDIR?= ${.CURDIR}/patches +SCRIPTDIR?= ${.CURDIR}/scripts +FILESDIR?= ${.CURDIR}/files +PKGDIR?= ${.CURDIR} + +# If WRKOBJDIR is set, use that tree to build +.ifdef WRKOBJDIR +BUILD_DIR?= ${WRKOBJDIR}/${PKGPATH} +.else +BUILD_DIR?= ${.CURDIR} +.endif # WRKOBJDIR + +# If OBJHOSTNAME is set, use first component of hostname in directory name. +# If OBJMACHINE is set, use ${MACHINE_ARCH} in the working directory name. +# +.if defined(OBJHOSTNAME) +. if !defined(_HOSTNAME) +_HOSTNAME!= ${UNAME} -n +MAKEFLAGS+= _HOSTNAME=${_HOSTNAME} +. endif +WRKDIR_BASENAME?= work.${_HOSTNAME:C|\..*||} +.elif defined(OBJMACHINE) +WRKDIR_BASENAME?= work.${MACHINE_ARCH} +.else +WRKDIR_BASENAME?= work +.endif + +WRKDIR?= ${BUILD_DIR}/${WRKDIR_BASENAME} + .ifdef BSD_PREFS_MK .undef BSD_PREFS_MK .endif |