Megatest

Check-in [653a2890a7]
Login
Overview
Comment:Rework the deps.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65-real-new-runs-view-wip
Files: files | file ages | folders
SHA1: 653a2890a78e461cb5ad23d2930f624e070cad31
User & Date: mrwellan on 2021-02-22 17:33:11
Other Links: branch diff | manifest | tags
Context
2021-02-22
18:56
Fixed/tweaked more deps. check-in: 07b32b8669 user: mrwellan tags: v1.65-real-new-runs-view-wip (unpublished)
17:33
Rework the deps. check-in: 653a2890a7 user: mrwellan tags: v1.65-real-new-runs-view-wip (unpublished)
15:56
Added gendeps.scm check-in: 70d50dde62 user: mrwellan tags: v1.65-real-new-runs-view
Changes

Modified Makefile from [053fff40fb] to [1154ebc6ab].

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
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








+
+
+


-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+



-
+








-
+

-
+

-
+








+
-
+



















-
+







$(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

# Include the generated dependency file
include build.inc

# Special dependencies for the module includes
$(MOFILE) $(MOIMPFILES) : megatest-fossil-hash.scm
megatest.o : $(MOIMPFILES)
mofiles/commonmod.o : megatest-fossil-hash.scm
mofiles/dbmod.o \
      mofiles/servermod.o \
      mofiles/apimod.o \
      mofiles/dcommonmod.o \
      mofiles/ods.o : mofiles/commonmod.o mofiles/configfmod.o

mofiles/dcommonmod.o : mofiles/configfmod.o mofiles/dbmod.o
mofiles/configfmod.o : mofiles/commonmod.o
# mofiles/dbmod.o      : mofiles/configfmod.o
mofiles/rmtmod.o : mofiles/apimod.o
mofiles/servermod.o : mofiles/dbmod.o
common.o : mofiles/commonmod.o

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

tests.o db.o launch.o runs.o dashboard-tests.o				\
# megatest.o : $(MOIMPFILES)
# mofiles/commonmod.o : megatest-fossil-hash.scm
# mofiles/dbmod.o \
#       mofiles/servermod.o \
#       mofiles/apimod.o \
#       mofiles/dcommonmod.o \
#       mofiles/ods.o : mofiles/commonmod.o mofiles/configfmod.o
# 
# mofiles/dcommonmod.o : mofiles/configfmod.o mofiles/dbmod.o
# mofiles/configfmod.o : mofiles/commonmod.o
# # mofiles/dbmod.o      : mofiles/configfmod.o
# mofiles/rmtmod.o : mofiles/apimod.o
# # mofiles/servermod.o : mofiles/dbmod.o
# common.o : mofiles/commonmod.o
# 
# # commonmod.o dashboard.o megatest.o tcmt.o apimod.o : megatest-fossil-hash.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 megatest-fossil-hash.scm

dashboard.o : mofiles/apimod.o
# dashboard.o : mofiles/apimod.o

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

runs.o : test_records.scm
api.o rmt.o db.o : mofiles/apimod.o mofiles/dbmod.o mofiles/rmtmod.o mofiles/ods.o
# api.o rmt.o db.o : mofiles/apimod.o mofiles/dbmod.o mofiles/rmtmod.o mofiles/ods.o

megatest.o : megatest-fossil-hash.scm megatest-version.scm
mofiles/commonmod.o common.o megatest.o dashboard.o : megatest-fossil-hash.scm megatest-version.scm

rmt.scm client.scm common.scm configf.scm dashboard-guimonitor.scm dashboard-tests.scm dashboard.scm db.scm dcommon.scm ezsteps.scm fs-transport.scm http-transport.scm index-tree.scm items.scm keys.scm launch.scm megatest.scm monitor.scm mt.scm newdashboard.scm runconfig.scm runs.scm server.scm tdb.scm tests.scm tree.scm : common_records.scm megatest-version.scm
# rmt.scm client.scm common.scm configf.scm dashboard-guimonitor.scm dashboard-tests.scm dashboard.scm db.scm dcommon.scm ezsteps.scm fs-transport.scm http-transport.scm index-tree.scm items.scm keys.scm launch.scm megatest.scm monitor.scm mt.scm newdashboard.scm runconfig.scm runs.scm server.scm tdb.scm tests.scm tree.scm : common_records.scm megatest-version.scm

common_records.scm : altdb.scm

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

vg.o dashboard.o : vg_records.scm megatest-version.scm

dcommon.o : run_records.scm
dcommon.o : mofiles/dcommonmod.o run_records.scm
# mofiles/dcommonmod.o

mofiles/stml2.o  : mofiles/cookie.o
mofiles/dbmod.o  : mofiles/ods.o
mofiles/rmtmod.o : mofiles/dbmod.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

# Temporary while transitioning to new routine
# runs.o : run-tests-queue-classic.scm  run-tests-queue-new.scm

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

Name change from portlogger-example.scm to attic/portlogger-example.scm.

Added build.inc version [79dd1632c6].




















































































































































































































































































































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
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# To regenerate this file do:
#   (cd utils/;ck52 csc gendeps.scm) && ./utils/gendeps allunits *scm
#   cp allunits.inc build.inc
#

api.o : rmt.o
api.o : db.o
api.o : tasks.o
api.o : mofiles/commonmod.o
api.o : mofiles/apimod.o
api.o : mofiles/dbmod.o
mofiles/apimod.o : mofiles/commonmod.o
archive.o : db.o
archive.o : common.o
archive.o : mofiles/configfmod.o
archive.o : mofiles/commonmod.o
archive.o : mofiles/dbmod.o
client.o : common.o
client.o : db.o
client.o : mofiles/commonmod.o
client.o : mofiles/dbmod.o
client.o : rmt.o
client.o : mofiles/servermod.o
common.o : mofiles/commonmod.o
common.o : mofiles/dbmod.o
common.o : mofiles/configfmod.o
common.o : mofiles/servermod.o
configf.o : process.o
configf.o : env.o
configf.o : keys.o
configf.o : mofiles/commonmod.o
configf.o : mofiles/configfmod.o
mofiles/configfmod.o : mofiles/commonmod.o
dashboard-context-menu.o : common.o
dashboard-context-menu.o : db.o
dashboard-context-menu.o : gutils.o
dashboard-context-menu.o : rmt.o
dashboard-context-menu.o : ezsteps.o
dashboard-context-menu.o : subrun.o
dashboard-context-menu.o : mofiles/commonmod.o
dashboard-context-menu.o : mofiles/configfmod.o
dashboard-context-menu.o : mofiles/dbmod.o
dashboard-guimonitor.o : common.o
dashboard-guimonitor.o : keys.o
dashboard-guimonitor.o : db.o
dashboard-guimonitor.o : tasks.o
dashboard-guimonitor.o : mofiles/commonmod.o
dashboard-guimonitor.o : mofiles/dbmod.o
dashboard-tests.o : common.o
dashboard-tests.o : db.o
dashboard-tests.o : gutils.o
dashboard-tests.o : rmt.o
dashboard-tests.o : ezsteps.o
dashboard-tests.o : subrun.o
dashboard-tests.o : mofiles/commonmod.o
dashboard-tests.o : mofiles/configfmod.o
dashboard-tests.o : mofiles/dbmod.o
dashboard.o : common.o
dashboard.o : margs.o
dashboard.o : keys.o
dashboard.o : items.o
dashboard.o : db.o
dashboard.o : configf.o
dashboard.o : process.o
dashboard.o : launch.o
dashboard.o : runs.o
dashboard.o : dashboard-tests.o
dashboard.o : dashboard-guimonitor.o
dashboard.o : tree.o
dashboard.o : dcommon.o
dashboard.o : dashboard-context-menu.o
dashboard.o : vg.o
dashboard.o : subrun.o
dashboard.o : mt.o
dashboard.o : mofiles/commonmod.o
# dashboard.o : commonmod.import.o
dashboard.o : mofiles/configfmod.o
# dashboard.o : configfmod.import.o
dashboard.o : mofiles/dcommonmod.o
# dashboard.o : dcommonmod.import.o
dashboard.o : mofiles/apimod.o
dashboard.o : mofiles/dbmod.o
dashboard.o : mofiles/servermod.o
db.o : common.o
db.o : keys.o
db.o : client.o
db.o : mt.o
db.o : mofiles/commonmod.o
db.o : mofiles/configfmod.o
db.o : mofiles/dbmod.o
db.o : mofiles/servermod.o
mofiles/dbmod.o : mofiles/commonmod.o
mofiles/dbmod.o : ods.o
mofiles/dbmod.o : mofiles/configfmod.o
dcommon.o : gutils.o
dcommon.o : db.o
dcommon.o : mofiles/commonmod.o
dcommon.o : mofiles/dbmod.o
dcommon.o : mofiles/configfmod.o
dcommon.o : mofiles/dcommonmod.o
dcommon.o : mofiles/servermod.o
mofiles/dcommonmod.o : mofiles/commonmod.o
mofiles/dcommonmod.o : mofiles/configfmod.o
diff-report.o : common.o
diff-report.o : rmt.o
diff-report.o : mofiles/commonmod.o
env.o : mofiles/commonmod.o
ezsteps.o : db.o
ezsteps.o : common.o
ezsteps.o : items.o
ezsteps.o : runconfig.o
ezsteps.o : mofiles/commonmod.o
ezsteps.o : mofiles/configfmod.o
ezsteps.o : mofiles/dbmod.o
fs-transport.o : common.o
fs-transport.o : db.o
fs-transport.o : tests.o
fs-transport.o : mofiles/commonmod.o
fs-transport.o : mofiles/dbmod.o
genexample.o : mofiles/commonmod.o
http-transport.o : common.o
http-transport.o : db.o
http-transport.o : tests.o
http-transport.o : server.o
http-transport.o : portlogger.o
http-transport.o : rmt.o
http-transport.o : mofiles/commonmod.o
http-transport.o : mofiles/configfmod.o
http-transport.o : mofiles/dbmod.o
http-transport.o : mofiles/servermod.o
index-tree.o : lock-queue.o
index-tree.o : db.o
index-tree.o : common.o
index-tree.o : items.o
index-tree.o : runconfig.o
index-tree.o : mofiles/commonmod.o
items.o : common.o
items.o : mofiles/commonmod.o
items.o : mofiles/configfmod.o
keys.o : common.o
keys.o : mofiles/commonmod.o
launch.o : subrun.o
launch.o : common.o
launch.o : configf.o
launch.o : db.o
launch.o : ezsteps.o
launch.o : mofiles/commonmod.o
launch.o : mofiles/configfmod.o
launch.o : mofiles/dbmod.o
lock-queue.o : common.o
lock-queue.o : tasks.o
lock-queue.o : mofiles/commonmod.o
megatest.o : common.o
megatest.o : margs.o
megatest.o : runs.o
megatest.o : launch.o
megatest.o : server.o
megatest.o : client.o
megatest.o : tests.o
megatest.o : genexample.o
megatest.o : db.o
megatest.o : tdb.o
megatest.o : mt.o
megatest.o : api.o
megatest.o : env.o
megatest.o : diff-report.o
megatest.o : mofiles/commonmod.o
# megatest.o : commonmod.import.o
megatest.o : mofiles/configfmod.o
# megatest.o : configfmod.import.o
megatest.o : ods.o
# megatest.o : ods.import.o
megatest.o : mofiles/dbmod.o
# megatest.o : dbmod.import.o
megatest.o : mofiles/servermod.o
# megatest.o : servermod.import.o
megatest.o : mofiles/apimod.o
# megatest.o : apimod.import.o
megatest.o : mofiles/rmtmod.o
# megatest.o : rmtmod.import.o
mlaunch.o : db.o
mlaunch.o : common.o
monitor.o : db.o
monitor.o : common.o
monitor.o : items.o
monitor.o : runconfig.o
mt.o : db.o
mt.o : common.o
mt.o : items.o
mt.o : runconfig.o
mt.o : tests.o
mt.o : server.o
mt.o : runs.o
mt.o : rmt.o
mt.o : mofiles/commonmod.o
mt.o : mofiles/configfmod.o
mt.o : mofiles/dbmod.o
mtexec.o : margs.o
mtexec.o : configf.o
mtexec.o : mofiles/configfmod.o
mtut.o : common.o
mtut.o : margs.o
mtut.o : configf.o
mtut.o : mofiles/commonmod.o
mtut.o : mofiles/configfmod.o
newdashboard.o : common.o
newdashboard.o : megatest-version.o
newdashboard.o : margs.o
newdashboard.o : mofiles/commonmod.o
newdashboard.o : mofiles/dbmod.o
newdashboard.o : dcommon.o
newdashboard.o : mofiles/configfmod.o
ods.o : mofiles/commonmod.o
portlogger.o : db.o
portlogger.o : mofiles/commonmod.o
portlogger.o : mofiles/configfmod.o
portlogger.o : mofiles/dbmod.o
process.o : mofiles/commonmod.o
rmt.o : api.o
rmt.o : http-transport.o
rmt.o : mofiles/commonmod.o
rmt.o : mofiles/apimod.o
rmt.o : mofiles/rmtmod.o
rmt.o : mofiles/dbmod.o
rmt.o : mofiles/configfmod.o
rmt.o : mofiles/servermod.o
mofiles/rmtmod.o : mofiles/commonmod.o
mofiles/rmtmod.o : mofiles/apimod.o
mofiles/rmtmod.o : mofiles/dbmod.o
runconfig.o : common.o
runconfig.o : mofiles/commonmod.o
runs.o : db.o
runs.o : common.o
runs.o : items.o
runs.o : runconfig.o
runs.o : tests.o
runs.o : server.o
runs.o : mt.o
runs.o : archive.o
runs.o : mofiles/commonmod.o
runs.o : mofiles/configfmod.o
runs.o : mofiles/dbmod.o
runs.o : mofiles/servermod.o
server.o : common.o
server.o : db.o
server.o : http-transport.o
server.o : launch.o
server.o : mofiles/commonmod.o
server.o : mofiles/dbmod.o
server.o : mofiles/configfmod.o
server.o : mofiles/servermod.o
mofiles/servermod.o : mofiles/commonmod.o
mofiles/servermod.o : mofiles/configfmod.o
mofiles/servermod.o : mofiles/dbmod.o
sharedat.o : configf.o
sharedat.o : margs.o
sharedat.o : megatest-version.o
spublish.o : margs.o
subrun.o : db.o
subrun.o : common.o
subrun.o : mt.o
subrun.o : mofiles/commonmod.o
subrun.o : mofiles/configfmod.o
subrun.o : mofiles/dbmod.o
synchash.o : db.o
synchash.o : server.o
synchash.o : mofiles/dbmod.o
tasks.o : db.o
tasks.o : rmt.o
tasks.o : common.o
tasks.o : cgisetup/models/pgdb.o
tasks.o : mofiles/commonmod.o
tasks.o : mofiles/configfmod.o
tasks.o : mofiles/dbmod.o
tcmt.o : margs.o
tcmt.o : rmt.o
tcmt.o : common.o
tcmt.o : mofiles/commonmod.o
tdb.o : common.o
tdb.o : keys.o
tdb.o : client.o
tdb.o : mt.o
tdb.o : db.o
tdb.o : mofiles/commonmod.o
tdb.o : mofiles/dbmod.o
tdb.o : ods.o
test.o : mtcommon.o
tests.o : lock-queue.o
tests.o : db.o
tests.o : tdb.o
tests.o : common.o
tests.o : items.o
tests.o : runconfig.o
tests.o : server.o
tests.o : mofiles/commonmod.o
tests.o : mofiles/dbmod.o
tests.o : mofiles/configfmod.o
tests.o : mofiles/servermod.o
tree.o : margs.o
tree.o : launch.o
tree.o : gutils.o
tree.o : db.o
tree.o : server.o
tree.o : dcommon.o
tree.o : mofiles/commonmod.o
tree.o : mofiles/dbmod.o
ulex.o : pkts.o

Name change from datashare.scm to datashare/datashare.scm.

Deleted fs-transport.scm version [094d0befba].

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
45
46
47
48
49
50
51
52
53
54
55
56
57
58


























































-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

;; 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/>.

(require-extension (srfi 18) extras tcp s11n)

(use sqlite3 srfi-1 posix regex regex-case srfi-69 hostinfo md5 message-digest)
(import (prefix sqlite3 sqlite3:))

(use spiffy uri-common intarweb http-client spiffy-request-vars)

(tcp-buffer-size 2048)

(declare (unit fs-transport))

(declare (uses common))
(declare (uses db))
(declare (uses tests))
(declare (uses tasks)) ;; tasks are where stuff is maintained about what is running.

(declare (uses commonmod))
(import commonmod)

(declare (uses dbmod))
(import dbmod)

(include "common_records.scm")
(include "db_records.scm")


;;======================================================================
;; F S   T R A N S P O R T   S E R V E R
;;======================================================================

;; There is no "server" per se but a convience routine to make it non
;; necessary to be reopening the db over and over again.
;;

(define (fs:process-queue-item packet)
  (if (not *dbstruct-db*) ;; we will require that (setup-for-run) has already been called
      (set! *dbstruct-db* (db:setup-db)))
  (debug:print-info 11 *default-log-port* "fs:process-queue-item called with packet=" packet)
  (db:process-queue-item *dbstruct-db* packet))
      

Name change from sample-sauth-paths.scm to sauth/sample-sauth-paths.scm.

Name change from sauth-common.scm to sauth/sauth-common.scm.

Name change from sauthorize.scm to sauth/sauthorize.scm.

Name change from sretrieve.scm to sauth/sretrieve.scm.

Modified utils/gendeps.scm from [420bfe8c32] to [a6a7866112].

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
61
62
63
64
65
66
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
61
62
63
64
65
66
67
68
69


70
71
72
73
74
75
76
77
78
79
80
81
82
83
84







+
+
+
+
+
+
+













+
+
+
+
+

















-
-
+
+
+
+
+
+
+
+







 srfi-69
 )

