summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDan Halbert <halbert@adafruit.com>2020-08-27 10:36:59 -0400
committerGitHub <noreply@github.com>2020-08-27 10:36:59 -0400
commitfe73cfb922f37ac7b0af19bccaced8e70a808b3c (patch)
tree8d15fd0310704dfb7e09d378c3b2c08615a17e80 /tools
parent58d5f99394b62a9c016c02b2b4a38f0e566e7596 (diff)
parent553ac576ebd59941965ef7615fdb15bd2bdc347e (diff)
Merge pull request #3333 from hierophect/esp32-enable-ulab
Fix all assignments affected by inline makefile comments
Diffstat (limited to 'tools')
-rw-r--r--tools/mpconfig_category_reader.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/mpconfig_category_reader.py b/tools/mpconfig_category_reader.py
new file mode 100644
index 000000000..2f813931e
--- /dev/null
+++ b/tools/mpconfig_category_reader.py
@@ -0,0 +1,31 @@
+filepath = '../py/circuitpy_mpconfig.mk'
+with open(filepath) as fp:
+ line = fp.readline()
+ cnt = 1
+ fullbuild = []
+ defon = []
+ defoff = []
+ while line:
+ wordlist = line.split()
+ if wordlist:
+ if wordlist[-1] == "$(CIRCUITPY_FULL_BUILD)":
+ fullbuild.append(wordlist[0])
+ elif wordlist[-1] == "0":
+ defoff.append(wordlist[0])
+ elif wordlist[-1] == "1":
+ defon.append(wordlist[0])
+ line = fp.readline()
+ cnt += 1
+
+ print(str(cnt) + " Lines Read\n")
+ print("\nFULL BUILDS ------------------------")
+ for string in fullbuild:
+ print(string)
+
+ print("\nON BUILDS ------------------------")
+ for string in defon:
+ print(string)
+
+ print("\nOFF BUILDS ------------------------")
+ for string in defoff:
+ print(string)