3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00

updated include directives

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-08-01 10:51:47 -07:00
parent aefed78f1a
commit 2b82fd5d0c
87 changed files with 209 additions and 216 deletions

View file

@ -8,7 +8,6 @@ is_include2 = re.compile("#include\"(.*)\"")
def fix_include(file, paths):
print(file)
tmp = "%s.tmp" % file
ins = open(file)
ous = open(tmp,'w')
@ -36,6 +35,7 @@ def fix_include(file, paths):
ins.close()
ous.close()
if found:
print(file)
os.system("move %s %s" % (tmp, file))
else:
os.system("del %s" % tmp)
@ -48,6 +48,10 @@ def find_paths(dir):
if f.endswith('.h'):
path = "%s/%s" % (root1, f)
paths[f] = path
if f.endswith('.pyg'):
f = f.replace("pyg","hpp")
path = "%s/%s" % (root1, f)
paths[f] = path
return paths
paths = find_paths('src')
@ -55,6 +59,8 @@ paths = find_paths('src')
def fixup(dir):
for root, dirs, files in os.walk(dir):
for f in files:
if f == "z3.h":
continue
if f.endswith('.h') or f.endswith('.cpp'):
path = "%s\\%s" % (root, f)
fix_include(path, paths)