- typedef std::map<std::string, Package *> PackageMap;
- typedef std::map<std::string, Target *> TargetMap;
-
- std::list<std::string> cmdline_targets;
- TargetMap targets;
- PackageMap packages;
- unsigned verbose;
- Package *default_pkg;
- Msp::Path::Path cwd;
- std::list<Package *> new_pkgs;
- TargetMap includes;
- std::list<Target *> new_tgts;
-
- int load_build_file(const Msp::Path::Path &);
- void create_targets();
- Target *check_header(const Msp::Path::Path &);
- void add_target(Target *);
-
+ class ProfileLoader: public Msp::DataFile::Loader
+ {
+ public:
+ ProfileLoader(StringMap &);
+ private:
+ StringMap &profile;
+
+ void option(const std::string &, const std::string &);
+ };
+
+ typedef std::list<Package *> PackageList;
+ typedef std::map<std::string, Package *> PackageMap;
+ typedef std::map<std::string, StringMap> ProfileTemplateMap;
+
+ StringList cmdline_targets;
+ StringMap cmdline_options;
+ Msp::FS::Path cwd;
+
+ PackageMap packages;
+ SourcePackage *main_pkg;
+ PathList pkg_path;
+ PathList pkg_dirs;
+
+ TargetMap targets;
+ TargetList new_tgts;
+ TargetMap includes;
+ TargetMap libraries;
+
+ ArchMap archs;
+ ProfileTemplateMap profile_tmpl;
+
+ ProblemList problems;
+ Analyzer *analyzer;
+ bool build;
+ unsigned clean;
+ bool dry_run;
+ bool help;
+ unsigned verbose;
+ bool show_progress;
+ std::string build_file;
+ unsigned jobs;
+ StringList what_if;
+ bool conf_all;
+ bool conf_only;
+ bool build_all;
+ bool create_makefile;
+ std::string current_arch;
+ Msp::FS::Path prefix;
+ StringList warnings;
+
+ Msp::FS::Path get_package_location(const std::string &);
+ int load_build_file(const Msp::FS::Path &);
+ int create_targets();
+ Target *get_header(const Msp::FS::Path &);
+ Target *get_library(const std::string &, const Msp::FS::Path &, LibMode);
+ void update_hash(std::string &, const std::string &);
+ int do_build();
+ int do_clean();
+ int do_create_makefile();
+ void package_help();
+