Made it possible to use (refresh-makefile) in order to refresh an edited makefile on the fly.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
@(require (for-label racket/base
|
||||
racket/file
|
||||
(only-in racket-makefile
|
||||
target deps phony default-target make
|
||||
target deps phony default-target make refresh-makefile
|
||||
run raco rm-f rm-rf cleanup
|
||||
list-dir/files list-files list-dirs
|
||||
$target $deps $<)))
|
||||
@@ -31,7 +31,7 @@ raco pkg install
|
||||
For a versioned archive, specify the package name explicitly:
|
||||
|
||||
@verbatim{
|
||||
raco pkg install --name racket-makefile racket-makefile-0.1.6.zip
|
||||
raco pkg install --name racket-makefile racket-makefile-0.1.8.zip
|
||||
}
|
||||
|
||||
After installation a makefile can start with:
|
||||
@@ -109,6 +109,22 @@ the targets. Then execute targets in the Interactions window:
|
||||
> (make clean all)
|
||||
}
|
||||
|
||||
After editing the makefile, reload its target definitions in the same Racket
|
||||
process with:
|
||||
|
||||
@verbatim{
|
||||
> (refresh-makefile)
|
||||
> (make all)
|
||||
}
|
||||
|
||||
@defproc[(refresh-makefile) void?]{
|
||||
Reloads the most recently loaded @tt{racket-makefile} source file and registers
|
||||
its targets again without restarting the Racket process. This works for both
|
||||
@tt{#lang racket-makefile} and ordinary @tt{#lang racket} makefiles that require
|
||||
@tt{main.rkt}. Modules required by the makefile that are already instantiated
|
||||
are reused. This is useful for makefiles that require expensive libraries.
|
||||
}
|
||||
|
||||
@section{Targets and dependencies}
|
||||
|
||||
@defform[(target name (deps dependency ...) body ...)]{
|
||||
|
||||
Reference in New Issue
Block a user