Revision | a3e8778d20b455e6af39ec6e91a11a16a38cb033 (tree) |
---|---|
Time | 2012-12-26 12:36:44 |
Author | Shinya TAKEBAYASHI <omoikanenomikoto@gmai...> |
Commiter | Shinya TAKEBAYASHI |
Separated gcc buildtest to libs/util
@@ -7,21 +7,6 @@ version_number = "$Id$" | ||
7 | 7 | |
8 | 8 | include_path = [] |
9 | 9 | |
10 | -def generate_code(): | |
11 | - code = '#include <stdio.h> \n int main(int argc, char **argv){return 0;}\n' | |
12 | - open('tmp.c', 'w').write(code) | |
13 | - | |
14 | - | |
15 | -def ulink(): | |
16 | - os.remove('tmp.c') | |
17 | - os.remove('a.out') | |
18 | - | |
19 | - | |
20 | -def rungcc(): | |
21 | - L = ['gcc', '-v', 'tmp.c', '-o', 'a.out'] | |
22 | - os.spawnlp(os.P_WAIT, 'gcc', L) | |
23 | - | |
24 | - | |
25 | 10 | def findheader2(target, rootdir): |
26 | 11 | path = None |
27 | 12 | for root, dirs, files in os.walk(rootdir): |
@@ -0,0 +1,18 @@ | ||
1 | +import os | |
2 | + | |
3 | + | |
4 | +def generate_code(): | |
5 | + code = '#include <stdio.h> \n int main(int argc, char **argv){return 0;}\n' | |
6 | + open('tmp.c', 'w').write(code) | |
7 | + | |
8 | + | |
9 | +def ulink(): | |
10 | + os.remove('tmp.c') | |
11 | + os.remove('a.out') | |
12 | + | |
13 | + | |
14 | +def rungcc(): | |
15 | + L = ['gcc', '-v', 'tmp.c', '-o', 'a.out'] | |
16 | + os.spawnlp(os.P_WAIT, 'gcc', L) | |
17 | + | |
18 | + |