-
Notifications
You must be signed in to change notification settings - Fork 2
Add Walkfile inheritance #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
027f00a
139389f
0877dd9
bd2e17d
fa56db0
d5d5dbd
12ee1e5
8c60b9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,28 +60,41 @@ to files that need to be built, like `src/hello.o`. When a target does not | |
| relate to an actual file on disk, it's synonymous with `.PHONY` targets in | ||
| make(1). | ||
|
|
||
| walk(1) delegates to an executable file called [Walkfile][WALKFILE] within the same | ||
| directory as the target, to determine what dependencies the target has, and how | ||
| to execute it. | ||
| walk(1) delegates to an executable file called [Walkfile][WALKFILE] to determine | ||
| what dependencies the target has, and how to execute it. walk(1) searches for a | ||
| Walkfile starting from the target's directory and walking up the directory tree | ||
| until one is found. This allows a single Walkfile at the project root to handle | ||
| targets in any subdirectory. | ||
|
|
||
| ## WALKFILE | ||
|
|
||
| The `Walkfile` determines _how_ a target is executed, and what other targets it | ||
| depends on. | ||
|
|
||
| When walk(1) begins execution of a target, it attempts to find an executable | ||
| file called `Walkfile` in the same directory as the target, and then executes | ||
| it with the following positional arguments: | ||
| When walk(1) begins execution of a target, it searches for an executable file | ||
| called `Walkfile` starting from the target's directory and walking up the | ||
| directory tree. Once found, it executes the Walkfile with the following | ||
| positional arguments: | ||
|
|
||
| * `$1`: | ||
| The [phase][PHASES] (`deps` or `exec`). | ||
|
|
||
| * `$2`: | ||
| The name of the target to build (e.g. `hello.o`). | ||
| The target path relative to the Walkfile's directory (e.g. `hello.o` or | ||
| `subdir/hello.o` if the Walkfile is in a parent directory). | ||
|
|
||
| It's up to the `Walkfile` to determine what dependencies the target has, and | ||
| how to execute it. | ||
|
|
||
| If a Walkfile exits with code `200`, walk(1) will try the next Walkfile up the | ||
| directory tree. This allows a local Walkfile to handle specific targets while | ||
| delegating unknown targets to a parent Walkfile: | ||
|
|
||
| case $target in | ||
| special) ;; # handle locally | ||
| *) exit 200 ;; # delegate to parent | ||
| esac | ||
|
|
||
|
Comment on lines
+63
to
+97
|
||
| ## PHASES | ||
|
|
||
| walk(1) has two phases: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changelog entry says delegation is “exit code 200” but then says “exiting with code 127”. That’s contradictory and doesn’t match ExitCodeDelegate=200 elsewhere in the PR. Please correct the text to consistently use 200.