]> git.tdb.fi Git - builder.git/blobdiff - source/architecture.cpp
Resolve cmdline targets and what-ifs the same way
[builder.git] / source / architecture.cpp
index fd31bcdbfd942a9ad05146d73e7dbb73fcecc38b..7faefeb456f3953548084782c63079fc466a59fc 100644 (file)
@@ -124,16 +124,17 @@ Architecture::Architecture(Builder &b, const string &spec):
 
 bool Architecture::match_name(const string &pattern) const
 {
-       vector<string> parts = split(pattern, "-");
+       bool negate = (pattern[0]=='!');
+       vector<string> parts = split(pattern.substr(negate), "-");
        for(vector<string>::const_iterator i=parts.begin(); i!=parts.end(); ++i)
        {
                string part = resolve_alias(*i);
                if((part=="32" && bits==32) || (part=="64" && bits==64))
                        ;
                else if(part!=type && part!=cpu && part!=system)
-                       return false;
+                       return negate;
        }
-       return true;
+       return !negate;
 }
 
 string Architecture::resolve_alias(const string &part) const