- getopt.add_option(GetOpt::Option('a', "analyze", GetOpt::REQUIRED));
- getopt.add_option(GetOpt::Option('b', "build", GetOpt::NONE));
- getopt.add_option(GetOpt::Option('c', "clean", GetOpt::NONE));
- getopt.add_option(GetOpt::Option('f', "file", GetOpt::REQUIRED, "Build"));
- getopt.add_option(GetOpt::Option('h', "help", GetOpt::NONE));
- getopt.add_option(GetOpt::Option('j', "jobs", GetOpt::REQUIRED, "1"));
- getopt.add_option(GetOpt::Option('n', "dry-run", GetOpt::NONE));
- getopt.add_option(GetOpt::Option('v', "verbose", GetOpt::NONE));
- getopt.add_option(GetOpt::Option('A', "conf-all", GetOpt::NONE));
- getopt.add_option(GetOpt::Option('B', "build-all", GetOpt::NONE));
- getopt.add_option(GetOpt::Option('C', "chdir", GetOpt::REQUIRED));
- getopt.add_option(GetOpt::Option('W', "what-if", GetOpt::REQUIRED));
- getopt.add_option(GetOpt::Option("chrome", GetOpt::NONE));
- getopt.add_option(GetOpt::Option("conf-only", GetOpt::NONE));
- getopt.add_option(GetOpt::Option("full-paths", GetOpt::NONE));
- getopt.add_option(GetOpt::Option("max-depth", GetOpt::REQUIRED));
- int index=getopt(argc, argv);
-
- verbose+=getopt['v'].count();
-
- if(getopt['a'])
+ getopt.add_option('a', "analyze", analyze_mode, GetOpt::REQUIRED_ARG);
+ getopt.add_option('b', "build", build, GetOpt::NO_ARG);
+ getopt.add_option('c', "clean", clean, GetOpt::NO_ARG);
+ getopt.add_option('f', "file", build_file, GetOpt::REQUIRED_ARG);
+ getopt.add_option('h', "help", help, GetOpt::NO_ARG);
+ getopt.add_option('j', "jobs", jobs, GetOpt::REQUIRED_ARG);
+ getopt.add_option('n', "dry-run", dry_run, GetOpt::NO_ARG);
+ getopt.add_option('v', "verbose", verbose, GetOpt::NO_ARG);
+ getopt.add_option('A', "conf-all", conf_all, GetOpt::NO_ARG);
+ getopt.add_option('B', "build-all", build_all, GetOpt::NO_ARG);
+ getopt.add_option('C', "chdir", work_dir, GetOpt::REQUIRED_ARG);
+ getopt.add_option('P', "progress", show_progress, GetOpt::NO_ARG);
+ getopt.add_option('W', "what-if", what_if, GetOpt::REQUIRED_ARG);
+ getopt.add_option( "conf-only", conf_only, GetOpt::NO_ARG);
+ getopt.add_option( "full-paths", full_paths, GetOpt::NO_ARG);
+ //getopt.add_option( "makefile", create_makefile, GetOpt::NO_ARG);
+ getopt.add_option( "max-depth", max_depth, GetOpt::REQUIRED_ARG);
+ getopt(argc, argv);
+
+ if(!analyze_mode.empty())