-
Notifications
You must be signed in to change notification settings - Fork 38.8k
bitcoin_qt.m4: Minor fixes and clean-ups. #11222
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
Conversation
Use '<QtCore/qconfig.h> and '<QtCore/qglobal.h>' for testing QT_VERSION. This makes the tests work with both Qt4 and Qt5, even if '-fPIC' or '-fPIE' is not used (the compiler might choke otherwise if QT_REDUCE_RELOCATIONS is active).
Add double qoutes to string tests where arguments could (theoretically) contain spaces. Remove double quotes where not necessary.
Consequently quote all arguments of M4 functions. Mark empty M4 arguments with '[]'.
|
Please update the PR title to something more explanatory, as they are now included in merge commits. |
|
Better now? |
|
utACK 40c8a65 |
|
@theuni Can you take a look at the build system changes here please? |
build-aux/m4/bitcoin_qt.m4
Outdated
| [bitcoin_cv_static_qt=no]) | ||
| ]) | ||
| if test xbitcoin_cv_static_qt = xyes; then | ||
| if test x$bitcoin_cv_static_qt = xyes; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was clearly broken before, but it didn't matter because we define QT_STATICPLUGIN elsewhere. Let's just delete this.
|
I wasn't comfortable reviewing e90d91c accurately, so I scripted it. Could you please update the commit message to make it a scripted diff? See here for an explanation: https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#scripted-diffs The script I used, which matches your commit, is: sed -iE -e 's/"x\(yes\|no\|auto\)\?"/x\1/g' -e 's/test \(x\$[^ ]*\)/test "\1"/g' build-aux/m4/bitcoin_qt.m4 |
|
Did you use some tool or script for the m4 macros? I think it's fine, but I'm nervous about some issue turning up months from now because of an errant bracket. |
|
No time for creating a script, sorry. I suggest that you do a comparison with for review; this shows the changes of this commit in the most compact form. Just a final note regarding bitcoin's M4 stuff for configuring Qt: I now believe that this is the wrong way. Without the help of http://repo.or.cz/ttfautohint.git/blob_plain/HEAD:/m4/autotroll.m4 for my current solution. For example, if I configure ttfautohint for cross-building with mxe, // This file is autogenerated by qmake. It imports static plugin classes for
// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables.
#include <QtPlugin>
Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) |
|
FYI: autotroll has been updated with my changes and is now available from https://github.com/tsuna/autotroll. |
|
@lemzwerg I'd really rather not change all this around arbitrarily. And I'd certainly not require qmake. Especially considering that they'll be replacing it with qbs in the future. Everything but the last commit looks good to me (after addressing #11222 (comment)). I assume the last is probably ok too, but I'd rather not risk introducing some obscure new error if this doesn't fix a reported bug. |
|
Needs update for @cfields' comments. |
|
Closing in favour of #11711. |
06abcbf scripted-diff: Orthogonalize string quoting (Werner Lemberg) e0496d3 bitcoin_qt.m4: Add missing dollar sign for variable. (Werner Lemberg) 079f4b2 bitcoin_qt.m4: Add missing braces around variables in autoconf messages. (Werner Lemberg) 8695315 bitcoin_qt.m4: Use correct M4 quoting characters. (Werner Lemberg) db32a4f bitcoin_qt.m4: Improve QT_VERSION tests. (Werner Lemberg) Pull request description: Replaces #11222. Dropped the last commit, and converted e90d91c (now 06abcbf) into a scripted-diff using @theuni's suggestion. Tree-SHA512: f2e1713bda96e8875be08839af914b24b3240f2eecf18cb268f83c82d965ebf544a0022af4f6f73b88b637a4fdd404a96b9fcf8e5bdd11c507b5bb425eeb7e1d
06abcbf scripted-diff: Orthogonalize string quoting (Werner Lemberg) e0496d3 bitcoin_qt.m4: Add missing dollar sign for variable. (Werner Lemberg) 079f4b2 bitcoin_qt.m4: Add missing braces around variables in autoconf messages. (Werner Lemberg) 8695315 bitcoin_qt.m4: Use correct M4 quoting characters. (Werner Lemberg) db32a4f bitcoin_qt.m4: Improve QT_VERSION tests. (Werner Lemberg) Pull request description: Replaces bitcoin#11222. Dropped the last commit, and converted e90d91c (now 06abcbf) into a scripted-diff using @theuni's suggestion. Tree-SHA512: f2e1713bda96e8875be08839af914b24b3240f2eecf18cb268f83c82d965ebf544a0022af4f6f73b88b637a4fdd404a96b9fcf8e5bdd11c507b5bb425eeb7e1d
This is the same as #11101 but moved to a separate branch.