blob: 8c73cf6218ce98e96077cf91d79298db717a30fa [file] [log] [blame]
#!/usr/bin/python3 -u
import argparse
import os
import sys
import traceback
__author__ = "Sam Shih <sam.shih@medaitek.com>"
__copyright__ = "Copyright 2023, MediaTek Inc"
def create_inc_file(config,output):
f = open(config, "r")
data = f.read()
f.close()
out = "PKG_MAKE_FLAGS_%s= \" \\\n"% output
for line in data.split("\n"):
if "#" not in line:
if "CONFIG_MTK_WIFI7" in line:
out += "\t"
out += (line.replace("_MTK_WIFI7", ""))
out += " \\"
out += "\n"
out += " \""
f = open("%s.inc"% output, "w")
f.write(out)
f.close()
create_inc_file (sys.argv[1], sys.argv[2])