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.
5 #ifndef TOOLS_GN_NINJA_WRITER_H_
6 #define TOOLS_GN_NINJA_WRITER_H_
12 #include "base/basictypes.h"
20 // On failure will print an error and will return false.
21 static bool RunAndWriteFiles(const BuildSettings
* build_settings
);
23 // Writes only the toolchain.ninja files, skipping the root buildfile. The
24 // settings for the files written will be added to the vector.
26 // The skip files will avoid writing "subninja" rules when we're doing a
27 // side-by-side GYP build. .ninja files exactly matching the ones in the set
29 static bool RunAndWriteToolchainFiles(
30 const BuildSettings
* build_settings
,
31 const std::set
<std::string
>& skip_files
,
32 std::vector
<const Settings
*>* all_settings
);
35 NinjaWriter(const BuildSettings
* build_settings
);
39 const std::set
<std::string
>& skip_files
,
40 std::vector
<const Settings
*>* all_settings
,
41 std::vector
<const Target
*>* default_targets
);
42 bool WriteRootBuildfiles(const std::vector
<const Settings
*>& all_settings
,
43 const std::vector
<const Target
*>& default_targets
);
45 const BuildSettings
* build_settings_
;
47 DISALLOW_COPY_AND_ASSIGN(NinjaWriter
);
50 #endif // TOOLS_GN_NINJA_WRITER_H_