- as the "||" operator is not known to qmake use "|" instead, which ensures the code in brackets does never get executed on Windows
fix for build.h regeneration failure when compiling on Windows #1574
pull Diapolo wants to merge 1 commits into bitcoin:master from Diapolo:pro-file2 changing 1 files +1 −1-
Diapolo commented at 11:49 AM on July 10, 2012: none
-
laanwj commented at 11:52 AM on July 10, 2012: member
This is wrong.
:means AND, not OR. -
Diapolo commented at 12:02 PM on July 10, 2012: none
There is no OR afaik. Is there any use for the code, if the first check is false (means we are on Windows) but we set USE_BUILD_INFO=1? If not it still should be correct.
At least the current
||is wrong either as it tries to run the code, when compiling on Windows ;). -
laanwj commented at 12:08 PM on July 10, 2012: member
It means "Not on windows OR USE_BUILD_INFO=1". We use USE_BUILD_INFO in the gitian build.
If you replace it with "Not on windows AND USE_BUILD_INFO=1" you change the meaning completely. For non-windows platforms you don't have to set USE_BUILD_INFO=1 but it's default.
-
laanwj commented at 12:09 PM on July 10, 2012: member
There is also the | operator to act like a logical OR operator, joining together a number of conditions, and requiring only one of them to be true.http://doc.qt.nokia.com/4.7-snapshot/qmake-advanced-usage.html -
Diapolo commented at 12:20 PM on July 10, 2012: none
What am I doing ... I read the exact same document ^^. Will update to use the
|operator, which is THE fix how it should be :).Edit: Updated!
-
laanwj commented at 7:07 AM on July 11, 2012: member
Have you tested all the cases? At least both windows ones, with and without USE_BUILD_INFO?
-
Diapolo commented at 7:17 AM on July 11, 2012: none
tested on Windows 7: !windows with USE_BUILD_INFO=1 set -> Regenerating src/build.h !windows with USE_BUILD_INFO=0 set -> (no message) windows with USE_BUILD_INFO=1 set -> Regenerating src/build.h windows with USE_BUILD_INFO=0 set -> Regenerating src/build.h
-
laanwj commented at 7:28 AM on July 11, 2012: member
Seems the wrong way around, it should be:
!windows with USE_BUILD_INFO=1 set -> Regenerating src/build.h !windows with USE_BUILD_INFO=0 set (or no USE_BUILD_INFO) -> Regenerating src/build.h windows with USE_BUILD_INFO=1 set -> Regenerating src/build.h windows with USE_BUILD_INFO=0 set (or no USE_BUILD_INFO) -> (no message)qmake is a strange beast.
Edit: btw, the newly added message is not correct. It is not regenerating src/build.h in qmake, just adding the necessary step to the makefile.
-
Diapolo commented at 9:13 AM on July 11, 2012: none
I'll remove the message, just helps debugging currently :). -> removed
!windowson Windows 7 == false, so:<pre> false OR USE_BUILD_INFO=1 ->Regenerating src/build.h false OR USE_BUILD_INFO=0 (or no USE_BUILD_INFO) -> (no message) </pre>
windowson Windows 7 == true, so:<pre> true OR USE_BUILD_INFO=1 ->Regenerating src/build.h true OR USE_BUILD_INFO=0 -> Regenerating src/build.h </pre>
-
30d509c12e
fix for build.h regeneration failure when compiling on Windows
- as the "||" operator is not known to qmake use "|" instead, which ensures the code in brackets does never get executed on Windows
-
laanwj commented at 10:59 AM on July 11, 2012: member
Ok, seems like a misunderstanding then, the logic is right. I've tested on Linux and both with USE_BUILD_INFO=0 and USE_BUILD_INFO=1 the build.h instructions are added. As expected.
ACK
- laanwj referenced this in commit bc4fb165ea on Jul 11, 2012
- laanwj merged this on Jul 11, 2012
- laanwj closed this on Jul 11, 2012
- nifgraup referenced this in commit ecb4975d02 on Mar 30, 2014
- lateminer referenced this in commit 18bce1bfaf on May 6, 2020
- lateminer referenced this in commit e99a18e410 on May 6, 2020
- DrahtBot locked this on Sep 8, 2021