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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 virtual void DoRun() = 0; | 47 virtual void DoRun() = 0; |
48 | 48 |
49 const BuildSettings* GetBuildSettings() const; | 49 const BuildSettings* GetBuildSettings() const; |
50 | 50 |
51 void FillSources(); | 51 void FillSources(); |
52 void FillPublic(); | 52 void FillPublic(); |
53 void FillInputs(); | 53 void FillInputs(); |
54 void FillConfigs(); | 54 void FillConfigs(); |
55 void FillOutputs(); | 55 void FillOutputs(); |
56 | 56 |
| 57 // Rrturns true if the given pattern will expand to a file in the output |
| 58 // directory. If not, returns false and sets the error, blaming the given |
| 59 // Value. |
| 60 bool EnsureSubstitutionIsInOutputDir( |
| 61 const SubstitutionPattern& pattern, |
| 62 const Value& original_value); |
| 63 |
57 Target* target_; | 64 Target* target_; |
58 Scope* scope_; | 65 Scope* scope_; |
59 const FunctionCallNode* function_call_; | 66 const FunctionCallNode* function_call_; |
60 Err* err_; | 67 Err* err_; |
61 | 68 |
62 private: | 69 private: |
63 void FillDependentConfigs(); // Includes all types of dependent configs. | 70 void FillDependentConfigs(); // Includes all types of dependent configs. |
64 void FillData(); | 71 void FillData(); |
65 void FillDependencies(); // Includes data dependencies. | 72 void FillDependencies(); // Includes data dependencies. |
66 | 73 |
67 // Reads configs/deps from the given var name, and uses the given setting on | 74 // Reads configs/deps from the given var name, and uses the given setting on |
68 // the target to save them. | 75 // the target to save them. |
69 void FillGenericConfigs(const char* var_name, LabelConfigVector* dest); | 76 void FillGenericConfigs(const char* var_name, LabelConfigVector* dest); |
70 void FillGenericDeps(const char* var_name, LabelTargetVector* dest); | 77 void FillGenericDeps(const char* var_name, LabelTargetVector* dest); |
71 | 78 |
72 void FillForwardDependentConfigs(); | 79 void FillForwardDependentConfigs(); |
73 | 80 |
74 DISALLOW_COPY_AND_ASSIGN(TargetGenerator); | 81 DISALLOW_COPY_AND_ASSIGN(TargetGenerator); |
75 }; | 82 }; |
76 | 83 |
77 #endif // TOOLS_GN_TARGET_GENERATOR_H_ | 84 #endif // TOOLS_GN_TARGET_GENERATOR_H_ |
OLD | NEW |