aboutsummaryrefslogtreecommitdiff
path: root/scripts/confmk.py
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-07-22 11:12:24 +0200
committerKarel Kočí <cynerd@email.cz>2015-07-22 11:12:24 +0200
commit17cb74bcb4583921abc32ddbe2991f27ae816707 (patch)
treebb637cd909590eadb2d549fe7449d0dc36dcfc3a /scripts/confmk.py
parent165f6b3988a74bf3b02505fc49c64dfefb693adb (diff)
downloadlinux-conf-perf-17cb74bcb4583921abc32ddbe2991f27ae816707.tar.gz
linux-conf-perf-17cb74bcb4583921abc32ddbe2991f27ae816707.tar.bz2
linux-conf-perf-17cb74bcb4583921abc32ddbe2991f27ae816707.zip
Makefile configuration is now automatically generated and more changes
Makefile configuration file is now generated automatically and contains all string config options. Separated tables drop from databaseinit.sql to file databaseclean.sql. Also add clean and init target for database. For this reason is also separated output and result from normal clean. From now on won't be results removed on standard clean. ARCH config variable is renamed to kernel_arch to make name more clear.
Diffstat (limited to 'scripts/confmk.py')
-rwxr-xr-xscripts/confmk.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/confmk.py b/scripts/confmk.py
index b8a1e6c..3a59510 100755
--- a/scripts/confmk.py
+++ b/scripts/confmk.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import os
import sys
+import re
from conf import conf
def gen_confmk():
@@ -11,12 +12,12 @@ def gen_confmk():
with open(conf.dot_confmk, 'w') as f:
f.write("# This file is generated. Please don't edit this file.\n")
- f.write("ARCH := " + conf.ARCH + "\n")
- f.write("\n")
- f.write("BUILDROOT_INITRAM := " + conf.buildroot_initram + "\n")
- f.write("BUILDROOT_INITTAB_DIRECTIVE := " + conf.buildroot_inittab_directive + "\n")
- f.write("BUILDROOT_INITSCRIPT := " + conf.buildroot_initscript + "\n")
- f.write("BUILDROOT_DEF_CONFIG := " + conf.buildroot_def_config + "\n")
+ for var in dir(conf):
+ if not re.match('__.*__', var):
+ val = eval('conf.' + var)
+ if type(val) is str:
+ f.write("CONF_" + var.upper() + " := ")
+ f.write(val + '\n')
#################################################################################