@@ -17,11 +17,11 @@ # make install CSCOPTS='-accumulate-profile -profile-name $(PWD)/profile-ww$(shell date +%V.%u)' # rm .o ; make install CSCOPTS='-profile' ; ... ; chicken-profile | less SHELL=/bin/bash PREFIX=$(PWD)/tmpinstall -CSCOPTS= + INSTALL=install SRCFILES = common.scm items.scm launch.scm \ ods.scm runconfig.scm server.scm \ db.scm keys.scm margs.scm megatest-version.scm \ process.scm runs.scm tasks.scm tests.scm genexample.scm \ @@ -30,12 +30,13 @@ 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 # module source files -MSRCFILES = ftail.scm +MSRCFILES = ftail.scm # mtcommon.scm mtdb.scm mtconfigf.scm + # Eggs to install (straightforward ones) EGGS=matchable readline apropos base64 regex-literals format regex-case test coops trace csv \ dot-locking posix-utils posix-extras directory-utils hostinfo tcp-server rpc csv-xml fmt \ json md5 awful http-client spiffy uri-common intarweb spiffy-request-vars \ @@ -45,10 +46,12 @@ OFILES = $(SRCFILES:%.scm=%.o) GOFILES = $(GUISRCF:%.scm=%.o) MOFILES = $(MSRCFILES:%.scm=%.o) + + %.o : %.scm ../adat.scm csc $(CSCOPTS) -J -c $< -o $*.o ADTLSCR=mt_laststep mt_runstep mt_ezstep @@ -57,11 +60,17 @@ MTESTHASH=$(shell fossil info|grep checkout:| awk '{print $$2}') MT_EGGS_BASE=$(PREFIX)/eggs MT_EGGS_DIR=$(MT_EGGS_BASE)/lib/chicken/7 MTEGGS=$(MT_EGGS_DIR)/mtconfigf.so -CHICKEN_REPOSITORY=$(MT_EGGS_BASE) +CHICKEN_REPOSITORY=$(MT_EGGS_DIR) +export CHICKEN_REPOSITORY +CSCOPTS=-Wl,-rpath,$(MT_EGGS_DIR) + + +# prefix commands with $(withenv) following as a means to collect env vars for compilation... +withenv=CHICKEN_REPOSITORY=$(MT_EGGS_DIR) ifeq ($(MTESTHASH),) $(error MTESTHASH is broken!) endif @@ -77,11 +86,11 @@ PNGFILES = $(shell cd docs/manual;ls *png) #all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut ndboard all : $(PREFIX)/bin/.$(ARCHSTR) mtest dboard mtut eggs -mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) +mtest: $(OFILES) readline-fix.scm megatest.o $(MOFILES) $(MTEGGS) csc $(CSCOPTS) $(OFILES) $(MOFILES) megatest.o -o mtest showmtesthash: @echo $(MTESTHASH) @@ -164,11 +173,11 @@ # $(MT_EGGS_DIR) : mkdir -p $(MT_EGGS_DIR) $(MT_EGGS_DIR)/types.db : $(MT_EGGS_DIR) - cp -rs $(CKREPOSITORY)/ $(MT_EGGS_BASE)/lib/chicken/ + cp -rsf $(CKREPOSITORY)/ $(MT_EGGS_BASE)/lib/chicken/ # chicken-install -init $(MT_EGGS_DIR) $(MT_EGGS_DIR)/mtconfigf.so : $(MT_EGGS_DIR)/types.db $(MTUTILS_DIR)/mtconfigf/mtconfigf.scm cd $(MTUTILS_DIR)/mtconfigf && chicken-install -prefix $(MT_EGGS_BASE)