Skip to content

Commit

Permalink
Add an example of using a variable in a recipe parameter (casey#1311)
Browse files Browse the repository at this point in the history
  • Loading branch information
papertigers authored Aug 16, 2022
1 parent aed7ca1 commit 35fb61a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 35fb61a

Please sign in to comment.