From owner-cvs-all Sat Sep 9 9:52: 7 2000 Delivered-To: cvs-all@freebsd.org Received: from ms.tokyo.jcom.ne.jp (ms.tokyo.jcom.ne.jp [210.234.123.18]) by hub.freebsd.org (Postfix) with ESMTP id 509B437B423; Sat, 9 Sep 2000 09:51:57 -0700 (PDT) Received: from daemon.local.idaemons.org (203-165-77-17.sugnm1.kt.home.ne.jp [203.165.77.17]) by ms.tokyo.jcom.ne.jp (8.9.3/3.7W 04/27/00) with ESMTP id BAA10387; Sun, 10 Sep 2000 01:51:42 +0900 (JST) Received: by daemon.local.idaemons.org (8.9.3/3.7W) id BAA89045; Sun, 10 Sep 2000 01:50:57 +0900 (JST) Date: Sun, 10 Sep 2000 01:50:55 +0900 Message-ID: <86wvglse4w.wl@archon.local.idaemons.org> From: "Akinori -Aki- MUSHA" To: Maxim Sobolev Cc: Thomas Gellekum , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/Mk bsd.python.mk In-Reply-To: In your message of "Sat, 09 Sep 2000 12:45:43 +0300" <39BA06C7.6CA18114@FreeBSD.org> References: <200009081143.EAA52948@freefall.freebsd.org> <39BA06C7.6CA18114@FreeBSD.org> User-Agent: Wanderlust/2.3.0 (Roam) EMIKO/1.13.12 (Euglena sociabilis) FLIM/1.13.2 (Kasanui) APEL/10.2 MULE XEmacs/21.1 (patch 12) (Channel Islands) (i386--freebsd) Organization: Associated I. Daemons X-PGP-Public-Key: finger knu@FreeBSD.org X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE X-PGP-Comment: I changed my key on 2000-08-10 MIME-Version: 1.0 (generated by EMIKO 1.13.12 - "Euglena sociabilis") Content-Type: text/plain; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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