@@ -29,13 +29,10 @@ client.scm mt.scm \ ezsteps.scm lock-queue.scm sdb.scm \ rmt.scm api.scm subrun.scm \ portlogger.scm archive.scm env.scm diff-report.scm cgisetup/models/pgdb.scm -OPENSRC_DIR=../opensrc -MTUTILS_DIR=$(OPENSRC_DIR)/mtutils - # module source files MSRCFILES = ftail.scm mtconfigf.scm # mtcommon.scm mtdb.scm # Eggs to install (straightforward ones) @@ -47,17 +44,14 @@ GUISRCF = dashboard-context-menu.scm dashboard-tests.scm dashboard-guimonitor.scm gutils.scm dcommon.scm tree.scm vg.scm OFILES = $(SRCFILES:%.scm=%.o) GOFILES = $(GUISRCF:%.scm=%.o) -MOFILES = $(addprefix mofiles/,$(MSRCFILES:%.scm=%.o)) +MOFILES = $(MSRCFILES:%.scm=%.o) -mofiles/%.o : %.scm ../adat.scm - mkdir -p mofiles - rm -f $*.import.scm mofiles/$*.import.scm - csc $(CSCOPTS) -J -c $< -o mofiles/$*.o - ln -f $*.import.scm mofiles/$*.import.scm +%.o : %.scm ../adat.scm + csc $(CSCOPTS) -J -c $< -o $*.o ADTLSCR=mt_laststep mt_runstep mt_ezstep HELPERS=$(addprefix $(PREFIX)/bin/,$(ADTLSCR)) DEPLOYHELPERS=$(addprefix deploytarg/,$(ADTLSCR)) MTESTHASH=$(shell fossil info|grep checkout:| awk '{print $$2}') @@ -77,24 +71,27 @@ PNGFILES = $(shell cd docs/manual;ls *png) #all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut ndboard all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut -mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) mofiles/ftail.o +mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) csc $(CSCOPTS) $(OFILES) $(MOFILES) megatest.o -o mtest showmtesthash: @echo $(MTESTHASH) dboard : $(OFILES) $(GOFILES) dashboard.scm $(MOFILES) csc $(CSCOPTS) $(OFILES) dashboard.scm $(GOFILES) $(MOFILES) -o dboard -ndboard : newdashboard.scm $(OFILES) $(GOFILES) - csc $(CSCOPTS) $(OFILES) $(GOFILES) newdashboard.scm -o ndboard +mtut: $(OFILES) $(MOFILES) megatest-fossil-hash.scm mtut.scm + csc $(CSCOPTS) $(OFILES) $(MOFILES) mtut.scm -o mtut -mtut: $(OFILES) megatest-fossil-hash.scm mtut.scm - csc $(CSCOPTS) $(OFILES) mtut.scm -o mtut +# Needed only for adat.scm +OPENSRC_DIR=../opensrc +MTUTILS_DIR=$(OPENSRC_DIR)/mtutils +../adat.scm : $(MTUTILS_DIR)/adat.scm + ln -sf $(PWD)/$< $@ # # stuff for handling external files from opensrc package # mtcommon.scm : $(MTUTILS_DIR)/mtcommon/mtcommon.scm # ln -sf $< $@ # @@ -102,13 +99,10 @@ # ln -sf $< $@ # # mtconfigf.scm : $(MTUTILS_DIR)/mtconfigf/mtconfigf.scm # ln -sf $< $@ # -../adat.scm : $(MTUTILS_DIR)/adat.scm - ln -sf $(PWD)/$< $@ - TCMTOBJS = \ api.o \ archive.o \ cgisetup/models/pgdb.o \ client.o \ @@ -133,11 +127,11 @@ server.o \ tasks.o \ tdb.o \ tests.o \ subrun.o \ - + mtconfigf.o tcmt : $(TCMTOBJS) tcmt.scm csc $(CSCOPTS) $(TCMTOBJS) tcmt.scm -o tcmt # install documentation to $(PREFIX)/docs @@ -155,18 +149,18 @@ $(PREFIX)/share/db/mt-pg.sql : mt-pg.sql mkdir -p $(PREFIX)/share/db $(INSTALL) mt-pg.sql $(PREFIX)/share/db/mt-pg.sql -#multi-dboard : multi-dboard.scm $(OFILES) $(GOFILES) -# csc $(CSCOPTS) $(OFILES) $(GOFILES) multi-dboard.scm -o multi-dboard - -# -# $(PREFIX)/bin/revtagfsl : utils/revtagfsl.scm -# csc utils/revtagfsl.scm -o $(PREFIX)/bin/revtagfsl - +# # Special dependencies for the includes +# + +# anything that depends on the special MOFILES needs to be listed on the left here +launch.o : $(MOFILES) +mtconfigf.o : $(MTUTILS_DIR)/mtconfigf/mtconfigf.scm + tests.o db.o launch.o runs.o dashboard-tests.o dashboard-context-menu.o dashboard-guimonitor.o dashboard-main.o monitor.o dashboard.o \ archive.o megatest.o : db_records.scm tests.o runs.o dashboard.o dashboard-tests.o dashboard-context-menu.o dashboard-main.o : run_records.scm db.o ezsteps.o keys.o launch.o megatest.o monitor.o runs-for-ref.o runs.o tests.o : key_records.scm tests.o tasks.o dashboard-tasks.o : task_records.scm