From 2e35b7a90120e6f568970ad08efce5aecf6740fe Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Sun, 20 Sep 2009 23:01:17 +0300 Subject: [PATCH] CML2 configuration file is saved and brought up until deleted. --- config/projpaths.py | 2 +- configure.py | 9 +++++++-- loader/SConscript | 3 --- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/config/projpaths.py b/config/projpaths.py index 5aa37c8..469c790 100644 --- a/config/projpaths.py +++ b/config/projpaths.py @@ -12,7 +12,7 @@ TOOLSDIR = join(PROJROOT, "tools") CML2_CONFIG_SRCDIR = join(PROJROOT, "config/cml") CML2TOOLSDIR = join(TOOLSDIR, "cml2-tools") CML2RULES = join(BUILDDIR, "cml2_rules.out") -CML2_CONFIG_PROPERTIES = join(BUILDDIR, "cml2_config.out") +CML2_CONFIG_FILE = join(BUILDDIR, "cml2_config.out") CML2_CONFIG_H = join(BUILDDIR, "cml2_config.h") CONFIG_H = join("include/l4/config.h") CONFIG_SHELVE_DIR = join(BUILDDIR, "configdata") diff --git a/configure.py b/configure.py index 0835424..db6b564 100755 --- a/configure.py +++ b/configure.py @@ -29,8 +29,13 @@ def cml2_update_config_h(config_h_path, config): def cml2_configure(cml2_config_file): os.system(CML2TOOLSDIR + '/cmlcompile.py -o ' + CML2RULES + ' ' + cml2_config_file) - os.system(CML2TOOLSDIR + '/cmlconfigure.py -c -o ' + CML2_CONFIG_PROPERTIES + ' ' + CML2RULES) - os.system(TOOLSDIR + '/cml2header.py -o ' + CML2_CONFIG_H + ' -i ' + CML2_CONFIG_PROPERTIES) + if not os.path.exists(CML2_CONFIG_FILE): + os.system(CML2TOOLSDIR + '/cmlconfigure.py -c -o ' + \ + CML2_CONFIG_FILE + ' ' + CML2RULES) + else: + os.system(CML2TOOLSDIR + '/cmlconfigure.py -c -o ' + CML2_CONFIG_FILE + \ + ' -i ' + CML2_CONFIG_FILE + ' ' + CML2RULES) + os.system(TOOLSDIR + '/cml2header.py -o ' + CML2_CONFIG_H + ' -i ' + CML2_CONFIG_FILE) if not os.path.exists("build/l4"): os.mkdir("build/l4") shutil.copy(CML2_CONFIG_H, CONFIG_H) diff --git a/loader/SConscript b/loader/SConscript index c472f5a..f5cae18 100644 --- a/loader/SConscript +++ b/loader/SConscript @@ -12,9 +12,6 @@ Import('env') PROJRELROOT = '../../' -# FIXME This may be the scons binary path! But how does the below imports work then? -sys.path.append(os.path.abspath(os.path.join(os.path.dirname(sys.modules['__main__'].__file__), PROJRELROOT))) - from config.projpaths import * from scripts.loader.generate_loader_asm import *