blob: db0b69f88a0edb9abb1030dfcd357bf9169c7d69 [file] [log] [blame]
Joe Onorato0578cbc2016-10-19 17:03:06 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef MAKE_H
18#define MAKE_H
19
20#include <map>
21#include <string>
22#include <vector>
23
24using namespace std;
25
26struct Module
27{
28 string name;
29 vector<string> classes;
30 vector<string> paths;
31 vector<string> installed;
32};
33
Joe Onorato0578cbc2016-10-19 17:03:06 -070034/**
Joe Onoratoce0bd062019-01-14 15:30:05 -080035 * Class to encapsulate getting build variables. Caches the
36 * results if possible.
Joe Onorato0578cbc2016-10-19 17:03:06 -070037 */
Joe Onoratoce0bd062019-01-14 15:30:05 -080038class BuildVars
39{
40public:
41 BuildVars(const string& outDir, const string& buildProduct,
42 const string& buildVariant, const string& buildType);
43 ~BuildVars();
44
45 string GetBuildVar(const string& name, bool quiet);
46
47private:
48 void save();
49
50 string m_filename;
51
52 map<string,string> m_cache;
53};
Joe Onorato0578cbc2016-10-19 17:03:06 -070054
55void read_modules(const string& buildOut, const string& buildDevice,
56 map<string,Module>* modules, bool quiet);
57
58int build_goals(const vector<string>& goals);
59
60#endif // MAKE_H