blob: 1c9504d62d461cd97a36fa91835371f6e9c76b37 [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
Dan Willemsena40118d2017-10-17 17:46:41 -070034string get_build_var(const string& name, bool quiet);
Joe Onorato0578cbc2016-10-19 17:03:06 -070035
36/**
37 * Poke around in the out directory and try to find a device name that matches
38 * our product. This is faster than running get_build_var and good enough for
39 * tab completion.
40 *
41 * Returns the empty string if we can't find one.
42 */
43string sniff_device_name(const string& buildOut, const string& product);
44
45void read_modules(const string& buildOut, const string& buildDevice,
46 map<string,Module>* modules, bool quiet);
47
48int build_goals(const vector<string>& goals);
49
50#endif // MAKE_H