1
0

bytebeat_compiler.py: don't use "path_to_*"

Formatting: Replace all whitespaces to tabulation characters
This commit is contained in:
Intel A80486DX2-66 2023-12-30 15:44:50 +03:00
parent 0f20974908
commit aa5f7359c2
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

@ -21,14 +21,14 @@ PATHS = {
PATHS["template"] = path_join(PATHS["src_dir"], PATHS["template"])
PATHS["substitute"] = path_join(PATHS["build_dir"], PATHS["substitute"])
PATHS["output"] = path_join(PATHS["build_dir"], PATHS["output"])
PATHS["path_to_fwrite_le_header"] = PATHS["src_dir"] + PATHS["fwrite_le_header"]
PATHS["path_to_fwrite_le"] = PATHS["src_dir"] + PATHS["fwrite_le"]
PATHS["fwrite_le_header"] = PATHS["src_dir"] + PATHS["fwrite_le_header"]
PATHS["fwrite_le"] = PATHS["src_dir"] + PATHS["fwrite_le"]
# Add `.` directory before all paths for compilation
PATHS["template"] = path_join(".", PATHS["template"])
PATHS["substitute"] = path_join(".", PATHS["substitute"])
PATHS["output"] = path_join(".", PATHS["output"])
PATHS["path_to_fwrite_le"] = path_join(".", PATHS["path_to_fwrite_le"])
PATHS["fwrite_le"] = path_join(".", PATHS["fwrite_le"])
# Default parameters
DEFAULT_PARAMETERS = {
@ -160,14 +160,14 @@ if __name__ == "__main__":
"length": samples,
"silent_mode": "true" if args.silent else "false",
"verbose_mode": "true" if args.verbose and not args.silent else "false",
"path_to_fwrite_le": "../" + PATHS["path_to_fwrite_le_header"]
"fwrite_le": "../" + PATHS["fwrite_le_header"]
}, read_file(PATHS["template"])))
# Compile by invoking the shell script
print("Compiling")
# Let the system execute aliases by calling os.system
command = " ".join([CC, CFLAGS, INPUT_FILE, PATHS["path_to_fwrite_le"],
"-o", OUTPUT_FILE])
command = " ".join([CC, CFLAGS, INPUT_FILE, PATHS["fwrite_le"], "-o",
OUTPUT_FILE])
print(command)
system(command)