where some fellow cpunk apparently got m4/make/shell messed up in his head, and then nickm not testing what he applies. But hey it's an alpha, right? ...
where some fellow cpunk apparently got m4/make/shell messed up in his head, and then nickm not testing what he applies. But hey it's an alpha, right? ...
This commit was added for #17818 (moved). The quotation of the make variables is indeed a mistake. Using git grep "=\"" "*.am" only turned up instances of shell snippets within make rules except for those 2 instances. I propose the following patch
The top_builddir variable is not necessary because Tor only has one Makefile and according to the Autoconf documentation this variable is equal to builddir (which is always ".") in the top-level directory of the build tree.
Furthermore, the Automake variable EXEEXT automatically contains the appropriate executable extension for the platform. It is used internally by Automake to create its rules so in order to call the correct rule we have to add it too.
The top_builddir variable is not necessary because Tor only has one Makefile and according to the Autoconf documentation this variable is equal to builddir (which is always ".") in the top-level directory of the build tree.
This happens to be the case now. The point is that the path is specified relative to the top level ("/src/or/tor"). So don't remove it, otherwise one would need to adjust it when/if the Makefile moves.
The top_builddir variable is not necessary because Tor only has one Makefile and according to the Autoconf documentation this variable is equal to builddir (which is always ".") in the top-level directory of the build tree.
This happens to be the case now. The point is that the path is specified relative to the top level ("/src/or/tor"). So don't remove it, otherwise one would need to adjust it when/if the Makefile moves.
The Makefile is not going to move unless Tor moves back to recursive make (which is unlikely to happen, for the arguments see commit 2a4a1496241d6c4183763f90600be4775ccb5470). Iff that change happens the entire build configuration has to be rewritten because everything is currently specified relative to the top level (which can be seen in the include.am files).
Additionally, the generated Makefile contains no rules that include the builddir for building the tor binary but it does contain the rule
For these reasons i believe the builddir can safely be removed from the TESTING_TOR_BINARY variable. If there are instances where this would fail, i'm interested in hearing about them.
I can't comment about EXEEXT.
If you're interested you can read more about it in the Automake documentation.
The issue has been fixed in 040ec4d0347235da4fd5696b3eb063e609047024 outside of this ticket. However, i believe the patch in comment:4 is still worth applying.
Trac: Status: new to needs_review Version: N/Ato Tor: 0.2.8.1-alpha
Please have a look at branch bug18240 in my public repository?
Making the test-network and test-network-all rules depend on TESTING_TOR_BINARY is redundant because they already depend on the all rule. Also these two rules actually need to depend on the all rule because they not only need the tor binary but also the tor-gencert binary.
Be sure to update the changes file if you revert the changes on these two rules.
Looking at this again it's pretty clear that $(top_builddir) and $(top_srcdir) are not being used consistently. Perhaps some day they'll be cleaned up.
Hm. Actually no, they should only depend on what they use.
Added a fixup commit.
As with the TESTING_TOR_BINARY change, the tor-gencert dependency should include top_builddir and EXEEXT.
Note that this dependency currently only works because the test-network script does not use tor-cov-gencert binary when in coverage mode (see #18737 (moved)).