-
Notifications
You must be signed in to change notification settings - Fork 6
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
Misleading explanation on dependencies #4
Comments
I see your point, but It does matter if the name is a target or a file, since it will have different behaviors whenever the file is present or not, as you said. |
True, however I still find the way you explain it is misleading. So saying doesn't match neither a file or a target's name does hide somehow the fact that make will consider anything as a file and try to find a rule for it. The error printed being "I don't know the rule to make this file I don't know about" |
So I am missing the point where I state "Makefiles consider pre-requisits as files." Possible cases:
Is that it? |
That's it though some conditions there could be packed together |
In the README.md you wrote
A rule can have dependencies, some stuff to be fulfilled before execution, named pre-requisits.
Then adding :
A pre-requisit can be either a file or another rule. In the last case, the dependency rule is executed first. If the pre-requisit doesn't match neither a file or a target's name, the Makefile halts and prints an error.
That is actually misleading.
The purpose of a makefile is actually to make... well.... files.
So it does not really matter if the dependency is a file or a rule.
In case the dependency is a rule, the rule will be called.
In case the dependency is a file, the makefile will try to find a rule that makes this file. In case such rule does not exist, it will print an error.
The text was updated successfully, but these errors were encountered: