Megatest

Check-in [0e757770a7]
Login
Overview
Comment:Cleaned up deps
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.90
Files: files | file ages | folders
SHA1: 0e757770a7940a77d314357a46e55191cfc5307c
User & Date: matt on 2024-02-15 19:13:45
Other Links: branch diff | manifest | tags
Context
2024-02-15
19:14
Removed junk from Makefile check-in: db2bd38f1e user: matt tags: v1.90
19:13
Cleaned up deps check-in: 0e757770a7 user: matt tags: v1.90
15:00
Added the .import uses back. check-in: 9ec56337cf user: mrwellan tags: v1.90
Changes

Modified Makefile from [ca168cc1aa] to [2b8103e462].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56










57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75




















76
77


78
79




80

81
82





83


84
85
86

87

88
89
90

91
92
93
94

95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261

SHELL=/bin/bash
PREFIX=$(PWD)
CSCOPTS=
INSTALL=install
SRCFILES = runconfig.scm	\
           server.scm keys.scm		\
           ezsteps.scm api.scm		\
           archive.scm env.scm

# cgisetup/models/pgdb.scm

# module source files
MSRCFILES = dbfile.scm debugprint.scm mtargs.scm commonmod.scm dbmod.scm \
            tcp-transportmod.scm rmtmod.scm portlogger.scm apimod.scm \
	    configfmod.scm processmod.scm servermod.scm megatestmod.scm \
	    stml2.scm fsmod.scm cpumod.scm mtmod.scm odsmod.scm \
            pkts.scm testsmod.scm pgdb.scm cookie.scm launchmod.scm \
            subrunmod.scm runsmod.scm tasksmod.scm archivemod.scm \
            ezstepsmod.scm mtbody.scm envmod.scm genexample.scm mutils.scm \
            diff-report.scm tdb.scm vgmod.scm dcommon.scm

transport-mode.scm : transport-mode.scm.template
	cp transport-mode.scm.template transport-mode.scm

dashboard-transport-mode.scm : dashboard-transport-mode.scm.template
	cp dashboard-transport-mode.scm.template dashboard-transport-mode.scm

mtest : transport-mode.scm
dboard : dashboard-transport-mode.scm











# dbmod.import.o is just a hack here

mofiles/mtbody.o     : mofiles/launchmod.o readline-fix.scm mofiles/envmod.o mofiles/genexample.o mofiles/mutils.o mofiles/diff-report.o mofiles/tdb.o
mofiles/dcommon.o    : mofiles/vgmod.o
process.o            : mofiles/processmod.o
mofiles/configfmod.o : mofiles/processmod.o
mofiles/processmod.o : mofiles/commonmod.o
mofiles/servermod.o  : mofiles/commonmod.o
mofiles/rmtmod.o     : mofiles/mtmod.o mofiles/apimod.o
mofiles/dbmod.o      : mofiles/mtmod.o
# mofiles/mtmod.o      : mofiles/tcp-transportmod.o
mofiles/megatestmod.o : mofiles/pkts.o mofiles/servermod.o mofiles/fsmod.o
# mofiles/mtmod.o      : mofiles/testsmod.o
mofiles/subrunmod.o  : mofiles/tasksmod.o
mofiles/dcommon.o    : mofiles/tasksmod.o
mofiles/launchmod.o  : mofiles/subrunmod.o mofiles/runsmod.o
mofiles/launchmod.o  : mofiles/ezstepsmod.o
mofiles/runsmod.o    : mofiles/archivemod.o
mofiles/testsmod.o   : mofiles/dbmod.o





















mofiles/dbfile.o     : \


       mofiles/debugprint.o mofiles/commonmod.o  mofiles/configfmod.o
mofiles/apimod.o : mofiles/commonmod.o mofiles/tcp-transportmod.o mofiles/configfmod.o mofiles/megatestmod.o




mofiles/dbmod.o : mofiles/dbfile.o

mofiles/api.o : mofiles/apimod.o
mofiles/commonmod.o : mofiles/debugprint.o mofiles/stml2.o





mofiles/dbfile.o : mofiles/debugprint.o


mofiles/rmtmod.o mofiles/dbmod.o : mofiles/dbfile.o mofiles/commonmod.o mofiles/debugprint.o
db.o : mofiles/dbmod.o mofiles/dbfile.o
mofiles/debugprint.o : mofiles/mtargs.o

mofiles/tcp-transportmod.o : mofiles/portlogger.o

mofiles/tasksmod.o : mofiles/rmtmod.o mofiles/pgdb.o
mofiles/fsmod.o : mofiles/debugprint.o


# ftail.scm rmtmod.scm commonmod.scm removed
# MSRCFILES = ducttape-lib.scm pkts.scm stml2.scm cookie.scm mutils.scm	\
#             mtargs.scm commonmod.scm dbmod.scm adjutant.scm ulex.scm	\
#             rmtmod.scm apimod.scm


GUISRCF = dashboard-guimonitor.scm

OFILES   = $(SRCFILES:%.scm=%.o)
GOFILES  = $(GUISRCF:%.scm=%.o)

