Compilation fix
[geanyprj.git] / prgen.py
blob5b42b88e9f0afd8e35ab781ebf7ac7fb675aa28e
1 #!/usr/bin/env python
3 # This dirty script can be used to generate geany project files for C/C++ project
5 # Usage:
6 # $ python prgen.py > .geanyprj
9 import os
11 header = """
13 [project]
14 name=insert_project_name_here
15 base_path=./
16 description=
17 run_cmd=
18 regenerate=false
19 type=None
21 [files]
22 """
24 print header
26 # Walk dir
27 import os
29 c = 0
30 for root, dirs, files in os.walk("."):
31 for name in files:
32 if os.path.splitext(name)[1] in (".cpp", ".c", ".h", ".cxx"):
33 print "file%d=%s" % (c, os.path.join(root, name))
34 c = c + 1