Build fixes from fuzz target.
diff --git a/tools/make_cmakelists.py b/tools/make_cmakelists.py
index 22f3757..a4923c8 100755
--- a/tools/make_cmakelists.py
+++ b/tools/make_cmakelists.py
@@ -48,7 +48,7 @@
         else:
             print("Warning: no such file: " + file)
 
-    if filter(IsSourceFile, files):
+    if list(filter(IsSourceFile, files)):
       # Has sources, make this a normal library.
       self.converter.toplevel += "add_library(%s\n  %s)\n" % (
           kwargs["name"],
@@ -272,8 +272,8 @@
 
 globs = GetDict(converter)
 
-execfile("WORKSPACE", GetDict(WorkspaceFileFunctions(converter)))
-execfile("BUILD", GetDict(BuildFileFunctions(converter)))
+exec(open("WORKSPACE").read(), GetDict(WorkspaceFileFunctions(converter)))
+exec(open("BUILD").read(), GetDict(BuildFileFunctions(converter)))
 
 with open(sys.argv[1], "w") as f:
   f.write(converter.convert())