Skip to content
Snippets Groups Projects
Commit a8e7c031 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tools/make-frozen.py: Preserve directory hierarchy.

Currently, frozen packages are not supported, but eventually they should be,
so make sure to store complete directory hierarchy.
parent f5ae384d
Branches
No related tags found
No related merge requests found
...@@ -26,10 +26,16 @@ def module_name(f): ...@@ -26,10 +26,16 @@ def module_name(f):
modules = [] modules = []
for dirpath, dirnames, filenames in os.walk(sys.argv[1]): root = sys.argv[1]
root_len = len(root)
if root[-1] != "/":
root_len += 1
for dirpath, dirnames, filenames in os.walk(root):
for f in filenames: for f in filenames:
st = os.stat(dirpath + "/" + f) fullpath = dirpath + "/" + f
modules.append((f, st)) st = os.stat(fullpath)
modules.append((fullpath[root_len:], st))
print("#include <stdint.h>") print("#include <stdint.h>")
print("const uint16_t mp_frozen_sizes[] = {") print("const uint16_t mp_frozen_sizes[] = {")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment