Subversion Repositories Kolibri OS

Rev

Rev 8974 | Rev 8976 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8974 Rev 8975
Line 1891... Line 1891...
1891
	should_get_declarations = True
1891
	should_get_declarations = True
1892
	if not it_neds_to_be_parsed(asm_file_name):
1892
	if not it_neds_to_be_parsed(asm_file_name):
1893
		print(f"Skipping {asm_file_name} (already newest)")
1893
		print(f"Skipping {asm_file_name} (already newest)")
1894
		should_get_declarations = False
1894
		should_get_declarations = False
1895
	else:
1895
	else:
1896
		print(f"Parsing {asm_file_name}")
1896
		print(f"Handling {asm_file_name}")
1897
	# Read the source
1897
	# Read the source
1898
	asm_file_contents = open(asm_file_name, "r", encoding="utf-8").read()
1898
	asm_file_contents = open(asm_file_name, "r", encoding="utf-8").read()
1899
	# Find includes, fix their paths and handle em recoursively
1899
	# Find includes, fix their paths and handle em recoursively
1900
	includes = re.findall(r'^include (["\'])(.*)\1', asm_file_contents, flags=re.MULTILINE)
1900
	includes = re.findall(r'^include (["\'])(.*)\1', asm_file_contents, flags=re.MULTILINE)
1901
	for include in includes:
1901
	for include in includes:
Line 1905... Line 1905...
1905
		if not os.path.isfile(full_path):
1905
		if not os.path.isfile(full_path):
1906
			full_path = include
1906
			full_path = include
1907
		new_subdir = full_path.rsplit('/', 1)[0]
1907
		new_subdir = full_path.rsplit('/', 1)[0]
1908
		handle_file(handled_files, full_path, new_subdir)
1908
		handle_file(handled_files, full_path, new_subdir)
1909
	# Only collect declarations from the file if it wasn't parsed before
1909
	# Only collect declarations from the file if it wasn't parsed before
1910
	if should_get_declarations:
1910
	if should_get_declarations and not clean_generated_stuff:
1911
		get_declarations(asm_file_contents, asm_file_name)
1911
		get_declarations(asm_file_contents, asm_file_name)
Line 1912... Line 1912...
1912
 
1912
 
Line 1913... Line 1913...
1913
kernel_files = []
1913
kernel_files = []