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 3 // found in the LICENSE file. 4 5 #ifndef TOOLS_GN_NINJA_COPY_TARGET_WRITER_H_ 6 #define TOOLS_GN_NINJA_COPY_TARGET_WRITER_H_ 7 8 #include "gn/ninja_target_writer.h" 9 10 // Writes a .ninja file for a copy target type. 11 class NinjaCopyTargetWriter : public NinjaTargetWriter { 12 public: 13 NinjaCopyTargetWriter(const Target* target, std::ostream& out); 14 ~NinjaCopyTargetWriter() override; 15 16 void Run() override; 17 18 private: 19 // Writes the rules top copy the file(s), putting the computed output file 20 // name(s) into the given vector. 21 void WriteCopyRules(std::vector<OutputFile>* output_files); 22 23 NinjaCopyTargetWriter(const NinjaCopyTargetWriter&) = delete; 24 NinjaCopyTargetWriter& operator=(const NinjaCopyTargetWriter&) = delete; 25 }; 26 27 #endif // TOOLS_GN_NINJA_COPY_TARGET_WRITER_H_ 28