1 /* 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 24 using namespace std; 25 26 struct Module 27 { 28 string name; 29 vector<string> classes; 30 vector<string> paths; 31 vector<string> installed; 32 }; 33 34 string get_build_var(const string& name, bool quiet); 35 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 */ 43 string sniff_device_name(const string& buildOut, const string& product); 44 45 void read_modules(const string& buildOut, const string& buildDevice, 46 map<string,Module>* modules, bool quiet); 47 48 int build_goals(const vector<string>& goals); 49 50 #endif // MAKE_H 51