Made it possible to use (refresh-makefile) in order to refresh an edited makefile on the fly.

This commit is contained in:
2026-08-11 17:06:57 +02:00
parent 051cce6e33
commit d8f2710507
7 changed files with 250 additions and 18 deletions
+14 -1
View File
@@ -40,7 +40,7 @@ raco pkg install
For a versioned archive, give the package name explicitly:
```text
raco pkg install --name racket-makefile racket-makefile-0.1.6.zip
raco pkg install --name racket-makefile racket-makefile-0.1.8.zip
```
## Running targets
@@ -78,6 +78,19 @@ registers the targets. Then use the Interactions window:
Bare identifiers in `make` are target names, so no quote is needed. For
example, `(make clean)` selects the target named `clean`.
After editing the makefile, use `refresh-makefile` in the same Interactions
window to reload the makefile without restarting the Racket process:
```racket
> (refresh-makefile)
> (make all)
```
This works both with `#lang racket-makefile` and with an ordinary `#lang racket`
makefile that requires `main.rkt`. It is useful when the makefile requires modules
that are expensive to load. Unchanged required modules can remain instantiated
while the target definitions from the makefile are registered again.
## Running Racket tools with `raco`
Use `raco` to invoke a Racket tool from a target without depending on `%PATH%`