Now the make freeze is done when any of the *.py files in intern/python
is updated. * modulefinder creates a file src.list which contains all the *.py files needed for the python suport in Blender. * Makefile.am is able to depend on the files listed in src.list. * makemakefile_ac.py is reverted to the previous version. The old version contained my first attempt to get the make freeze trick working. It was wrong. Michel
This commit is contained in:
@@ -23,20 +23,17 @@ def makemakefile(outfp, makevars, files, target):
|
|||||||
# outfp.write("\n\ninclude nan_definitions.mk\n")
|
# outfp.write("\n\ninclude nan_definitions.mk\n")
|
||||||
outfp.write("\nall: %s\n\n" % libtarget)
|
outfp.write("\nall: %s\n\n" % libtarget)
|
||||||
|
|
||||||
src_list = open ('../frozen/src.list', 'w')
|
|
||||||
deps = []
|
deps = []
|
||||||
for i in range(len(files)):
|
for i in range(len(files)):
|
||||||
file = files[i]
|
file = files[i]
|
||||||
if file[-2:] == '.c':
|
if file[-2:] == '.c':
|
||||||
base = os.path.basename(file)
|
base = os.path.basename(file)
|
||||||
dest = base[:-2] + '.o'
|
dest = base[:-2] + '.o'
|
||||||
src_list.write("%s " % file)
|
|
||||||
# outfp.write("%s: %s\n" % (dest, file))
|
# outfp.write("%s: %s\n" % (dest, file))
|
||||||
# outfp.write("\t$(CC) $(CFLAGS) -c %s\n" % file)
|
# outfp.write("\t$(CC) $(CFLAGS) -c %s\n" % file)
|
||||||
files[i] = dest
|
files[i] = dest
|
||||||
deps.append(dest)
|
deps.append(dest)
|
||||||
|
|
||||||
src_list.close()
|
|
||||||
mainfile = 'M___main__.o'
|
mainfile = 'M___main__.o'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@@ -354,6 +354,7 @@ class ModuleFinder:
|
|||||||
return imp.find_module(name, path)
|
return imp.find_module(name, path)
|
||||||
|
|
||||||
def report(self):
|
def report(self):
|
||||||
|
src_list = open ('../frozen/src.list', 'w')
|
||||||
print
|
print
|
||||||
print " %-25s %s" % ("Name", "File")
|
print " %-25s %s" % ("Name", "File")
|
||||||
print " %-25s %s" % ("----", "----")
|
print " %-25s %s" % ("----", "----")
|
||||||
@@ -367,6 +368,13 @@ class ModuleFinder:
|
|||||||
else:
|
else:
|
||||||
print "m",
|
print "m",
|
||||||
print "%-25s" % key, m.__file__ or ""
|
print "%-25s" % key, m.__file__ or ""
|
||||||
|
# Write the Python filename to the src.list file
|
||||||
|
# This is probably not the best way to do it, but it works :)
|
||||||
|
if m.__file__:
|
||||||
|
if m.__file__[-3:] == '.py':
|
||||||
|
src_list.write("%s " % m.__file__)
|
||||||
|
src_list.close()
|
||||||
|
|
||||||
|
|
||||||
# Print missing modules
|
# Print missing modules
|
||||||
keys = self.badmodules.keys()
|
keys = self.badmodules.keys()
|
||||||
|
Reference in New Issue
Block a user