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

Side by Side Diff: tools/gn/action_values.cc

Issue 1751903003: Add "bundle_data" target as first step for adding bundle support to gn. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-typos
Patch Set: Rebase Created 4 years, 9 months 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 unified diff | Download patch
« no previous file with comments | « tools/gn/BUILD.gn ('k') | tools/gn/bundle_data_target_generator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "tools/gn/action_values.h" 5 #include "tools/gn/action_values.h"
6 6
7 #include "tools/gn/settings.h" 7 #include "tools/gn/settings.h"
8 #include "tools/gn/substitution_writer.h" 8 #include "tools/gn/substitution_writer.h"
9 #include "tools/gn/target.h" 9 #include "tools/gn/target.h"
10 10
11 ActionValues::ActionValues() : console_(false) {} 11 ActionValues::ActionValues() : console_(false) {}
12 12
13 ActionValues::~ActionValues() {} 13 ActionValues::~ActionValues() {}
14 14
15 void ActionValues::GetOutputsAsSourceFiles( 15 void ActionValues::GetOutputsAsSourceFiles(
16 const Target* target, 16 const Target* target,
17 std::vector<SourceFile>* result) const { 17 std::vector<SourceFile>* result) const {
18 if (target->output_type() == Target::COPY_FILES || 18 if (target->output_type() == Target::BUNDLE_DATA) {
19 // The bundle_data target has no output, the real output will be generated
20 // by the create_bundle target.
21 } else if (target->output_type() == Target::COPY_FILES ||
19 target->output_type() == Target::ACTION_FOREACH) { 22 target->output_type() == Target::ACTION_FOREACH) {
20 // Copy and foreach applies the outputs to the sources. 23 // Copy and foreach applies the outputs to the sources.
21 SubstitutionWriter::ApplyListToSources( 24 SubstitutionWriter::ApplyListToSources(
22 target->settings(), outputs_, target->sources(), result); 25 target->settings(), outputs_, target->sources(), result);
23 } else { 26 } else {
24 // Actions (and anything else that happens to specify an output) just use 27 // Actions (and anything else that happens to specify an output) just use
25 // the output list with no substitution. 28 // the output list with no substitution.
26 SubstitutionWriter::GetListAsSourceFiles(outputs_, result); 29 SubstitutionWriter::GetListAsSourceFiles(outputs_, result);
27 } 30 }
28 } 31 }
OLDNEW
« no previous file with comments | « tools/gn/BUILD.gn ('k') | tools/gn/bundle_data_target_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698