Skip to content

Commit f8369bf

Browse files
Merge pull request #197 from SimplyAhmazing/patch-1
Fix spelling typo
2 parents 3fe67b6 + 33d6c97 commit f8369bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/lesson01/linux/build-system.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ After we examined Linux kernel structure, it worth spending some time investigat
3030
* `targets` are file names, separated by spaces. Targets are generated after the rule is executed. Usually, there is only one target per rule.
3131
* `prerequisites` are files that `make` trackes to see whether it needs to update the targets.
3232
* `recipe` is a bash script. Make calls it when some of the prerequisites have been updated. The recipe is responsible for generating the targets.
33-
* Both targets and prerequisites can include wildcards (`%`). When wildcards are used the recipe is executed for each of the mached prerequisites separately. In this case, you can use `$<` and `$@` variables to refer to the prerequisite and the target inside the recipe. We already did it in the [RPi OS makefile](https://github.com/s-matyukevich/raspberry-pi-os/blob/master/src/lesson01/Makefile#L14).
33+
* Both targets and prerequisites can include wildcards (`%`). When wildcards are used the recipe is executed for each of the matched prerequisites separately. In this case, you can use `$<` and `$@` variables to refer to the prerequisite and the target inside the recipe. We already did it in the [RPi OS makefile](https://github.com/s-matyukevich/raspberry-pi-os/blob/master/src/lesson01/Makefile#L14).
3434
For additional information about make rules, please refer to the [official documentation](https://www.gnu.org/software/make/manual/html_node/Rule-Syntax.html#Rule-Syntax).
3535

3636
* `make` is very good in detecting whether any of the prerequisites have been changed and updating only targets that need to be rebuilt. However, if a recipe is dynamically updated, `make` is unable to detect this change. How can this happen? Very easily. One good example is when you change some configuration variable, which results in appending an additional option to the recipe. By default, in this case, `make` will not recompile previously generated object files, because their prerequisites haven't been changed, only the recipe have been updated. To overcome this behavior Linux introduces [if_changed](https://github.com/torvalds/linux/blob/v4.14/scripts/Kbuild.include#L264) function. To see how it works let's consider the following example.

0 commit comments

Comments
 (0)