| Index: tools/gn/gyp_target_writer.h
|
| diff --git a/tools/gn/gyp_target_writer.h b/tools/gn/gyp_target_writer.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1496fbd97201a51ee910a64cc6bbc77929c1d2cb
|
| --- /dev/null
|
| +++ b/tools/gn/gyp_target_writer.h
|
| @@ -0,0 +1,47 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef TOOLS_GN_GYP_TARGET_WRITER_H_
|
| +#define TOOLS_GN_GYP_TARGET_WRITER_H_
|
| +
|
| +#include <iosfwd>
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "tools/gn/gyp_helper.h"
|
| +
|
| +class Err;
|
| +class Settings;
|
| +class SourceFile;
|
| +class Target;
|
| +
|
| +class GypTargetWriter {
|
| + public:
|
| + struct TargetPair {
|
| + TargetPair() : debug(NULL), release(NULL) {}
|
| + const Target* debug;
|
| + const Target* release;
|
| + };
|
| +
|
| + GypTargetWriter(const Target* target, std::ostream& out);
|
| + virtual ~GypTargetWriter();
|
| +
|
| + static void WriteFile(const SourceFile& gyp_file,
|
| + const std::vector<TargetPair>& targets,
|
| + Err* err);
|
| +
|
| + virtual void Run() = 0;
|
| +
|
| + protected:
|
| + const Settings* settings_; // Non-owning.
|
| + const Target* target_; // Non-owning.
|
| + std::ostream& out_;
|
| +
|
| + GypHelper helper_;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(GypTargetWriter);
|
| +};
|
| +
|
| +#endif // TOOLS_GN_GYP_TARGET_WRITER_H_
|
|
|