vault backup: 2026-08-24 19:12:12
This commit is contained in:
@@ -1817,7 +1817,7 @@ clean:
|
||||
rm -f some_file
|
||||
```
|
||||
|
||||
## .phony
|
||||
## .PHONY
|
||||
|
||||
Adding `.PHONY` to a target will prevent Make from confusing the phony target with a file name. In this example, if the file `clean` is created, make clean will still be run. Technically, I should have used it in every example with `all` or `clean`, but I wanted to keep the examples clean. Additionally, "phony" targets typically have names that are rarely file names, and in practice many people skip this.
|
||||
|
||||
@@ -1840,7 +1840,7 @@ Here's an example of using variables:
|
||||
|
||||
```makefile
|
||||
files := file1 file2
|
||||
some_file: $(files)
|
||||
some_file: $(files)
|
||||
echo "Look at this variable: " $(files)
|
||||
touch some_file
|
||||
|
||||
|
||||
Reference in New Issue
Block a user