MOFILES = $(addprefix mofiles/,$(MSRCFILES:%.scm=%.o))
# compiled import files
MOIMPFILES = $(MSRCFILES:%.scm=%.import.o)

%.import.o : %.import.scm
	csc $(CSCOPTS) -unit $*.import -c $*.import.scm -o $*.import.o

# I'm not sure the cp is a good idea, changed a lot of things and it may not have been necessary...
# mofiles/%.o  %.import.scm : %.scm megatest-fossil-hash.scm
#	@[ -e mofiles ] || mkdir -p mofiles
#	csc $(CSCOPTS) -I mofiles -I $* -J -c $< -o $*.o
#	cp $*.o mofiles/$*.o
#	@touch $*.import.scm # ensure it is touched after the .o is made

%.import.scm mofiles/%.o : %.scm
	@mkdir -p mofiles
	csc $(CSCOPTS) -J -c $< -o mofiles/$*.o
	@if [[ -e $*.import.scm ]];then touch $*.import.scm;fi # ensure it is touched after the .o is made

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}')

ifeq ($(MTESTHASH),)
$(error MTESTHASH is broken!)
endif

# CSIPATH=$(shell which csi)
# CKPATH=$(shell dirname $(shell dirname $(CSIPATH)))
# ARCHSTR=$(shell uname -m)_$(shell uname -r)
# BASH_MACHTYPE=$(shell bash -c "echo \$$MACHTYPE")
# ARCHSTR=$(BASH_MACHTYPE)_$(shell lsb_release -sr)
ARCHSTR=$(shell if [[ -e /usr/bin/sw_vers ]]; then /usr/bin/sw_vers -productVersion; else lsb_release -sr; fi)
# ARCHSTR=$(shell bash -c "echo \$$MACHTYPE")

PNGFILES = $(shell cd docs/manual;ls *png)


mtest: $(OFILES) readline-fix.scm $(MOFILES) $(MOIMPFILES) megatest.o  megatest-version.scm
	csc $(CSCOPTS) $(OFILES) $(MOFILES) $(MOIMPFILES) megatest.o -o mtest

showmtesthash:
	@echo $(MTESTHASH)

dboard : $(OFILES) $(GOFILES) dashboard.scm $(MOFILES) $(MOIMPFILES) megatest-version.scm megatest-fossil-hash.scm
	csc $(CSCOPTS) $(OFILES) dashboard.scm $(GOFILES) $(MOFILES) $(MOIMPFILES) -o dboard

mtut: $(OFILES) $(MOFILES) $(MOIMPFILES) megatest-fossil-hash.scm mtut.scm megatest-version.scm 
	csc $(CSCOPTS) $(OFILES) $(MOFILES)  $(MOIMPFILES) mtut.scm -o mtut

# include makefile.inc

# TCMTOBJS = \
# 	api.o \
# 	archive.o \
# 	cgisetup/models/pgdb.o \
# 	common.o \
# 	configf.o \
# 	db.o \
# 	env.o \
# 	keys.o \
# 	launch.o \
# 	margs.o \
# 	mt.o \
# 	process.o \
# 	rmt.o \
# 	runconfig.o \
# 	runs.o \
# 	server.o \
# 	tasks.o \
# 	tdb.o \
# 	tests.o \
#         ezsteps.o
# 
# #        mofiles/rmtmod.o \
# #        mofiles/commonmod.o \
# 
# tcmt : $(TCMTOBJS) tcmt.scm megatest-version.scm $(MOFILES) $(MOIMPFILES)
# 	csc $(CSCOPTS) $(TCMTOBJS) $(MOFILES) $(MOIMPFILES) tcmt.scm -o tcmt

# install documentation to $(PREFIX)/docs
# DOES NOT REBUILD DOCS
#
$(PREFIX)/share/docs/megatest_manual.html : docs/manual/megatest_manual.html
	mkdir -p $(PREFIX)/share/docs
	$(INSTALL) docs/manual/megatest_manual.html $(PREFIX)/share/docs/megatest_manual.html
	for png in $(PNGFILES);do $(INSTALL) docs/manual/$$png $(PREFIX)/share/docs/$$png;done

# add a fake dependency so this doens't copy everytime
$(PREFIX)/share/js/jquery-3.1.0.slim.min.js : # .fslckout
	mkdir -p $(PREFIX)/share/js
	fossil wiki export java-script-lib > $(PREFIX)/share/js/jquery-3.1.0.slim.min.js

$(PREFIX)/share/db/mt-pg.sql : mt-pg.sql
	mkdir -p $(PREFIX)/share/db
	$(INSTALL) mt-pg.sql $(PREFIX)/share/db/mt-pg.sql

# Special dependencies for the includes
$(MOFILE) $(MOIMPFILES) : megatest-fossil-hash.scm

mofiles/commonmod.o : mofiles/debugprint.o megatest-fossil-hash.scm
common.o : mofiles/commonmod.o
mofiles/configfmod.o : mofiles/commonmod.o configf-guts.scm

# mofiles/dbmod.o : mofiles/configfmod.o

# commonmod.o dashboard.o megatest.o tcmt.o apimod.o : megatest-fossil-hash.scm

