blob: eeffb625cc186d2ccef11c1d442916989a19c882 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/usr/bin/env python
import os
import sys
import version
version_string = '%s.%s.%s' % (version.major, version.minor, version.patch)
if len(sys.argv) < 2:
print sys.stderr, "Usage: %s <Version.inc.in>"
sys.exit(1)
with open(sys.argv[1], 'r') as f:
replacements = {
'@CLANG_VERSION@': version_string,
'@CLANG_VERSION_MAJOR@': version.major,
'@CLANG_VERSION_MINOR@': version.minor,
'@CLANG_VERSION_PATCHLEVEL@': version.patch,
'@CLANG_HAS_VERSION_PATCHLEVEL@': '1',
}
for line in f:
line = line.strip()
for replace, to in replacements.iteritems():
line = line.replace(replace, to)
print line
|