修订版 | 0d628b5d0551b92ad9b7f9008adf8c149241e878 (tree) |
---|---|
时间 | 2013-01-22 19:54:51 |
作者 | Shinya TAKEBAYASHI <omoikanenomikoto@gmai...> |
Commiter | Shinya TAKEBAYASHI |
separated gcc version detector
@@ -0,0 +1,18 @@ | ||
1 | +#! /usr/bin/env python | |
2 | + | |
3 | +import subprocess | |
4 | +import os | |
5 | + | |
6 | +tmpfile = ".tmp.c" | |
7 | +wd = "/tmp/" | |
8 | +cmdline "gcc -v " + wd + tmpfile | |
9 | + | |
10 | +def generate_code(): | |
11 | + code = '#include <stdio.h> \n int main(int argc, char **argv){return 0;}\n' | |
12 | + open(wd + tmpfile, 'w').write(code) | |
13 | + | |
14 | + | |
15 | +def ulink(): | |
16 | + os.remove('tmp.c') | |
17 | + os.remove('a.out') | |
18 | + |