Rebase of #11053
Previously started by @laanwj, ACK'ed by promag, ryanofsky, jonasschnelli, and concept-ACK'ed by practicalswift and jnewbery. Thus should be almost RTM :)
@ryanofsky you might want to check this over :)
utACK 5d0eae757e30605ec3d26bc515856b1d20a13cc2
So we're doing this? Okay! utACK 5d0eae7
Pieter was here.
utACK 5d0eae757e30605ec3d26bc515856b1d20a13cc2
Nice!
Thanks for taking and rebasing this. Big concept ACK. Will review later.
Needs rebase, after that please let me know and we should just merge it, has had lots of review and is a pain to keep up to date.
460 | @@ -461,6 +461,14 @@ namespace { 461 | 462 | - *Rationale*: Avoids confusion about the namespace context 463 | 464 | +- Prefer `#include <primitives/transaction.h>` bracket syntax instead of 465 | + `#include "primitives/transactions.h" quote syntax when possible.
Missing `.
BTW, unrelated but the Rationale above doesn't render well. And some are missing a period.
rere-utACK.
-BEGIN VERIFY SCRIPT-
for f in \
src/*.cpp \
src/*.h \
src/bench/*.cpp \
src/bench/*.h \
src/compat/*.cpp \
src/compat/*.h \
src/consensus/*.cpp \
src/consensus/*.h \
src/crypto/*.cpp \
src/crypto/*.h \
src/crypto/ctaes/*.h \
src/policy/*.cpp \
src/policy/*.h \
src/primitives/*.cpp \
src/primitives/*.h \
src/qt/*.cpp \
src/qt/*.h \
src/qt/test/*.cpp \
src/qt/test/*.h \
src/rpc/*.cpp \
src/rpc/*.h \
src/script/*.cpp \
src/script/*.h \
src/support/*.cpp \
src/support/*.h \
src/support/allocators/*.h \
src/test/*.cpp \
src/test/*.h \
src/wallet/*.cpp \
src/wallet/*.h \
src/wallet/test/*.cpp \
src/wallet/test/*.h \
src/zmq/*.cpp \
src/zmq/*.h
do
base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-
Remove -I from build system for everything but the project root,
and built-in dependencies.
This makes all include paths in the GUI absolute.
Many changes are involved as every single source file in
src/qt/ assumes to be able to use relative includes.
Rebased and added missing tick pointed out by @promag, will just wait for travis to verify the scripted-diff again
Tested ACK 7b91b5f8a4417da1940956c1ab32dba94dc104e1.
I noticed that there were a few .rc and .mm files still using the "" style includes. Should those also be changed to <> style? I think the change would be like this: https://github.com/jnewbery/bitcoin/commit/1a506c7ebf91747f40c9e408f8947e5491101422 but I don't have windows or mac machines to test the build on.
indifferent utACK 7b91b5f8a4417da1940956c1ab32dba94dc104e1.
I noticed that there were a few .rc and .mm files still using the "" style includes.
If they are correctly relative (so to include from the directory the including file is in, or even a directory relative to its directory) it's fine to keep them. "" style includes are a problem when they're used when <> is meant, which was common in this project before this change.