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
  1. Diapolo commented at 11:49 AM on July 10, 2012: none
    • as the "||" operator is not known to qmake use "|" instead, which ensures the code in brackets does never get executed on Windows
  2. laanwj commented at 11:52 AM on July 10, 2012: member

    This is wrong. : means AND, not OR.

  3. 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 ;).

  4. 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.

  5. 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

  6. 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!

  7. Diapolo commented at 6:25 AM on July 11, 2012: none

    @sipa Can you take a look at this and comment :)?

  8. 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?

  9. 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

  10. 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.

  11. Diapolo commented at 9:13 AM on July 11, 2012: none

    I'll remove the message, just helps debugging currently :). -> removed

    !windows on 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>

    windows on 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>

  12. 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
    30d509c12e
  13. 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

  14. laanwj referenced this in commit bc4fb165ea on Jul 11, 2012
  15. laanwj merged this on Jul 11, 2012
  16. laanwj closed this on Jul 11, 2012

  17. nifgraup referenced this in commit ecb4975d02 on Mar 30, 2014
  18. lateminer referenced this in commit 18bce1bfaf on May 6, 2020
  19. lateminer referenced this in commit e99a18e410 on May 6, 2020
  20. DrahtBot locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me