Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -135,11 +135,13 @@ showmtesthash: @echo $(MTESTHASH) dboard : dashboard.scm $(MOFILES) $(MOIMPFILES) $(GMOFILES) $(GMOIMPFILES) megatest-fossil-hash.scm - csc -k $(CSCOPTS) $(MOFILES) $(MOIMPFILES) $(GMOFILES) $(GMOIMPFILES) dashboard.scm -o dboard + csc -k $(CSCOPTS) $(MOFILES) $(GMOFILES) dashboard.scm -o dboard + +# $(GMOIMPFILES) $(MOIMPFILES) mtut: $(OFILES) $(MOFILES) megatest-fossil-hash.scm mtut.scm csc $(CSCOPTS) $(OFILES) $(MOFILES) mtut.scm -o mtut # include makefile.inc Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -21,11 +21,11 @@ (declare (uses ducttape-lib)) (declare (uses debugprint)) (declare (uses bigmod)) ;; (declare (uses gutils)) -(declare (uses bigmod.import)) +;; (declare (uses bigmod.import)) (declare (uses commonmod)) (declare (uses configfmod)) (declare (uses dashboard-context-menu)) (declare (uses dashboard-tests)) (declare (uses dbmod)) ADDED testbuild/Makefile Index: testbuild/Makefile ================================================================== --- /dev/null +++ testbuild/Makefile @@ -0,0 +1,15 @@ +CSCOPTS= +SRCFILES=m1.scm m2.scm m3.scm + +%.o : %.scm + csc $(CSCOPTS) -J -c $< -o $*.o + +cl : cl.scm m1.o m2.o + csc $(CSCOPTS) m1.o m2.o cl.scm -o cl + +gui : gui.scm m1.o m3.o + csc $(CSCOPTS) m1.o m3.o gui.scm -o gui + + +clean : + rm -f *.o *.import.scm cl gui ADDED testbuild/README Index: testbuild/README ================================================================== --- /dev/null +++ testbuild/README @@ -0,0 +1,5 @@ +This is a minimal set of files to illustrate how Megatest is built. + +NOTE: Missing is an example of how the .import.o files are compiled in to + enable code in evals to access the procedures in modules. + ADDED testbuild/cl.scm Index: testbuild/cl.scm ================================================================== --- /dev/null +++ testbuild/cl.scm @@ -0,0 +1,23 @@ +;; a command line only executable + +(declare (uses m1)) +(declare (uses m2)) + +(module cl-guts + * + +(import scheme + chicken.base + m1 + m2) + +(define (main) + (a) + (b) + (print "I'm main from cl.scm")) + +) + +(import cl-guts) + +(main) ADDED testbuild/gui.scm Index: testbuild/gui.scm ================================================================== --- /dev/null +++ testbuild/gui.scm @@ -0,0 +1,25 @@ +;; a command line only executable + +(declare (uses m1)) +(declare (uses m3)) + +(module gui-guts + * + +(import scheme + chicken.base + m1 + m3 + ) + +(define (main) + (a) + (c) + (print "I'm main from cl.scm, let's start a gui ...") +) + +) + +(import gui-guts) + +(main) ADDED testbuild/m1.scm Index: testbuild/m1.scm ================================================================== --- /dev/null +++ testbuild/m1.scm @@ -0,0 +1,16 @@ +;; a module used by both command line (cl.scm) and gui (gui.scm) + +(declare (unit m1)) + +(module m1 + * + +(import scheme + chicken.base + ) + +(define (a) + (print "I'm from module m1")) + +) + ADDED testbuild/m2.scm Index: testbuild/m2.scm ================================================================== --- /dev/null +++ testbuild/m2.scm @@ -0,0 +1,15 @@ +;; a module used only by the command line executable +;; +(declare (unit m2)) + +(module m2 + * + +(import scheme + chicken.base + ) + +(define (b) + (print "I'm from module m2")) + +) ADDED testbuild/m3.scm Index: testbuild/m3.scm ================================================================== --- /dev/null +++ testbuild/m3.scm @@ -0,0 +1,23 @@ +;; a module used only by gui.scm +;; +(declare (unit m3)) + +(module m3 + * + +(import scheme + chicken.base + iup) + +(define (c) + (print "I'm from module m3") + (show + (dialog + (vbox + (label "Hello, I'm a gui") + (button "Push me to exit" + action: (lambda (obj)(exit))) + ))) + (main-loop)) + +)