]> git.tdb.fi Git - builder.git/blobdiff - source/buildercli.cpp
Only use the -m flag on native arch
[builder.git] / source / buildercli.cpp
index a7dd1e23ff2402f94ab07a1b67ce85f0fb446801..c0a4f06c8f10c1b692b39c7a79798cf361a362e6 100644 (file)
@@ -346,13 +346,29 @@ void BuilderCLI::package_help()
                        IO::print(", ");
                IO::print((*i)->get_name());
        }
-       IO::print("\n\nPackage configuration:\n");
-       for(Config::OptionMap::const_iterator i=options.begin(); i!=options.end(); ++i)
+       IO::print("\n");
+
+       if(!options.empty())
        {
-               const Config::Option &opt = i->second;
-               IO::print("  %s: %s (%s)", opt.name, opt.description, opt.value);
-               if(opt.value!=opt.default_value)
-                       IO::print(" [%s]", opt.default_value);
-               IO::print("\n");
+               IO::print("\nPackage configuration:\n");
+               for(Config::OptionMap::const_iterator i=options.begin(); i!=options.end(); ++i)
+               {
+                       const Config::Option &opt = i->second;
+                       string line = format("  %s: %s (%s)", opt.name, opt.description, opt.value);
+                       if(!opt.choices.empty())
+                       {
+                               line += " {";
+                               for(list<string>::const_iterator j=opt.choices.begin(); j!=opt.choices.end(); ++j)
+                               {
+                                       if(j!=opt.choices.begin())
+                                               line += ' ';
+                                       line += *j;
+                               }
+                               line += '}';
+                       }
+                       else if(opt.value!=opt.default_value)
+                               line += format(" [%s]", opt.default_value);
+                       IO::print("%s\n", line);
+               }
        }
 }