| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef TOOLS_GN_TARGET_GENERATOR_H_ | 5 #ifndef TOOLS_GN_TARGET_GENERATOR_H_ |
| 6 #define TOOLS_GN_TARGET_GENERATOR_H_ | 6 #define TOOLS_GN_TARGET_GENERATOR_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 static void GenerateTarget(Scope* scope, | 39 static void GenerateTarget(Scope* scope, |
| 40 const Token& function_token, | 40 const Token& function_token, |
| 41 const std::vector<Value>& args, | 41 const std::vector<Value>& args, |
| 42 const std::string& output_type, | 42 const std::string& output_type, |
| 43 Err* err); | 43 Err* err); |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 // Sets err_ on failure. | 46 // Sets err_ on failure. |
| 47 Target::OutputType GetOutputType() const; | 47 Target::OutputType GetOutputType() const; |
| 48 | 48 |
| 49 // Reads configs from the given var name, and uses the given setting on the | 49 // Reads configs/deps from the given var name, and uses the given setting on |
| 50 // target to save them | 50 // the target to save them. |
| 51 void FillGenericConfigs(const char* var_name, | 51 void FillGenericConfigs(const char* var_name, |
| 52 void (Target::*setter)(std::vector<const Config*>*)); | 52 void (Target::*setter)(std::vector<const Config*>*)); |
| 53 void FillGenericDeps(const char* var_name, |
| 54 void (Target::*setter)(std::vector<const Target*>*)); |
| 53 | 55 |
| 54 void FillConfigs(); | 56 void FillConfigs(); |
| 55 void FillAllDependentConfigs(); | 57 void FillAllDependentConfigs(); |
| 56 void FillDirectDependentConfigs(); | 58 void FillDirectDependentConfigs(); |
| 57 void FillSources(); | 59 void FillSources(); |
| 58 void FillData(); | 60 void FillData(); |
| 59 void FillDependencies(); | 61 void FillDependencies(); |
| 62 void FillDataDependencies(); |
| 60 void FillDestDir(); | 63 void FillDestDir(); |
| 61 void FillScript(); | 64 void FillScript(); |
| 62 void FillScriptArgs(); | 65 void FillScriptArgs(); |
| 63 void FillOutputs(); | 66 void FillOutputs(); |
| 64 | 67 |
| 65 const BuildSettings* GetBuildSettings() const; | 68 const BuildSettings* GetBuildSettings() const; |
| 66 | 69 |
| 67 Target* target_; | 70 Target* target_; |
| 68 Scope* scope_; | 71 Scope* scope_; |
| 69 const Token& function_token_; | 72 const Token& function_token_; |
| 70 std::vector<Value> args_; | 73 std::vector<Value> args_; |
| 71 std::string output_type_; | 74 std::string output_type_; |
| 72 Err* err_; | 75 Err* err_; |
| 73 | 76 |
| 74 // Sources are relative to this. This comes from the input file which doesn't | 77 // Sources are relative to this. This comes from the input file which doesn't |
| 75 // get freed so we don't acautlly have to make a copy. | 78 // get freed so we don't acautlly have to make a copy. |
| 76 const SourceDir& input_directory_; | 79 const SourceDir& input_directory_; |
| 77 | 80 |
| 78 FRIEND_TEST_ALL_PREFIXES(TargetGenerator, ResolveInputPath); | 81 FRIEND_TEST_ALL_PREFIXES(TargetGenerator, ResolveInputPath); |
| 79 | 82 |
| 80 DISALLOW_COPY_AND_ASSIGN(TargetGenerator); | 83 DISALLOW_COPY_AND_ASSIGN(TargetGenerator); |
| 81 }; | 84 }; |
| 82 | 85 |
| 83 #endif // TOOLS_GN_TARGET_GENERATOR_H_ | 86 #endif // TOOLS_GN_TARGET_GENERATOR_H_ |
| OLD | NEW |