tests.o db.o launch.o \
dashboard-guimonitor.o dashboard-main.o	\
monitor.o dashboard.o archive.o megatest.o : db_records.scm megatest-fossil-hash.scm

tests.o dashboard.o dashboard-main.o  : run_records.scm

db.o ezsteps.o keys.o launch.o megatest.o monitor.o tests.o : key_records.scm
db.o api.o : mofiles/dbmod.o mofiles/dbfile.o mofiles/debugprint.o mofiles/commonmod.o dbmod.import.o

tests.o tasks.o dashboard-tasks.o : task_records.scm

# mofiles-made : $(MOFILES)
# 	make $(MOIMPFILES)
# 	touch mofiles-made

megatest.o : megatest-fossil-hash.scm megatest-version.scm $(MOFILES) $(MOIMPFILES)

common.scm configf.scm dashboard-guimonitor.scm dashboard.scm dcommon.scm ezsteps.scm index-tree.scm keys.scm launch.scm megatest.scm monitor.scm mt.scm newdashboard.scm runconfig.scm server.scm tdb.scm : common_records.scm megatest-version.scm

common_records.scm : altdb.scm

mofiles/dbfile.o : mofiles/commonmod.o

# mofiles/stml2.o : mofiles/cookie.o
# configf.o : mofiles/commonmod.o

dashboard.o : megatest-version.scm

dcommon.o : run_records.scm

mofiles/stml2.o : mofiles/cookie.o

# # special include based modules
# mofiles/pkts.o      : pkts/pkts.scm
# mofiles/stml2.o     : cookie.o
# # mofiles/mtargs.o    : mtargs/mtargs.scm
# # mofiles/mtconfigf.o : mtconfigf/mtconfigf.scm
# mofiles/ulex.o      : ulex/ulex.scm
# mofiles/mutils.o    : mutils/mutils.scm
# mofiles/cookie.o    : stml2/cookie.scm
# mofiles/stml2.o     : stml2/stml2.scm

# for the modularized stuff
mofiles/rmtmod.o : 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

$(OFILES) $(GOFILES) : common_records.scm 

%.o : %.scm $(MOFILES)







|


|

















|


>
>
>
>
>
>
>
>
>
>


|
|
|
|
|
|
|
|
<
|
<
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
>
>
|
<
>
>
>
>
|
>
|
|
>
>
>
>
>
|
>
>
|
|
|
>
|
>
|
|
|
>
|
<
<
<
>













<
<
<
<
<
<
<














<
<
<
<
<

<
















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

77

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135



136
137
138
139
140
141
142
143
144
145
146
147
148
149







150
151
152
153
154
155
156
157
158
159
160
161
162
163





164

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180






























181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200





















































201
202
203
204
205
206
207

SHELL=/bin/bash
PREFIX=$(PWD)
CSCOPTS=
INSTALL=install
SRCFILES = runconfig.scm	\
           server.scm keys.scm		\
           ezsteps.scm \
           archive.scm env.scm

pgdb.scm :  cgisetup/models/pgdb.scm

# module source files
MSRCFILES = dbfile.scm debugprint.scm mtargs.scm commonmod.scm dbmod.scm \
            tcp-transportmod.scm rmtmod.scm portlogger.scm apimod.scm \
	    configfmod.scm processmod.scm servermod.scm megatestmod.scm \
	    stml2.scm fsmod.scm cpumod.scm mtmod.scm odsmod.scm \
            pkts.scm testsmod.scm pgdb.scm cookie.scm launchmod.scm \
            subrunmod.scm runsmod.scm tasksmod.scm archivemod.scm \
            ezstepsmod.scm mtbody.scm envmod.scm genexample.scm mutils.scm \
            diff-report.scm tdb.scm vgmod.scm dcommon.scm

transport-mode.scm : transport-mode.scm.template
	cp transport-mode.scm.template transport-mode.scm

dashboard-transport-mode.scm : dashboard-transport-mode.scm.template
	cp dashboard-transport-mode.scm.template dashboard-transport-mode.scm

mtest : transport-mode.scm unitdeps.pdf
dboard : dashboard-transport-mode.scm

# include the generated dependencies
include make.inc

make.inc : megatest-fossil-hash.scm
mofiles/mtargs.o mofiles/cookie.o : make.inc
megatest.o : megatest-fossil-hash.scm megatest-version.scm $(MOFILES) $(MOIMPFILES)

# special cases due to source files not in current directory
mofiles/pgdb.o : mofiles/configfmod.o mofiles/mtargs.o mofiles/debugprint.o

# dbmod.import.o is just a hack here

#  mofiles/mtbody.o     : mofiles/launchmod.o readline-fix.scm mofiles/envmod.o mofiles/genexample.o mofiles/mutils.o mofiles/diff-report.o mofiles/tdb.o
#  mofiles/dcommon.o    : mofiles/vgmod.o
#  process.o            : mofiles/processmod.o
#  mofiles/configfmod.o : mofiles/processmod.o
#  mofiles/processmod.o : mofiles/commonmod.o
#  mofiles/servermod.o  : mofiles/commonmod.o
#  mofiles/rmtmod.o     : mofiles/mtmod.o mofiles/apimod.o
#  mofiles/dbmod.o      : mofiles/mtmod.o

