]> git.tdb.fi Git - builder.git/blob - source/buildercli.h
Add and improve build signatures for some tools
[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 /**
10 Provides a command-line interface for Builder.
11 */
12 class BuilderCLI: public Msp::RegisteredApplication<BuilderCLI>
13 {
14 private:
15         typedef std::list<std::string> NameList;
16
17         NameList cmdline_targets;
18         Config::InputOptions cmdline_options;
19         Msp::FS::Path cwd;
20
21         Builder builder;
22         Logger logger;
23         Analyzer *analyzer;
24         bool build;
25         unsigned clean;
26         bool dry_run;
27         bool help;
28         std::string helpmsg;
29         bool show_progress;
30         std::string build_file;
31         unsigned jobs;
32         NameList what_if;
33         bool conf_all;
34         bool conf_only;
35         bool build_all;
36         bool create_makefile;
37
38 public:
39         BuilderCLI(int, char **);
40         ~BuilderCLI();
41
42         virtual int main();
43
44 private:
45         bool prepare_build();
46         Target *resolve_target(const std::string &);
47
48         void package_help();
49 };
50
51 #endif