Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Sep 2000 01:50:55 +0900
From:      "Akinori -Aki- MUSHA" <knu@idaemons.org>
To:        Maxim Sobolev <sobomax@FreeBSD.org>
Cc:        Thomas Gellekum <tg@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: ports/Mk bsd.python.mk
Message-ID:  <86wvglse4w.wl@archon.local.idaemons.org>
In-Reply-To: In your message of "Sat, 09 Sep 2000 12:45:43 %2B0300" <39BA06C7.6CA18114@FreeBSD.org>
References:  <200009081143.EAA52948@freefall.freebsd.org> <39BA06C7.6CA18114@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At Sat, 09 Sep 2000 12:45:43 +0300,
sobomax wrote:
> Great, however I want to suggest that the PYTHON_VERSION variable to be a
> normal numeric value like 150, 160, 200, 201 etc. instead of current mix of
> numbers, word `python' and dots in between. The reason for that is simple: if
> some features have been included in some version, say 1.6, then most likely
> that those features will be carried forward into all consequient versions. This
> should allow for simple comparisons like
> 
> .if ${PYTHON_VERSION} > 123
> FOO
> .else
> BAR
> .endif
> 
> instead of current
> 
> if ${PYTHON_VERSION) == "python1.2"
> FOO
> .elif ${PYTHON_VERSION} == "pyhon1.3"
> BAR
> .elif etc. etc.
> 
> -Maxim

I'd suggest introducing PYTHON_VER as follows:

	PYTHON_VER=	${PYTHON_VERSION:R}

so you can simply check the version like this:

	.if ${PYTHON_VER} >= 1.6
	FOO
	.else
	.BAR
	.endif


FYI, bsd.port.mk defines PERL_VER, and bsd.ruby.mk defines RUBY_VER,
that can be used for that purpose.

-- 
                           /
                          /__  __       
                         / )  )  ) )  /
Akinori -Aki- MUSHA aka / (_ /  ( (__(  @ idaemons.org / FreeBSD.org

"We're only at home when we're on the run, on the wing, on the fly"


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wvglse4w.wl>