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

Side by Side Diff: chrome/tools/build/make_version_cc.py

Issue 874413003: Add targets for generating version files in Windows GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix issues after review, update GYP. Created 5 years, 10 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 | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 # Creates chrome_version.cc which contains the definition of the
8 # kChromeVersion constant.
9
10 import sys
11
12 def main(me, args):
13 if len(args) != 2:
14 print >>sys.stderr, 'usage: %s version.cc version' % me
15 return 1
16
17 (cc_file, version) = args
18
19 contents = '''// automatically generated by %s
20
21 #include "chrome/common/chrome_constants.h"
22
23 namespace chrome {
24
25 const char kChromeVersion[] = "%s";
26
27 } // namespace chrome
28 ''' % (me, version)
29
30 output = open(cc_file, 'w')
31 output.write(contents)
32 output.close()
33
34 return 0
35
36 if __name__ == '__main__':
37 sys.exit(main(sys.argv[0], sys.argv[1:]))
OLDNEW
« no previous file with comments | « chrome/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698