developer | 825ab6a | 2023-01-18 13:58:01 +0800 | [diff] [blame^] | 1 | #!/usr/bin/python3 -u |
| 2 | import argparse |
| 3 | import os |
| 4 | import sys |
| 5 | import traceback |
| 6 | |
| 7 | __author__ = "Sam Shih <sam.shih@medaitek.com>" |
| 8 | __copyright__ = "Copyright 2023, MediaTek Inc" |
| 9 | |
| 10 | |
| 11 | |
| 12 | def create_inc_file(config): |
| 13 | f = open(config, "r") |
| 14 | data = f.read() |
| 15 | f.close() |
| 16 | out = "PKG_MAKE_FLAGS = \" \\\n" |
| 17 | |
| 18 | for line in data.split("\n"): |
| 19 | if "#" not in line: |
| 20 | if "CONFIG_MTK_WIFI7" in line: |
| 21 | out += "\t" |
| 22 | out += (line.replace("_MTK_WIFI7", "")) |
| 23 | out += " \\" |
| 24 | out += "\n" |
| 25 | out += " \"" |
| 26 | f = open("config.inc", "w") |
| 27 | f.write(out) |
| 28 | f.close() |
| 29 | |
| 30 | |
| 31 | |
| 32 | create_inc_file (sys.argv[1]) |