(define (portprint p . args)
  (with-output-to-port p
    (lambda ()
      (apply print args))))

(define (mofiles-adjust->dot-o inf)
  (regex-case
   inf
   ("^.*mod$" _ (conc "mofiles/"inf".o"))
   ("pgdb"    _ (conc "cgisetup/models/"inf".o"))
   (else (conc inf".o"))))

(define (compunit targfname files)
  (let* ((unitdata   (make-hash-table))
	 (moduledata (make-hash-table))
	 (filesdata  (make-hash-table))
	 (unitdec    (regexp "^\\(declare\\s+\\(unit\\s+([^\\s]+)\\)\\)"))
	 (unituse    (regexp "^\\(declare\\s+\\(uses\\s+([^\\s]+)\\)\\)"))
	 (moduledec  (regexp "^\\(module\\s+([\\s]+)"))
	 (importuse  (regexp "^\\(import\\s+(.*)\\)")) ;; captures string of imports (one line)
	 (dotport    (open-output-file (conc targfname ".dot")))
	 (incport    (open-output-file (conc targfname ".inc")))
	 )
    (portprint dotport "digraph usedeps {")
    (portprint incport "# To regenerate this file do:
#   (cd utils/;ck52 csc gendeps.scm) && ./utils/gendeps allunits *scm
#   cp allunits.inc build.inc
#
")
    (for-each
     (lambda (fname)
       (let* ((sname (string-substitute "\\.scm$" "" fname)))
	 (print "Processing "fname" with core name of "sname)
	 (hash-table-set! filesdata sname fname) ;; record the existance of the src file
	 (with-input-from-file fname
	   (lambda ()
	     (let loop ((inl (read-line)))
	       (if (not (eof-object? inl))
		   (begin
		     (regex-case
		      inl
		      (unitdec   (_ unitname)
				 (if (equal? sname unitname) ;; good if same
				     (if (not (hash-table-exists? unitdata unitname))
					 (hash-table-set! unitdata unitname (make-hash-table)))))
		      (unituse   (_ usingname)
				 (portprint dotport "\""sname"\" -> \""usingname"\"")
				 (portprint incport sname".scm : "usingname".scm"))
				 (portprint dotport "\""usingname"\" -> \""sname"\"")
				 (portprint incport
					    (if (or (string-search ".import$" sname)
						    (string-search ".import$" usingname))
						"# "
						"")
					    (mofiles-adjust->dot-o sname)" : "
					    (mofiles-adjust->dot-o usingname)))
		      ;; (moduledec (_ modname)    (print "Module:   " modname))
		      ;; (importuse (_ importname) (print "Imports: " importname))
		      (else #f))
		     (loop (read-line)))))))))
     files)
    (portprint dotport "}")
    (close-output-port dotport)