Fix for Debian bug #795061 by Tianming Xieamule-svn-r10896
commit0905859ec53d7e0ea8ae4a91972bbab4d56b8ba9
authorupstream svn <svn@amule.org>
Mon, 25 Jan 2016 17:58:27 +0000 (25 17:58 +0000)
committerDévai Tamás <gonosztopi@amule.org>
Wed, 24 Feb 2016 11:33:15 +0000 (24 11:33 +0000)
tree886eb45804535f682b990a361551caae2e8d5da0
parent7fab4581b4f4ab8fce04ad0899c51e6c919afcdf
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.
.svn-revision
docs/Changelog
src/Makefile.am
src/Makefile.in