diff options
Diffstat (limited to 'ymake.cpp')
-rw-r--r-- | ymake.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -34,7 +34,11 @@ using namespace std::string_literals; namespace { void usage() { - std::cout << "Usage: ymake <target>" << std::endl; + std::cout << "Usage: ymake [<action>]" << std::endl; + std::cout << " with <action> one of:" << std::endl; + std::cout << " build (same as no action specified)" << std::endl; + std::cout << " clean" << std::endl; + std::cout << " test" << std::endl; } } @@ -55,11 +59,16 @@ int ymake(int argc, char* argv[]) exit(1); } - Builder builder(ptree); - if (action == "default"s || action == "build") { // build + if (action == "default" || action == "build") { // build + Builder builder(ptree, "build"); builder.build(); } else if (action == "clean") { + Builder builder(ptree, "*"); builder.clean(); + } else if (action == "test") { + Builder builder(ptree, "test"); + builder.build(); + builder.run_tests(); } else if (action == "install") { throw std::runtime_error("unimplemented"); } else if (action == "rebuild") { |