18fff11e15
The SDK build system does not provide an output file and instead uses the -o<FOLDER> option and lets aidl figure out the intermediary folders that represents the packages, and the filename based on the input file (and its package). Because of this the -d<FILE> option to generate a dependency file is not convenient. Instead the new option, -a (no parameters), automatically generate a dependency files next to the output file. Also, when compiling parcelable aidl files, without the -b option, a dependency file is still generated. This is used by the SDK build system since it cannot parse the file separately and instead tries to compile every .aidl file. The generation of this dependency file (which shows no output) allows to know when any type of aidl file has been compiled. Change-Id: If81dc7e1e0a780592c94d1850a1d1b094d6e7908
37 lines
825 B
C++
37 lines
825 B
C++
#ifndef DEVICE_TOOLS_AIDL_H
|
|
#define DEVICE_TOOLS_AIDL_H
|
|
|
|
#include <string.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
using namespace std;
|
|
|
|
enum {
|
|
COMPILE_AIDL,
|
|
PREPROCESS_AIDL
|
|
};
|
|
|
|
// This struct is the parsed version of the command line options
|
|
struct Options
|
|
{
|
|
int task;
|
|
bool failOnParcelable;
|
|
vector<string> importPaths;
|
|
vector<string> preprocessedFiles;
|
|
string inputFileName;
|
|
string outputFileName;
|
|
string outputBaseFolder;
|
|
string depFileName;
|
|
bool autoDepFile;
|
|
|
|
vector<string> filesToPreprocess;
|
|
};
|
|
|
|
// takes the inputs from the command line and fills in the Options struct
|
|
// Returns 0 on success, and nonzero on failure.
|
|
// It also prints the usage statement on failure.
|
|
int parse_options(int argc, const char* const* argv, Options *options);
|
|
|
|
#endif // DEVICE_TOOLS_AIDL_H
|