diff options
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 616de81..86c9a59 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -410,17 +410,23 @@ int CmdClean(State* state, int argc, char* argv[], const BuildConfig& config) { optind = 1; int opt; - while ((opt = getopt(argc, argv, const_cast<char*>("gr"))) != -1) { + while ((opt = getopt(argc, argv, const_cast<char*>("hgr"))) != -1) { switch (opt) { - case 'g': - generator = true; - break; - case 'r': - clean_rules = true; - break; - default: - Usage(config); - return 1; + case 'g': + generator = true; + break; + case 'r': + clean_rules = true; + break; + case 'h': + default: + printf("usage: ninja -t clean [options] [targets]\n" +"\n" +"options:\n" +" -g also clean files marked as ninja generator output\n" +" -r interpret targets as a list of rules to clean instead\n" + ); + return 1; } } argv += optind; |