Opened 14 years ago

Closed 14 years ago

#2648 closed Bugs (fixed)

Re-registering an existing suffix for a type fails erroneously, patch attached

Reported by: anonymous Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost Development Trunk Severity: Problem
Keywords: type suffixes Cc:

Description

I've attached a patch against the development trunk that indicates what I believe is a problem in tools/build/v2/build/type.jam .

The comments and the code suggest that re-registering a suffix to a type should be okay. I've included a snippet from the current trunk below.

# Specifies that files with suffix from 'suffixes' be recognized as targets of
# type 'type'. Issues an error if a different type is already specified for any
# of the suffixes.
#
rule register-suffixes ( suffixes + : type )
{
    for local s in $(suffixes)
    {
        if ! $(.type.$(s))
        {
            .type.$(s) = $(type) ;
        }
        else if $(.type.$(s)) != type
        {
            errors.error Attempting to specify multiple types for suffix
                \"$(s)\" : "Old type $(.type.$(s)), New type $(type)" ;
        }
    }
}

Attachments (1)

type.jam.patch (522 bytes ) - added by anonymous 14 years ago.
patch against development trunk

Download all attachments as: .zip

Change History (3)

by anonymous, 14 years ago

Attachment: type.jam.patch added

patch against development trunk

comment:1 by anonymous, 14 years ago

Summary: Re-registering an existing suffix for a type fails erroneouslyRe-registering an existing suffix for a type fails erroneously, patch attached

comment:2 by Steven Watanabe, 14 years ago

Resolution: fixed
Status: newclosed

(In [51240]) Use $(type) instead of type. Fixes #2648

Note: See TracTickets for help on using tickets.