work in progress: macros rule-trans-set
This commit is contained in:
parent
d42d574bf6
commit
3e19944116
|
@ -23,7 +23,7 @@
|
|||
;;; RULE-SET
|
||||
;;;
|
||||
;;; (make-empty-rule-set) ---> rule-set
|
||||
;;; (rule-set-add! rule rule-set) ---> rule-set
|
||||
;;; (rule-set-add rule rule-set) ---> rule-set
|
||||
;;;
|
||||
(define-record-type :rule-set
|
||||
(make-rule-set rules)
|
||||
|
|
41
makefile.scm
41
makefile.scm
|
@ -20,23 +20,30 @@
|
|||
;;;
|
||||
;;; (make (expand-file-name "skills.pdf" d) "this is an empty init-state")
|
||||
|
||||
(makefile
|
||||
(makefile-rule "/home/bruegman/.tmp/skills.tex"
|
||||
()
|
||||
(lambda ()
|
||||
(with-cwd "/home/bruegman/.tmp"
|
||||
(display "Top: /home/bruegman/.tmp/skills.tex"))))
|
||||
(makefile-rule "/home/bruegman/.tmp/skills.dvi"
|
||||
("/home/bruegman/.tmp/skills.tex")
|
||||
(lambda ()
|
||||
(with-cwd "/home/bruegman/.tmp"
|
||||
(run (latex ,"/home/bruegman/.tmp/skills.tex")))))
|
||||
(makefile-rule "/home/bruegman/.tmp/skills.pdf"
|
||||
("/home/bruegman/.tmp/skills.dvi")
|
||||
(lambda ()
|
||||
(with-cwd "/home/bruegman/.tmp"
|
||||
(run (dvipdfm -o ,"/home/bruegman/.tmp/skills.pdf"
|
||||
,"/home/bruegman/.tmp/skills.dvi"))))))
|
||||
(define rule-set
|
||||
(makefile
|
||||
(makefile-rule "/home/bruegman/.tmp/skills.tex"
|
||||
()
|
||||
(lambda ()
|
||||
(with-cwd "/home/bruegman/.tmp"
|
||||
(display "Top: /home/bruegman/.tmp/skills.tex"))))
|
||||
(makefile-rule "/home/bruegman/.tmp/skills.dvi"
|
||||
("/home/bruegman/.tmp/skills.tex")
|
||||
(lambda ()
|
||||
(with-cwd "/home/bruegman/.tmp"
|
||||
(run (latex ,"/home/bruegman/.tmp/skills.tex")))))
|
||||
(makefile-rule "/home/bruegman/.tmp/skills.pdf"
|
||||
("/home/bruegman/.tmp/skills.dvi")
|
||||
(lambda ()
|
||||
(with-cwd "/home/bruegman/.tmp"
|
||||
(run (dvipdfm -o ,"/home/bruegman/.tmp/skills.pdf"
|
||||
,"/home/bruegman/.tmp/skills.dvi")))))))
|
||||
(define-syntax make
|
||||
(syntax-rules ()
|
||||
((make ?fname ?state)
|
||||
(rule-make (*fname->rule*-get ?fname)
|
||||
?state
|
||||
rule-set))))
|
||||
|
||||
(make "/home/bruegman/.tmp/skills.pdf" "this is an empty init-state...")
|
||||
|
||||
|
|
148
packages.scm
148
packages.scm
|
@ -1,3 +1,104 @@
|
|||
(define-interface jobd-interface
|
||||
(export make-jobd
|
||||
jobd?
|
||||
version
|
||||
execute
|
||||
stop
|
||||
continue
|
||||
shutdown
|
||||
set-jobbers!))
|
||||
|
||||
(define-structure jobd jobd-interface
|
||||
(open scheme-with-scsh
|
||||
formats
|
||||
srfi-1
|
||||
(with-prefix srfi-8 srfi-8/)
|
||||
srfi-9
|
||||
srfi-11
|
||||
threads
|
||||
threads-internal
|
||||
(with-prefix rendezvous cml-rv/)
|
||||
(with-prefix mcast-channels cml-mcast-ch/)
|
||||
(with-prefix rendezvous-channels cml-sync-ch/)
|
||||
(with-prefix rendezvous-async-channels cml-async-ch/)
|
||||
finite-types
|
||||
job
|
||||
cml-pe)
|
||||
(files jobd))
|
||||
|
||||
(define-interface cml-pe-interface
|
||||
(export cml-fork
|
||||
cml-fork-collecting))
|
||||
|
||||
(define-structure cml-pe cml-pe-interface
|
||||
(open scheme-with-scsh
|
||||
srfi-9
|
||||
threads
|
||||
(with-prefix rendezvous cml-rv/)
|
||||
(with-prefix rendezvous-channels cml-sync-ch/))
|
||||
(files cml-pe))
|
||||
|
||||
(define-interface mcast-channels-interface
|
||||
(export make-mcast-channel
|
||||
mcast-channel?
|
||||
mcast-port?
|
||||
mcast
|
||||
mcast-port
|
||||
mcast-port-receive
|
||||
mcast-port-receive-rv))
|
||||
|
||||
(define-structure mcast-channels mcast-channels-interface
|
||||
(open scheme
|
||||
srfi-9
|
||||
threads
|
||||
finite-types
|
||||
rendezvous
|
||||
rendezvous-channels)
|
||||
(files mcast-channels))
|
||||
|
||||
(define-interface job-interface
|
||||
(export make-job-desc
|
||||
job-desc?
|
||||
job-desc-wd
|
||||
job-desc-env
|
||||
job-desc-cmd
|
||||
make-job-res
|
||||
job-res?
|
||||
job-res-errno
|
||||
job-res-stdout
|
||||
job-res-stderr
|
||||
display-job-output))
|
||||
|
||||
(define-structure job job-interface
|
||||
(open scheme-with-scsh
|
||||
srfi-9)
|
||||
(files job))
|
||||
|
||||
(define-structure test-jobd
|
||||
(export do-some-jobs)
|
||||
(open scheme-with-scsh
|
||||
locks
|
||||
threads
|
||||
threads-internal
|
||||
srfi-1
|
||||
(with-prefix rendezvous cml-rv/)
|
||||
(with-prefix rendezvous-channels cml-sync-ch/)
|
||||
(with-prefix rendezvous-async-channels cml-async-ch/)
|
||||
cml-pe
|
||||
job
|
||||
(with-prefix jobd jobd/))
|
||||
(files test-jobd))
|
||||
|
||||
(define-structure test-mcast-channels
|
||||
(export test-it)
|
||||
(open scheme
|
||||
srfi-9
|
||||
threads
|
||||
rendezvous
|
||||
rendezvous-channels
|
||||
mcast-channels)
|
||||
(files test-mcast-channels))
|
||||
|
||||
(define-interface collect-channels-interface
|
||||
(export make-tagged-msg
|
||||
is-tagged-msg?
|
||||
|
@ -30,9 +131,11 @@
|
|||
(define-interface make-rule-interface
|
||||
(export make-rule
|
||||
is-rule?
|
||||
rule-prereqs
|
||||
rule-wants-build?
|
||||
rule-build-func
|
||||
make-empty-rule-set
|
||||
rule-set-add
|
||||
is-rule-set?
|
||||
make-rule-result
|
||||
is-rule-result?
|
||||
rule-make))
|
||||
|
||||
(define-structure make-rule make-rule-interface
|
||||
|
@ -51,9 +154,11 @@
|
|||
(define-interface make-rule-no-cml-interface
|
||||
(export make-rule
|
||||
is-rule?
|
||||
rule-prereqs
|
||||
rule-wants-build?
|
||||
rule-build-func
|
||||
make-empty-rule-set
|
||||
rule-set-add
|
||||
is-rule-set?
|
||||
make-rule-result
|
||||
is-rule-result?
|
||||
rule-make))
|
||||
|
||||
(define-structure make-rule-no-cml make-rule-no-cml-interface
|
||||
|
@ -73,5 +178,34 @@
|
|||
(define-structure makros makros-interface
|
||||
(open scheme-with-scsh
|
||||
srfi-1
|
||||
make-rule)
|
||||
make-rule-no-cml)
|
||||
(files makros))
|
||||
|
||||
(define-interface rule-trans-set-interface
|
||||
(export make-rule-trans-set
|
||||
is-rule-trans-set?
|
||||
make-empty-rule-trans-set
|
||||
make-rule-trans-set
|
||||
rule-trans-set-rule-candidates
|
||||
rule-trans-set-known-rules
|
||||
rule-trans-set-rule-set
|
||||
rule-trans-set-add!))
|
||||
|
||||
(define-structure rule-trans-set rule-trans-set-interface
|
||||
(open scheme-with-scsh
|
||||
srfi-1
|
||||
srfi-9
|
||||
make-rule)
|
||||
(files rule-trans-set))
|
||||
|
||||
(define-interface macros-interface
|
||||
(export (makefile :syntax)
|
||||
(makefile-rule :syntax)
|
||||
(make-is-out-of-date? :syntax)))
|
||||
|
||||
(define-structure macros macros-interface
|
||||
(open scheme-with-scsh
|
||||
srfi-1
|
||||
rule-trans-set)
|
||||
(files macros))
|
||||
|
||||
|
|
Loading…
Reference in New Issue