2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 00:52:16 +00:00

Fix version syntax checking

[SVN r35200]
This commit is contained in:
Dave Abrahams
2006-09-19 13:54:57 +00:00
parent 624e973954
commit b18cb60cf9

View File

@@ -156,9 +156,14 @@ rule init-unix ( version ? : root ? : includes ? : libraries ? : condition * )
#
if $(version)
{
if ! [ MATCH ^[0-9]+\.[0-9]+$ : $(version) : 0 ]
local v = [ MATCH ^([0-9]+\.[0-9]+)(.*)$ : $(version) : 1 2 ] ;
if ! $(v) || $(v[2])
{
ECHO "Warning: \"using python\" expects a two part (major, minor) version number; got" $(version) instead ;
if $(v)
{
version = $(v[1]) ;
}
}
debug-message looking for python $(version) ;
}