Megatest

Diff
Login

Differences From Artifact [73cc77990e]:

To Artifact [847b7e11cc]:


23
24
25
26
27
28
29
30

31
32
33
34
35
36
37
23
24
25
26
27
28
29

30
31
32
33
34
35
36
37







-
+








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

(define modules-without-mod
  "(ods|transport|portlogger)")
  "(ods|transport|portlogger|tasks|pgdb)")

(define (mofiles-adjust->dot-o inf)
  (regex-case
   inf
   ("^.*mod$"           _ (conc "mofiles/"inf".o"))
   (modules-without-mod _ (conc "mofiles/"inf".o"))
   ("pgdb"              _ (conc "cgisetup/models/"inf".o"))
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
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







-









+
-
-
+
+
+
-







				 (portprint dotport "\""usingname"\" -> \""sname"\""))
		      (moduledec (_ modname)
				 (print "Found module "modname)
				 (hash-table-set! moduledata modname sname))
		      (importuse (_ importname)
				 (print "Found import "importname)
				 (hh-push incldata importname sname))
					    (mofiles-adjust->dot-o usingname)))
		      (else #f))
		     (loop (read-line)))))))))
     files)
    (hash-table-for-each
     incldata
     (lambda (impname snames)
       (for-each
	(lambda (sname)
	  (if (hash-table-exists? moduledata impname)
	      (if (hash-table-exists? incldata sname)
	      (make-inc-entry incport incdotport sname impname)
	      (print "No module file found for import " impname)
		  (make-inc-entry incport incdotport sname impname)
		  (print "Skipping module "sname", it is not used by any other modules"))
	      (print "No module file found for import " impname)))
	      ))
	snames)))
    (portprint dotport "}")
    (portprint incdotport "}")
    (close-output-port dotport)
    (close-output-port incport)
    (close-output-port incdotport)))