Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix for Debian bug #795061 by Tianming Xie
Original bug description follows: When building amule from source code, it may happen that building the first time (that is, no file to generate has been generated yet) fails, for unable to find a way to generate Scanner.h, but a second time make just after the first one will succeed. This is because Scanner.h is generated by the same rule to generate Scanner.cpp, and there is no explicit rule to generate Scanner.h. In fact, the command used by the rule to generate Scanner.cpp (as the attached patch file shows) actually generates two file: one is the target Scanner.cpp, the other is Scanner.h. So if a command whose rule depending on Scanner.h is unfortunately called before Scanner.cpp is generated, it will fail, and break the whole making procedure. The problem can be fixed by add a rule to make Scanner.h depend on Scanner.cpp, without any command, as the attached patch file shows. If an absent Scanner.h is required by rule, according to the Rule of Make(1), the command to generate Scanner.cpp will be called to generate Scanner.cpp and Scanner.h simultaneously, and if so, when Scanner.cpp is needed, it is not generated again, for now it already exists.
- Loading branch information