#  mofiles/megatestmod.o : mofiles/pkts.o mofiles/servermod.o mofiles/fsmod.o

#  mofiles/subrunmod.o  : mofiles/tasksmod.o
#  mofiles/dcommon.o    : mofiles/tasksmod.o
#  mofiles/launchmod.o  : mofiles/subrunmod.o mofiles/runsmod.o
#  mofiles/launchmod.o  : mofiles/ezstepsmod.o
#  mofiles/runsmod.o    : mofiles/archivemod.o
#  mofiles/testsmod.o   : mofiles/dbmod.o
#  mofiles/dbfile.o     : \
#         mofiles/debugprint.o mofiles/commonmod.o  mofiles/configfmod.o
#  mofiles/apimod.o : mofiles/commonmod.o mofiles/tcp-transportmod.o mofiles/configfmod.o mofiles/megatestmod.o
#  mofiles/dbmod.o : mofiles/dbfile.o
#  mofiles/api.o : mofiles/apimod.o
#  mofiles/commonmod.o : mofiles/debugprint.o mofiles/stml2.o
#  mofiles/dbfile.o : mofiles/debugprint.o
#  mofiles/rmtmod.o mofiles/dbmod.o : mofiles/dbfile.o mofiles/commonmod.o mofiles/debugprint.o
#  db.o : mofiles/dbmod.o mofiles/dbfile.o
#  mofiles/debugprint.o : mofiles/mtargs.o
#  mofiles/tcp-transportmod.o : mofiles/portlogger.o
#  mofiles/tasksmod.o : mofiles/rmtmod.o mofiles/pgdb.o
#  mofiles/fsmod.o : mofiles/debugprint.o
#  mofiles/commonmod.o : mofiles/debugprint.o megatest-fossil-hash.scm
#  common.o : mofiles/commonmod.o
#  mofiles/configfmod.o : mofiles/commonmod.o configf-guts.scm
#  
#  tests.o db.o launch.o \
#  dashboard-guimonitor.o dashboard-main.o	\
#  monitor.o dashboard.o archive.o megatest.o : db_records.scm megatest-fossil-hash.scm
#  
#  tests.o dashboard.o dashboard-main.o  : run_records.scm
#  
#  db.o ezsteps.o keys.o launch.o megatest.o monitor.o tests.o : key_records.scm
#  db.o api.o : mofiles/dbmod.o mofiles/dbfile.o mofiles/debugprint.o mofiles/commonmod.o dbmod.import.o

#  common.scm configf.scm dashboard-guimonitor.scm dashboard.scm dcommon.scm ezsteps.scm index-tree.scm keys.scm launch.scm megatest.scm monitor.scm mt.scm newdashboard.scm runconfig.scm server.scm tdb.scm : common_records.scm megatest-version.scm
#  
#  common_records.scm : altdb.scm
#  
#  mofiles/dbfile.o : mofiles/commonmod.o
#  
#  # mofiles/stml2.o : mofiles/cookie.o
#  # configf.o : mofiles/commonmod.o
#  
#  dashboard.o : megatest-version.scm
#  
#  dcommon.o : run_records.scm
#  
#  mofiles/stml2.o : mofiles/cookie.o
#  
#  # # special include based modules
#  # mofiles/pkts.o      : pkts/pkts.scm
#  # mofiles/stml2.o     : cookie.o
#  # # mofiles/mtargs.o    : mtargs/mtargs.scm
#  # # mofiles/mtconfigf.o : mtconfigf/mtconfigf.scm
#  # mofiles/ulex.o      : ulex/ulex.scm
#  # mofiles/mutils.o    : mutils/mutils.scm
#  # mofiles/cookie.o    : stml2/cookie.scm
#  # mofiles/stml2.o     : stml2/stml2.scm
#  
#  # for the modularized stuff
#  mofiles/rmtmod.o : mofiles/commonmod.o



#  

GUISRCF = dashboard-guimonitor.scm

OFILES   = $(SRCFILES:%.scm=%.o)
GOFILES  = $(GUISRCF:%.scm=%.o)

MOFILES = $(addprefix mofiles/,$(MSRCFILES:%.scm=%.o))
# compiled import files
MOIMPFILES = $(MSRCFILES:%.scm=%.import.o)

%.import.o : %.import.scm
	csc $(CSCOPTS) -unit $*.import -c $*.import.scm -o $*.import.o








%.import.scm mofiles/%.o : %.scm
	@mkdir -p mofiles
	csc $(CSCOPTS) -J -c $< -o mofiles/$*.o
	@if [[ -e $*.import.scm ]];then touch $*.import.scm;fi # ensure it is touched after the .o is made

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}')

ifeq ($(MTESTHASH),)
$(error MTESTHASH is broken!)
endif






ARCHSTR=$(shell if [[ -e /usr/bin/sw_vers ]]; then /usr/bin/sw_vers -productVersion; else lsb_release -sr; fi)


PNGFILES = $(shell cd docs/manual;ls *png)


