Index: Makefile
==================================================================
--- Makefile
+++ Makefile
@@ -164,11 +164,14 @@
dcommon.o : run_records.scm
# Temporary while transitioning to new routine
# runs.o : run-tests-queue-classic.scm run-tests-queue-new.scm
# for the modularized stuff
-$(MOFILES) : mofiles/commonmod.o
+mofiles/commonmod.o : mofiles/configfmod.o
+mofiles/rmtmod.o : mofiles/dbmod.o mofiles/commonmod.o
+
+# $(MOFILES) : mofiles/commonmod.o
megatest-fossil-hash.scm : $(SRCFILES) megatest.scm *_records.scm
echo "(define megatest-fossil-hash \"$(MTESTHASH)\")" > megatest-fossil-hash.new
if ! diff -q megatest-fossil-hash.new megatest-fossil-hash.scm ; then echo copying .new to .scm;cp -f megatest-fossil-hash.new megatest-fossil-hash.scm;fi
Index: commonmod.scm
==================================================================
--- commonmod.scm
+++ commonmod.scm
@@ -17,17 +17,19 @@
;; along with Megatest. If not, see .
;;======================================================================
(declare (unit commonmod))
+(declare (uses configfmod))
(module commonmod
*
(import scheme chicken data-structures extras)
(import (prefix sqlite3 sqlite3:) posix typed-records srfi-18 srfi-69 ports srfi-1 files format)
+(import configfmod)
(include "common_records.scm")
(define (db:dbdat-get-path dbdat)
(if (pair? dbdat)
(cdr dbdat)
Index: configfmod.scm
==================================================================
--- configfmod.scm
+++ configfmod.scm
@@ -17,19 +17,32 @@
;; along with Megatest. If not, see .
;;======================================================================
(declare (unit configfmod))
-(declare (uses commonmod))
+;; (declare (uses commonmod))
(module configfmod
*
(import scheme chicken data-structures extras)
(import (prefix sqlite3 sqlite3:) posix typed-records srfi-18 srfi-69 format ports srfi-1 matchable)
-(import commonmod)
+;; (import commonmod)
;; (use (prefix ulex ulex:))
(include "common_records.scm")
+
+(define (configf:lookup cfgdat section var)
+ (if (hash-table? cfgdat)
+ (let ((sectdat (hash-table-ref/default cfgdat section '())))
+ (if (null? sectdat)
+ #f
+ (let ((match (assoc var sectdat)))
+ (if match ;; (and match (list? match)(> (length match) 1))
+ (cadr match)
+ #f))
+ ))
+ #f))
+
)