Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Oct 25, 2024
1 parent 54ec9f7 commit 510b939
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Note that we say "treats as set" because these are considered only when [`BUILD_
## How `BUILD_WRAP_CMD` is expanded
- `{}` is replaced with the path of a copy of the original build script.
- `{}` is replaced with the path of a renamed copy of the original build script.
- `{VAR}` is replaced with the value of environment variable `VAR`.
- `{{` is replaced with `{`.
- `}}` is replaced with `}`.
Expand All @@ -113,14 +113,15 @@ When invoked, `build-wrap` does the following:
1. Link normally using `BUILD_WRAP_LD`.
2. Parse the arguments to determine whether the output file is a build script.
3. If so, replace the build script `B` with its "wrapped" version `B'`, described next.
3. If not, stop; otherwise, proceed.
4. Let `B` be the build script's original name.
5. Rename the build script to a fresh, unused name `B'`.
6. At `B`, create a "wrapped" version of the build script whose behavior is described next.
Given a build script `B`, its "wrapped" version `B'` contains a copy of `B` and does the following when invoked:
The "wrapped" version of the build script does the following when invoked:
1. Create a temporary file with the contents of `B`. (Recall: `B'` contains a copy of `B`).
2. Make the temporary file executable.
3. Expand `BUILD_WRAP_CMD` in the [manner described above].
4. Execute the expanded command.
1. Expand `BUILD_WRAP_CMD` in the [manner described above], with `{}` expanding to `B'`.
2. Execute the expanded command.

## Goals

Expand Down

0 comments on commit 510b939

Please sign in to comment.