mtest: $(OFILES) readline-fix.scm $(MOFILES) $(MOIMPFILES) megatest.o  megatest-version.scm
	csc $(CSCOPTS) $(OFILES) $(MOFILES) $(MOIMPFILES) megatest.o -o mtest

showmtesthash:
	@echo $(MTESTHASH)

dboard : $(OFILES) $(GOFILES) dashboard.scm $(MOFILES) $(MOIMPFILES) megatest-version.scm megatest-fossil-hash.scm
	csc $(CSCOPTS) $(OFILES) dashboard.scm $(GOFILES) $(MOFILES) $(MOIMPFILES) -o dboard

mtut: $(OFILES) $(MOFILES) $(MOIMPFILES) megatest-fossil-hash.scm mtut.scm megatest-version.scm 
	csc $(CSCOPTS) $(OFILES) $(MOFILES)  $(MOIMPFILES) mtut.scm -o mtut































# install documentation to $(PREFIX)/docs
# DOES NOT REBUILD DOCS
#
$(PREFIX)/share/docs/megatest_manual.html : docs/manual/megatest_manual.html
	mkdir -p $(PREFIX)/share/docs
	$(INSTALL) docs/manual/megatest_manual.html $(PREFIX)/share/docs/megatest_manual.html
	for png in $(PNGFILES);do $(INSTALL) docs/manual/$$png $(PREFIX)/share/docs/$$png;done

# add a fake dependency so this doens't copy everytime
$(PREFIX)/share/js/jquery-3.1.0.slim.min.js : # .fslckout
	mkdir -p $(PREFIX)/share/js
	fossil wiki export java-script-lib > $(PREFIX)/share/js/jquery-3.1.0.slim.min.js

$(PREFIX)/share/db/mt-pg.sql : mt-pg.sql
	mkdir -p $(PREFIX)/share/db
	$(INSTALL) mt-pg.sql $(PREFIX)/share/db/mt-pg.sql

# Special dependencies for the includes
$(MOFILE) $(MOIMPFILES) : megatest-fossil-hash.scm






















































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

$(OFILES) $(GOFILES) : common_records.scm 

%.o : %.scm $(MOFILES)
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
	if  csi -ne '(import mysql-client)'&> /dev/null;then \
           echo "(import mysql-client)(hash-table-set! *available-db* 'mysql #t)" >> altdb.scm; \
	fi
	if csi -ne '(import postgresql)'&> /dev/null;then \
	   echo "(import postgresql)(hash-table-set! *available-db* 'postgresql #t)" >> altdb.scm;\
	fi


unitdeps.dot : *mod.scm ./utils/plot-uses Makefile
	./utils/plot-uses todot processmod.import,dbfile.import,dbmod.import,configfmod.import,mtmod.import,procesmod.import,commonmod.import,mtargs.import,mtargs,debugprint $$(ls *.scm|grep -v import) > unitdeps.dot

# ./utils/plot-uses todot commonmod,portlogger,stml2,debugprint,mtargs apimod.scm commonmod.scm configfmod.scm dbmod.scm megatestmod.scm mtmod.scm processmod.scm rmtmod.scm servermod.scm tcp-transportmod.scm > uses.dot ; dot uses.dot -Tpdf -o uses.pdf

#  apimod.scm commonmod.scm configfmod.scm dbmod.scm megatestmod.scm mtmod.scm processmod.scm rmtmod.scm servermod.scm tcp-transportmod.scm testsmod.scm

uses.pdf : *scm utils/plot-uses  Makefile
	./utils/plot-uses todot portlogger,stml2,debugprint,mtargs *mod.scm launch.scm > uses-in.dot







|
|
|







408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
	if  csi -ne '(import mysql-client)'&> /dev/null;then \
           echo "(import mysql-client)(hash-table-set! *available-db* 'mysql #t)" >> altdb.scm; \
	fi
	if csi -ne '(import postgresql)'&> /dev/null;then \
	   echo "(import postgresql)(hash-table-set! *available-db* 'postgresql #t)" >> altdb.scm;\
	fi

DOTIGNORES= processmod.import,dbfile.import,dbmod.import,configfmod.import,mtmod.import,processmod.import,commonmod.import,mtargs.import
unitdeps.dot make.inc : *mod.scm ./utils/plot-uses Makefile
	./utils/plot-uses todot $(DOTIGNORES) $$(ls *.scm|grep -v import) > unitdeps.dot

# ./utils/plot-uses todot commonmod,portlogger,stml2,debugprint,mtargs apimod.scm commonmod.scm configfmod.scm dbmod.scm megatestmod.scm mtmod.scm processmod.scm rmtmod.scm servermod.scm tcp-transportmod.scm > uses.dot ; dot uses.dot -Tpdf -o uses.pdf

#  apimod.scm commonmod.scm configfmod.scm dbmod.scm megatestmod.scm mtmod.scm processmod.scm rmtmod.scm servermod.scm tcp-transportmod.scm testsmod.scm

uses.pdf : *scm utils/plot-uses  Makefile
	./utils/plot-uses todot portlogger,stml2,debugprint,mtargs *mod.scm launch.scm > uses-in.dot

