From b1448e9df82a096fceb9a2a661a907b361eb9010 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 23 May 2008 12:31:24 +0000 Subject: PKGNAME_NOREV is used to define the DIST_SUBDIR in some places, so ensure it is defined with the rest of the PKGNAME_* variables before including the phase variable files. --- mk/bsd.pkg.mk | 50 +++++++++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 19 deletions(-) (limited to 'mk') diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 17f9b0d6131..24c934b1cdf 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1943 2008/05/22 16:27:22 joerg Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1944 2008/05/23 12:31:24 joerg Exp $ # # This file is in the public domain. # @@ -21,6 +21,36 @@ .include "misc/common.mk" +############################################################################ +# Transform package Makefile variables and set defaults +# This is the early set used directly or indirectly in +# the phase variables. +############################################################################ + +##### PKGBASE, PKGNAME[_NOREV], PKGVERSION + +PKGBASE?= ${PKGNAME:C/-[^-]*$//} +PKGVERSION?= ${PKGNAME:C/^.*-//} +PKGVERSION?= ${PKGNAME:C/^.*-//} +.if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0") +. if defined(PKGNAME) +PKGNAME_NOREV:= ${PKGNAME} +PKGNAME:= ${PKGNAME}nb${PKGREVISION} +. else +PKGNAME?= ${DISTNAME}nb${PKGREVISION} +PKGNAME_NOREV= ${DISTNAME} +. endif +.else +PKGNAME?= ${DISTNAME} +PKGNAME_NOREV= ${PKGNAME} +.endif +PKGVERSION_NOREV= ${PKGNAME_NOREV:C/^.*-//} + +#### + +############################################################################ +# Allow various phases to define the default variables +############################################################################ .if defined(EMUL_PLATFORMS) && !empty(EMUL_PLATFORMS) . include "emulator/emulator.mk" .endif @@ -57,24 +87,6 @@ LICENSE= ${LICENCE} ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES} .endif -##### PKGBASE, PKGNAME[_NOREV], PKGVERSION - -PKGBASE?= ${PKGNAME:C/-[^-]*$//} -PKGVERSION?= ${PKGNAME:C/^.*-//} -PKGVERSION?= ${PKGNAME:C/^.*-//} -.if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0") -. if defined(PKGNAME) -PKGNAME_NOREV:= ${PKGNAME} -PKGNAME:= ${PKGNAME}nb${PKGREVISION} -. else -PKGNAME?= ${DISTNAME}nb${PKGREVISION} -PKGNAME_NOREV= ${DISTNAME} -. endif -.else -PKGNAME?= ${DISTNAME} -PKGNAME_NOREV= ${PKGNAME} -.endif -PKGVERSION_NOREV= ${PKGNAME_NOREV:C/^.*-//} # A meta-package is a package that does not have any files and whose # only purpose is to depend on other packages, giving that collection -- cgit v1.2.3