mirror of
https://github.com/casey/just.git
synced 2024-11-26 00:24:22 +03:00
Add an example of using a variable in a recipe parameter (#1311)
This commit is contained in:
parent
aed7ca1678
commit
35fb61af89
12
README.md
12
README.md
@ -1441,6 +1441,18 @@ build target:
|
||||
cd {{target}} && make
|
||||
```
|
||||
|
||||
Variables can also be passed as arguments to dependencies:
|
||||
|
||||
```make
|
||||
target := "main"
|
||||
|
||||
_build version:
|
||||
@echo 'Building {{version}}…'
|
||||
cd {{version}} && make
|
||||
|
||||
build: (_build target)
|
||||
```
|
||||
|
||||
A command's arguments can be passed to dependency by putting the dependency in parentheses along with the arguments:
|
||||
|
||||
```make
|
||||
|
Loading…
Reference in New Issue
Block a user