Deleted api.scm version [185cc0c63f].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;;======================================================================
;; Copyright 2006-2013, Matthew Welland.
;; 
;; This file is part of Megatest.
;; 
;;     Megatest is free software: you can redistribute it and/or modify
;;     it under the terms of the GNU General Public License as published by
;;     the Free Software Foundation, either version 3 of the License, or
;;     (at your option) any later version.
;; 
;;     Megatest is distributed in the hope that it will be useful,
;;     but WITHOUT ANY WARRANTY; without even the implied warranty of
;;     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;     GNU General Public License for more details.
;; 
;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.
;;
;;======================================================================

(declare (unit api))
(declare (uses apimod))

(declare (uses debugprint))
(declare (uses commonmod))
(declare (uses dbmod))
(declare (uses dbfile))
(declare (uses tcp-transportmod))

(import commonmod)
(import apimod)
(import dbmod)
(import dbfile)
(import debugprint)
(import tcp-transportmod)

(use srfi-69
     srfi-18
     posix
     matchable
     s11n
     typed-records)


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
























































































Modified archivemod.scm from [2d74ee0e1f] to [004f14dbe5].

31
32
33
34
35
36
37

38
39
40
41
42
43
44
(declare (uses commonmod))
(declare (uses configfmod))
(declare (uses fsmod))
(declare (uses processmod))
(declare (uses mtmod))
(declare (uses dbmod))
(declare (uses dbfile))


(use srfi-69)

