#
nok = 0
#
+ from os import getenv
from os import walk
for root, dirs, files in walk(the_root):
# --
for f in files:
if f in ["Makefile.am", "Makefile.am.cmake"]:
convert = True
- if "CMakeLists.txt" in files:
- from os.path import join
- ff = open(join(root, "CMakeLists.txt"))
- content = ff.read()
- import sys
- sys.exit(-1)
- ff.close()
- if content.find("generated by am2cmake") == -1:
- convert = False
+ if getenv("AM2CMAKE_FORCE_GENERATION")=="0":
+ if "CMakeLists.txt" in files:
+ from os.path import join
+ ff = open(join(root, "CMakeLists.txt"))
+ content = ff.read()
+ import sys
+ sys.exit(-1)
+ ff.close()
+ if content.find("generated by am2cmake") == -1:
+ convert = False
+ pass
+ pass
+ if convert:
+ convertAmFile(the_root, root, dirs, files, f, module)
+ nok += 1
pass
- pass
- if convert:
- convertAmFile(the_root, root, dirs, files, f, module)
- nok += 1
pass
pass
pass