]> git.tdb.fi Git - builder.git/blob - source/buildercli.h
Use GetOpt's new features
[builder.git] / source / buildercli.h
1 #ifndef BUILDERCLI_H_
2 #define BUILDERCLI_H_
3
4 #include <msp/core/application.h>
5 #include "builder.h"
6
7 class Analyzer;
8
9 class BuilderCLI: public Msp::RegisteredApplication<BuilderCLI>
10 {
11 private:
12         typedef std::list<std::string> NameList;
13
14         NameList cmdline_targets;
15         Config::InputOptions cmdline_options;
16         Msp::FS::Path cwd;
17
18         Builder builder;
19         Logger logger;
20         Analyzer *analyzer;
21         bool build;
22         unsigned clean;
23         bool dry_run;
24         bool help;
25         std::string helpmsg;
26         bool show_progress;
27         std::string build_file;
28         unsigned jobs;
29         NameList what_if;
30         bool conf_all;
31         bool conf_only;
32         bool build_all;
33         bool create_makefile;
34
35 public:
36         BuilderCLI(int, char **);
37         ~BuilderCLI();
38
39         virtual int main();
40
41 private:
42         bool prepare_build();
43
44         void package_help();
45 };
46
47 #endif