(module archivemod
	(
	 archive:get-archive-disks
	 archive:allocate-new-archive-block







>







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(declare (uses commonmod))
(declare (uses configfmod))
(declare (uses fsmod))
(declare (uses processmod))
(declare (uses mtmod))
(declare (uses dbmod))
(declare (uses dbfile))
(declare (uses rmtmod))

(use srfi-69)

(module archivemod
	(
	 archive:get-archive-disks
	 archive:allocate-new-archive-block

Modified dashboard-guimonitor.scm from [6f526827b3] to [d5889ea640].

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

(declare (unit dashboard-guimonitor))
;; (declare (uses common))
(declare (uses keys))
(declare (uses commonmod))
(import commonmod)

;; (include "common_records.scm")
;; (include "db_records.scm")
(include "run_records.scm")
(include "task_records.scm")

(define (control-panel db tdb keys)
  (let* ((var-params (make-hash-table)) ;; register all the widgets here for querying on run, rollup, remove?
	 (key-params (make-hash-table))
	 (monitordat '()) ;; list of monitor records
	 (keyentries (iup:frame 
		      #:title "Keys"







<
<

<







33
34
35
36
37
38
39


40

41
42
43
44
45
46
47

(declare (unit dashboard-guimonitor))
;; (declare (uses common))
(declare (uses keys))
(declare (uses commonmod))
(import commonmod)



(include "run_records.scm")


(define (control-panel db tdb keys)
  (let* ((var-params (make-hash-table)) ;; register all the widgets here for querying on run, rollup, remove?
	 (key-params (make-hash-table))
	 (monitordat '()) ;; list of monitor records
	 (keyentries (iup:frame 
		      #:title "Keys"

Modified dashboard.scm from [1aaef78a2b] to [2c10ce13af].

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
	runsmod
	testsmod
	vgmod
	dcommon
	)

(include "common_records.scm")
;; (include "db_records.scm")
(include "run_records.scm")
(include "task_records.scm")
;; (include "megatest-version.scm")
(include "megatest-fossil-hash.scm")

;; set some parameters here - these need to be put in something that can be loaded from other
;; executables such as dashboard and mtutil
;;
(include "dashboard-transport-mode.scm")
(dbfile:db-init-proc db:initialize-main-db)







<

<
<







98
99
100
101
102
103
104

105


106
107
108
109
110
111
112
	runsmod
	testsmod
	vgmod
	dcommon
	)

(include "common_records.scm")

(include "run_records.scm")


(include "megatest-fossil-hash.scm")

;; set some parameters here - these need to be put in something that can be loaded from other
;; executables such as dashboard and mtutil
;;
(include "dashboard-transport-mode.scm")
(dbfile:db-init-proc db:initialize-main-db)

Modified dcommon.scm from [452b8810b3] to [70c2dabee7].

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
	tasksmod
	dbfile
	servermod
	)

(include "megatest-version.scm")
(include "common_records.scm")
;; (include "db_records.scm")
;; (include "key_records.scm")
(include "run_records.scm")

;; yes, this is non-ideal 
(define dashboard:update-summary-tab #f)
(define dashboard:update-servers-table #f)

;;======================================================================







<
<







86
87
88
89
90
91
92


93
94
95
96
97
98
99
	tasksmod
	dbfile
	servermod
	)

(include "megatest-version.scm")
(include "common_records.scm")


(include "run_records.scm")

;; yes, this is non-ideal 
(define dashboard:update-summary-tab #f)
(define dashboard:update-servers-table #f)

;;======================================================================
6286
6287
6288
6289
6290
6291
6292
6293

6294
6295
6296
6297
6298
6299
6300
  ;; (print "Starting dashboard main")
    
  (let* ((mtdb-path (conc *toppath* "/.mtdb/main.db"))
         (target (args:get-arg "-target"))
         (commondat       (dboard:commondat-make)))
    (if target
        (begin
          (args:remove-arg-from-ht "-target")

          (dboard:commondat-target-set! commondat target)
        )
    )

    (if (not (launch:setup))
        (begin
          (debug:print 0 *default-log-port* "Failed to find megatest.config, exiting") 







|
>







6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
  ;; (print "Starting dashboard main")
    
  (let* ((mtdb-path (conc *toppath* "/.mtdb/main.db"))
         (target (args:get-arg "-target"))
         (commondat       (dboard:commondat-make)))
    (if target
        (begin
          ;; (args:remove-arg-from-ht "-target") ;; we have old versions of mtargs installed as eggs - uncomment this when going to chicken 5 BUG
	  (hash-table-delete! args:arg-hash "-target")
          (dboard:commondat-target-set! commondat target)
        )
    )

    (if (not (launch:setup))
        (begin
          (debug:print 0 *default-log-port* "Failed to find megatest.config, exiting") 

Modified megatest.scm from [fee9940301] to [95dfa323e8].

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
(declare (uses cpumod))
(declare (uses cpumod.import))
(declare (uses runsmod))
(declare (uses ezstepsmod))
(declare (uses launchmod))

(declare (uses tdb))
(declare (uses api))
(declare (uses env))
(declare (uses diff-report))
(declare (uses server))
(declare (uses genexample))
(declare (uses mtbody))

(import csi)







<







71
72
73
74
75
76
77

78
79
80
81
82
83
84
(declare (uses cpumod))
(declare (uses cpumod.import))
(declare (uses runsmod))
(declare (uses ezstepsmod))
(declare (uses launchmod))

(declare (uses tdb))

(declare (uses env))
(declare (uses diff-report))
(declare (uses server))
(declare (uses genexample))
(declare (uses mtbody))

(import csi)

Modified mtbody.scm from [e2a9979161] to [ebd166c160].

19
20
21
22
23
24
25

26
27
28
29

30
31

32
33
34
35


36
37
38


39


40


41

42
43
44
45
46
47
48
;;======================================================================

;;======================================================================
;;   All the crud that was in megatest.scm
;;======================================================================

(declare (unit mtbody))

(declare (uses debugprint))
(declare (uses mtargs))
(declare (uses commonmod))
(declare (uses configfmod))

(declare (uses dbmod))
(declare (uses dbfile))

(declare (uses envmod))
(declare (uses apimod))
(declare (uses genexample))
(declare (uses rmtmod))


(declare (uses archivemod))
(declare (uses mutils))
(declare (uses odsmod))


(declare (uses testsmod))


(declare (uses diff-report))


(declare (uses tdb))


(use srfi-69)
(import csi)

(module mtbody
	*
	







>
|
|


>

|
>

|

|
>
>
|


>
>
|
>
>
|
>
>

>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
;;======================================================================

;;======================================================================
;;   All the crud that was in megatest.scm
;;======================================================================

(declare (unit mtbody))

(declare (uses apimod))
(declare (uses archivemod))
(declare (uses commonmod))
(declare (uses configfmod))
(declare (uses dbfile))
(declare (uses dbmod))
(declare (uses debugprint))
(declare (uses diff-report))
(declare (uses envmod))
(declare (uses fsmod))
(declare (uses genexample))
(declare (uses launchmod))
(declare (uses megatestmod))
(declare (uses mtargs))
(declare (uses mtmod))
(declare (uses mutils))
(declare (uses odsmod))
(declare (uses portlogger))
(declare (uses processmod))
(declare (uses rmtmod))
(declare (uses runsmod))
(declare (uses servermod))
(declare (uses stml2))
(declare (uses tasksmod))
(declare (uses tcp-transportmod))
(declare (uses tdb))
(declare (uses testsmod))

(use srfi-69)
(import csi)

(module mtbody
	*
	

Modified stml2.scm from [63b057818a] to [d0ff6702c9].

15
16
17
18
19
20
21

22
23
;; 
;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.

;;======================================================================

(declare (unit stml2))


(include "stml2/stml2.scm")







>


15
16
17
18
19
20
21
22
23
24
;; 
;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.

;;======================================================================

(declare (unit stml2))
(declare (uses cookie))

(include "stml2/stml2.scm")

Deleted task_records.scm version [6b67eb70ad].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
;;======================================================================
;; Copyright 2006-2012, Matthew Welland.
;; 
;; This file is part of Megatest.
;; 
;;     Megatest is free software: you can redistribute it and/or modify
;;     it under the terms of the GNU General Public License as published by
;;     the Free Software Foundation, either version 3 of the License, or
;;     (at your option) any later version.
;; 
;;     Megatest is distributed in the hope that it will be useful,
;;     but WITHOUT ANY WARRANTY; without even the implied warranty of
;;     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;     GNU General Public License for more details.
;; 
;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.
;;======================================================================

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






































Modified tasksmod.scm from [f345d4de00] to [9718f19366].

130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
	servermod
	processmod
	pgdb
	mtmod
	megatestmod
	)

(include "task_records.scm")
;; (include "db_records.scm")

;;======================================================================
;; Tasks db
;;======================================================================

(define (tasks:get-task-db-path)
  (let ((dbdir  (or (configf:lookup *configdat* "setup" "monitordir")
		    (configf:lookup *configdat* "setup" "dbdir")







<
<
<







130
131
132
133
134
135
136



137
138
139
140
141
142
143
	servermod
	processmod
	pgdb
	mtmod
	megatestmod
	)




;;======================================================================
;; Tasks db
;;======================================================================

(define (tasks:get-task-db-path)
  (let ((dbdir  (or (configf:lookup *configdat* "setup" "monitordir")
		    (configf:lookup *configdat* "setup" "dbdir")

Modified utils/plot-uses.scm from [fc6b8a9e1d] to [9db483f300].

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

59



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

77
78
79
80
81
82
83
84

85
86
87
88
89
90
91
(define unituses-rx (regexp "^\\(declare \\((unit|uses) ([^\\(\\)]+)\\).*"))

(define (print-err . data)
  (with-output-to-port (current-error-port)
    (lambda ()
      (apply print data))))

(define (process-file ignores fname)
  (with-input-from-file fname
    (lambda ()
      (let loop ((modname "DUMMYMOD"))
	(let* ((inl (read-line)))
	  (if (eof-object? inl)
	      #t
	      (match (string-search unituses-rx inl)
 	         ((_ dtype unitname)
		  (if (equal? dtype "unit")
		      (loop unitname)
		      (begin
			(if (equal? dtype "uses")
			    (if (not (or (member modname '("DUMMYMOD"))
					 (member modname ignores)
					 (member unitname ignores)))

				(print "  \""unitname"\" -> \""modname"\";"))



			    (print-err "ERROR: bad declare line \""inl"\""))
			(loop modname))))
		 (else
		  (loop modname)))))))))

;; ./utils/plot-uses todot portlogger,stml2,debugprint,mtargs
;; apimod.scm commonmod.scm configfmod.scm dbmod.scm megatestmod.scm
;; mtmod.scm processmod.scm rmtmod.scm servermod.scm
;; tcp-transportmod.scm > uses.dot

;; dot uses.dot -Tpdf -o uses.pdf


(define (main)
  (match (command-line-arguments)
    (("todot" ignoreunits . files)
     (let* ((ignores (string-split ignoreunits ",")))

       (print-err "Making graph for files: " (string-intersperse files ", "))
       (print "digraph uses_unit {")
       (for-each
	(lambda (fname)
	  (print "// Filename: "fname)
	  (process-file ignores fname))
	files)
       (print "}")))

    (else
     (print-err "Usage: plot-uses todot u1,u2... file1.scm ...")
     (print-err "    where u1,u2... are units to ignore and file1.scm... are the files to process."))))

(main)

)







|







|
|
|
|
|
|
|
|
>
|
>
>
>
|
|
|
|












|
>





|

|
>







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
(define unituses-rx (regexp "^\\(declare \\((unit|uses) ([^\\(\\)]+)\\).*"))

(define (print-err . data)
  (with-output-to-port (current-error-port)
    (lambda ()
      (apply print data))))

(define (process-file ignores fname oup)
  (with-input-from-file fname
    (lambda ()
      (let loop ((modname "DUMMYMOD"))
	(let* ((inl (read-line)))
	  (if (eof-object? inl)
	      #t
	      (match (string-search unituses-rx inl)
 	        ((_ dtype unitname)
		 (if (equal? dtype "unit")
		     (loop unitname)
		     (begin
		       (if (equal? dtype "uses")
			   (if (not (or (member modname '("DUMMYMOD"))
					(member modname ignores)
					(member unitname ignores)))
			       (begin
				 (print "  \""unitname"\" -> \""modname"\";")
				 (with-output-to-port oup
				   (lambda ()
				     (print "mofiles/"modname".o : mofiles/"unitname".o")))))
			   (print-err "ERROR: bad declare line \""inl"\""))
		       (loop modname))))
		(else
		 (loop modname)))))))))

;; ./utils/plot-uses todot portlogger,stml2,debugprint,mtargs
;; apimod.scm commonmod.scm configfmod.scm dbmod.scm megatestmod.scm
;; mtmod.scm processmod.scm rmtmod.scm servermod.scm
;; tcp-transportmod.scm > uses.dot

;; dot uses.dot -Tpdf -o uses.pdf


(define (main)
  (match (command-line-arguments)
    (("todot" ignoreunits . files)
     (let* ((ignores (string-split ignoreunits ","))
	    (oup     (open-output-file "make.inc")))
       (print-err "Making graph for files: " (string-intersperse files ", "))
       (print "digraph uses_unit {")
       (for-each
	(lambda (fname)
	  (print "// Filename: "fname)
	  (process-file ignores fname oup))
	files)
       (print "}")
       (close-output-port oup)))
    (else
     (print-err "Usage: plot-uses todot u1,u2... file1.scm ...")
     (print-err "    where u1,u2... are units to ignore and file1.scm... are the files to process."))))

(main)

)