build: regenerate bitcoin-config.h as necessary #10228

pull theuni wants to merge 2 commits into bitcoin:master from theuni:fix-config-h changing 2 files +8 −3
  1. theuni commented at 11:32 pm on April 18, 2017: member

    This fixes issues like #10140 and #10209.

    The cause is that #9921 introduced new defines, but without re-running autogen.sh, they wouldn’t be found. This change makes sure that autoheader is re-run (as it’s supposed to be) any time configure.ac is touched.

    Also, this undoes #4322, as it would introduce an infinite loop otherwise. I suspect that these convenience targets get very little use anymore, but we can always add back hard-coded ones if necessary.

  2. build: remove wonky auto top-level convenience targets
    These were meant to help build subdir targets from the top builddir, but cause
    infinite recursion when going the other way.
    
    If anyone actually uses these, we can add back specific targets.
    3577603701
  3. build: fix bitcoin-config.h regeneration after touching build files
    This was a long-standing and annoying problem.
    
    If autogen.sh was not manually run after touching configure.ac,
    bitcoin-config.h would not be properly regenerated. This causes very subtle
    problems when configure appears to enable a new value, but it does not end up
    reflected in the build.
    91ab8f5a99
  4. fanquake added the label Build system on Apr 18, 2017
  5. laanwj commented at 7:56 am on April 19, 2017: member

    Also, this undoes #4322, as it would introduce an infinite loop otherwise. I suspect that these convenience targets get very little use anymore, but we can always add back hard-coded ones if necessary.

    Which ones does this prevent use of? I use make src/bitcoind a lot.

  6. theuni commented at 3:29 pm on April 19, 2017: member
    @laanwj Only obscure targets. The bins are still listed there explicitly: https://github.com/bitcoin/bitcoin/blob/master/Makefile.am#L165, so make src/bitcoind still works.
  7. laanwj commented at 7:10 am on April 20, 2017: member

    @laanwj Only obscure targets. The bins are still listed there explicitly:

    Sounds good to me then.

  8. laanwj commented at 11:17 am on April 20, 2017: member

    This change makes sure that autoheader is re-run (as it’s supposed to be) any time configure.ac is touched.

    Something that makes me wonder: shouldn’t the entire process re-run when configure.ac is touched? Or is that the effect of this - was autoheader the only step missing for that?

  9. theuni commented at 2:17 pm on April 20, 2017: member

    Yes, that should be the case now. For some reason automake doesn’t push the autoheader rules down to subdirs, so it was never re-triggered if you build from src/.

    Thinking about it now, we should probably backport this for 0.14.2 as well, since switching branches is one of the most common ways this problem can show up.

  10. laanwj commented at 4:10 pm on April 20, 2017: member

    Thinking about it now, we should probably backport this for 0.14.2 as well, since switching branches is one of the most common ways this problem can show up.

    Good point - I don’t switch branches anymore for this reason (among others). I just have a git-worktree checkout per branch.

  11. luke-jr commented at 11:22 pm on April 20, 2017: member
    Any idea why we need to explicitly do this? Normally autotools takes care of it automagically…
  12. practicalswift commented at 11:27 pm on April 20, 2017: contributor

    utACK 91ab8f5a997dd1c838e2216fe1e676471bf680a3

    Thanks for fixing this @theuni

  13. sipa commented at 0:15 am on April 21, 2017: member
    Concept ACK
  14. theuni commented at 1:52 am on April 21, 2017: member
    @luke-jr I’m not sure. I suppose it’s just an autotools bug that they don’t generate the rules for subdirs.
  15. laanwj merged this on Apr 21, 2017
  16. laanwj closed this on Apr 21, 2017

  17. laanwj referenced this in commit 27faa6cccd on Apr 21, 2017
  18. MarcoFalke added the label Needs backport on Apr 23, 2017
  19. MarcoFalke added this to the milestone 0.14.2 on Apr 23, 2017
  20. laanwj removed the label Needs backport on May 31, 2017
  21. codablock referenced this in commit 5623326010 on Jan 26, 2018
  22. andvgal referenced this in commit 09c5e55974 on Jan 6, 2019
  23. CryptoCentric referenced this in commit 154f572d67 on Feb 27, 2019
  24. PastaPastaPasta referenced this in commit 491c90eac7 on May 10, 2019
  25. PastaPastaPasta referenced this in commit a2cf8fc6b9 on May 15, 2019
  26. PastaPastaPasta referenced this in commit a3467dd269 on May 20, 2019
  27. PastaPastaPasta referenced this in commit a482ba62e5 on May 21, 2019
  28. jasonbcox referenced this in commit 84d588c1cc on Jun 28, 2019
  29. jtoomim referenced this in commit 9e6cd8fb34 on Jun 29, 2019
  30. jonspock referenced this in commit 70b6c1c98b on Jul 5, 2019
  31. jonspock referenced this in commit a00a68b24e on Jul 9, 2019
  32. barrystyle referenced this in commit 9bc67221dc on Jan 22, 2020
  33. DrahtBot locked this on Dec 16, 2021

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: 2024-09-29 04:12 UTC

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