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_NINJA_TARGET_WRITER_H_ | 5 #ifndef TOOLS_GN_NINJA_TARGET_WRITER_H_ |
6 #define TOOLS_GN_NINJA_TARGET_WRITER_H_ | 6 #define TOOLS_GN_NINJA_TARGET_WRITER_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "tools/gn/path_output.h" | 11 #include "tools/gn/path_output.h" |
| 12 #include "tools/gn/substitution_type.h" |
12 | 13 |
13 class FileTemplate; | 14 class FileTemplate; |
14 class OutputFile; | 15 class OutputFile; |
15 class Settings; | 16 class Settings; |
16 class Target; | 17 class Target; |
17 struct SubstitutionBits; | 18 struct SubstitutionBits; |
18 | 19 |
19 // Generates one target's ".ninja" file. The toplevel "build.ninja" file is | 20 // Generates one target's ".ninja" file. The toplevel "build.ninja" file is |
20 // generated by the NinjaBuildWriter. | 21 // generated by the NinjaBuildWriter. |
21 class NinjaTargetWriter { | 22 class NinjaTargetWriter { |
(...skipping 25 matching lines...) Expand all Loading... |
47 void WriteStampForTarget(const std::vector<OutputFile>& deps, | 48 void WriteStampForTarget(const std::vector<OutputFile>& deps, |
48 const std::vector<OutputFile>& order_only_deps); | 49 const std::vector<OutputFile>& order_only_deps); |
49 | 50 |
50 const Settings* settings_; // Non-owning. | 51 const Settings* settings_; // Non-owning. |
51 const Target* target_; // Non-owning. | 52 const Target* target_; // Non-owning. |
52 std::ostream& out_; | 53 std::ostream& out_; |
53 PathOutput path_output_; | 54 PathOutput path_output_; |
54 | 55 |
55 private: | 56 private: |
56 void WriteCopyRules(); | 57 void WriteCopyRules(); |
| 58 void WriteEscapedSubstitution(SubstitutionType type); |
57 | 59 |
58 DISALLOW_COPY_AND_ASSIGN(NinjaTargetWriter); | 60 DISALLOW_COPY_AND_ASSIGN(NinjaTargetWriter); |
59 }; | 61 }; |
60 | 62 |
61 #endif // TOOLS_GN_NINJA_TARGET_WRITER_H_ | 63 #endif // TOOLS_GN_NINJA_TARGET_WRITER_H_ |
OLD | NEW |