aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-04-26 10:52:21 +0200
committerKarel Kočí <cynerd@email.cz>2015-04-26 10:52:21 +0200
commit1f88ee3ca518bf5ee8b11f78d8dbc7b38428f4a7 (patch)
tree783b200ede28750b829231b08014404f1b318c35
parentdd54ddbc8fd1ba60c3db57cdcc48517c40897068 (diff)
downloadlinux-conf-perf-1f88ee3ca518bf5ee8b11f78d8dbc7b38428f4a7.tar.gz
linux-conf-perf-1f88ee3ca518bf5ee8b11f78d8dbc7b38428f4a7.tar.bz2
linux-conf-perf-1f88ee3ca518bf5ee8b11f78d8dbc7b38428f4a7.zip
Generate configuration for root Makefile from conf.py
-rw-r--r--Makefile7
-rw-r--r--conf.py2
-rwxr-xr-xscripts/confmk.py19
3 files changed, 27 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7504c54..5ecbfe3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
.PHONY: all help parse_kconfig write_config build run test clean clean_linux clean_buildroot mlinux mbuildroot
+include .conf.mk
+
all: parse_kconfig write_config
help:
@@ -24,7 +26,7 @@ mbuildroot:
$(MAKE) -C scripts/buildroot menuconfig
mlinux:
- $(MAKE) -C linux menuconfig
+ ARCH=$(SRCARCH) $(MAKE) -C linux menuconfig
test: build/initram.gz
@ #TODO
@@ -48,6 +50,9 @@ clean_buildroot:
#######################################
+.conf.mk: conf.py
+ scripts/confmk.py
+
parse_kconfig:
@$(MAKE) -C scripts/parse_kconfig/
diff --git a/conf.py b/conf.py
index e870a57..90f2b12 100644
--- a/conf.py
+++ b/conf.py
@@ -18,6 +18,8 @@ ARCH = SRCARCH
linux_make_args = ['-j8']
# Path settings
+dot_confmk = pf('.conf.mk')
+
linux_sources = pf('linux')
linux_kconfig_head = 'Kconfig'
linux_dot_config = linux_sources + '/.config'
diff --git a/scripts/confmk.py b/scripts/confmk.py
new file mode 100755
index 0000000..ef27543
--- /dev/null
+++ b/scripts/confmk.py
@@ -0,0 +1,19 @@
+#!/bin/python3
+import os
+import sys
+from conf import conf
+
+def gen_confmk():
+ try:
+ os.remove(conf.dot_confmk)
+ except OSError:
+ pass
+
+ with open(conf.dot_confmk, 'w') as f:
+ f.write("# This file is generated. Please don't edit this file.\n")
+ f.write("SRCARCH := " + conf.SRCARCH + "\n")
+
+#################################################################################
+
+if __name__ == '__main__':
+ gen_confmk()