From a9d24e25e86bc396815cd662dd53e56d11d25095 Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Thu, 14 Dec 2000 04:42:38 +0000 Subject: [PATCH] Getting there, but not right. --- util/config/NLBConfig.py | 21 +++++++++++++-------- util/config/test4 | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/util/config/NLBConfig.py b/util/config/NLBConfig.py index 32444fc370..88a38b364f 100644 --- a/util/config/NLBConfig.py +++ b/util/config/NLBConfig.py @@ -425,7 +425,7 @@ def makerule(dir, rule): w = "[" + wspc + "]*" cmd = "([^" + wspc + "]*)" namepat = "(.*)" - pat = cmd + w + ":" + w + cmd + w + ";" + w + rest + w + pat = cmd + w + ":" + w + namepat + w + ";" + w + rest + w print "pat :", pat, ":", rule command_re = re.compile(pat) m = command_re.match(rule) @@ -443,7 +443,7 @@ def addaction(dir, rule): w = "[" + wspc + "]*" namepat = "(.*)" cmd = "([^" + wspc + "]*)" - pat = cmd + w + ":" + w + rest + w + pat = cmd + w + rest + w print "pat :", pat, ":", rule command_re = re.compile(pat) m = command_re.match(rule) @@ -644,8 +644,8 @@ def writemakefile(path): # print out the base rules - for i in range(len(baserules)): - file.write("%s\n" % baserules[i]) +# for i in range(len(baserules)): +# file.write("%s\n" % baserules[i]) # print out any user rules for z in makebaserules.keys(): @@ -689,19 +689,24 @@ command_vals['TOP'] = sys.argv[2] treetop = command_vals['TOP'] # set the default locations for config files -makebase = os.path.join(treetop, "config/make.base") -crt0base = os.path.join(treetop, "config/crt0.base") -ldscriptbase = os.path.join(treetop, "config/ldscript.base") +makebase = os.path.join(treetop, "util/config/make.base") +crt0base = os.path.join(treetop, "util/config/crt0.base") +ldscriptbase = os.path.join(treetop, "util/config/ldscript.base") doconfigfile(treetop, sys.argv[1]) # do standard config files that the user need not specify -# for now, this is just 'lib', but i tmay be more later. +# for now, this is just 'lib', but it may be more later. libdir = treetop + "/src/lib" libconfigfile = libdir + "/Config" print "Process config file: ", libconfigfile doconfigfile(libdir, libconfigfile) +# now read in the base files. +print "Now Process the base files" +print "Makebase is :", makebase, ":" +doconfigfile(treetop, makebase) + # print out command values #print "Command Values:" #for key,val in command_vals.items(): diff --git a/util/config/test4 b/util/config/test4 index 6844bde060..bc6a407aa8 100644 --- a/util/config/test4 +++ b/util/config/test4 @@ -3,7 +3,7 @@ target winfast mainboard leadtek/winfast6300 makerule blah : blah.o ; cc -c blah.c -addaction blah: cc -c blah2.c +addaction blah cc -c blah2.c makedefine THIS=THAT option SERIAL_CONSOLE keyboard pc80