;
VERSION = $(_VERSION_:J=$(.)) ;
RELEASE = 1 ;
LICENSE = LICENSE_1_0 ;

# Generate development debug binaries?
if --debug in $(ARGV)
{
    debug = true ;
}

if --profile in $(ARGV)
{
    profile = true ;
}

# Attempt to generate and/or build the grammar?
if --grammar in $(ARGV)
{
    grammar = true ;
}

# Do we need to add a default build type argument?
if ! ( --release in $(ARGV) ) &&
   ! ( --debug in $(ARGV) ) &&
   ! ( --profile in $(ARGV) )
{
    ARGV += --release ;
}

# Enable, and configure, Python hooks.
with-python = ;
python-location = [ MATCH --with-python=(.*) : $(ARGV) ] ;
if $(python-location)
{
    with-python = true ;
}
if $(with-python)
{
    if $(OS) = NT
    {
        --python-include = [ .path $(python-location) include ] ;
        --python-lib = ;
        for local v in 27 26 25 24 23 22
        {
            --python-lib ?=
                [ GLOB [ .path $(python-location) libs ] : "python$(v).lib" ]
                [ GLOB $(python-location) [ .path $(python-location) libs ]
                    $(Path) $(PATH) $(path) : "python$(v).dll" ]
                ;
            if ! $(--python-lib[2])
            {
                --python-lib = ;
            }
        }
        --python-lib = $(--python-lib[1]) ;
    }
    else if $(OS) = MACOSX
    {
        --python-include = [ .path $(python-location) Headers ] ;
        --python-lib = $(python-location) Python ;
    }
    else
    {
        --python-include = ;
        --python-lib = ;
        for local v in 2.7 2.6 2.5 2.4 2.3 2.2
        {
            local inc = [ GLOB [ .path $(python-location) include ] : python$(v) ] ;
            local lib = [ GLOB [ .path $(python-location) lib ] : libpython$(v)* ] ;
            if $(inc) && $(lib)
            {
                --python-include ?= $(inc) ;
                --python-lib ?= $(lib[1]:D) python$(v) ;
            }
        }
    }
}

if $(--python-include) || $(--python-lib)
{
    ECHO "Python includes: $(--python-include:J=)" ;
    ECHO "Python includes: $(--python-lib:J=)" ;
}

# Boehm GC?
i