Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: tools/gn/gyp_target_writer.h

Issue 80463004: GN generator for GYP actions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/gyp_script_target_writer_unittest.cc ('k') | tools/gn/gyp_target_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/gyp_target_writer.h
diff --git a/tools/gn/gyp_target_writer.h b/tools/gn/gyp_target_writer.h
index 597a609c75b2613df23bba09dbbe6ec69214c2b9..df44dab32eabb3a2b589bf6bba654a386ecaae37 100644
--- a/tools/gn/gyp_target_writer.h
+++ b/tools/gn/gyp_target_writer.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "tools/gn/gyp_helper.h"
+#include "tools/gn/path_output.h"
class BuilderRecord;
class Err;
@@ -32,7 +33,9 @@ class GypTargetWriter {
const BuilderRecord* host_release;
};
- GypTargetWriter(const Target* target, std::ostream& out);
+ GypTargetWriter(const Target* target,
+ const SourceDir& gyp_dir,
+ std::ostream& out);
virtual ~GypTargetWriter();
static void WriteFile(const SourceFile& gyp_file,
@@ -42,11 +45,19 @@ class GypTargetWriter {
virtual void Run() = 0;
protected:
+ // Writes the given number of spaces to the output stream and returns it.
+ std::ostream& Indent(int spaces);
+ static std::ostream& Indent(std::ostream& out, int spaces);
+
+ static const int kExtraIndent = 2;
+
const Settings* settings_; // Non-owning.
const Target* target_; // Non-owning.
+ SourceDir gyp_dir_; // Dir of GYP file.
std::ostream& out_;
GypHelper helper_;
+ PathOutput path_output_;
private:
DISALLOW_COPY_AND_ASSIGN(GypTargetWriter);
« no previous file with comments | « tools/gn/gyp_script_target_writer_unittest.cc ('k') | tools/gn/gyp_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698