Skip to content
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

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

Merged
merged 2 commits into from Apr 21, 2017

Conversation

@theuni
Copy link
Member

commented Apr 18, 2017

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.

theuni added 2 commits Apr 18, 2017
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.
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.
@laanwj

This comment has been minimized.

Copy link
Member

commented Apr 19, 2017

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.

@theuni

This comment has been minimized.

Copy link
Member Author

commented Apr 19, 2017

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

@laanwj

This comment has been minimized.

Copy link
Member

commented Apr 20, 2017

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

Sounds good to me then.

@laanwj

This comment has been minimized.

Copy link
Member

commented Apr 20, 2017

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?

@theuni

This comment has been minimized.

Copy link
Member Author

commented Apr 20, 2017

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.

@laanwj

This comment has been minimized.

Copy link
Member

commented Apr 20, 2017

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.

@laanwj

This comment has been minimized.

Copy link
Member

commented Apr 20, 2017

utACK 91ab8f5

@luke-jr

This comment has been minimized.

Copy link
Member

commented Apr 20, 2017

Any idea why we need to explicitly do this? Normally autotools takes care of it automagically...

@practicalswift

This comment has been minimized.

Copy link
Member

commented Apr 20, 2017

utACK 91ab8f5

Thanks for fixing this @theuni

@sipa

This comment has been minimized.

Copy link
Member

commented Apr 21, 2017

Concept ACK

@theuni

This comment has been minimized.

Copy link
Member Author

commented Apr 21, 2017

@luke-jr I'm not sure. I suppose it's just an autotools bug that they don't generate the rules for subdirs.

@laanwj laanwj merged commit 91ab8f5 into bitcoin:master Apr 21, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
laanwj added a commit that referenced this pull request Apr 21, 2017
Merge #10228: build: regenerate bitcoin-config.h as necessary
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9

@MarcoFalke MarcoFalke added this to the 0.14.2 milestone Apr 23, 2017

@jonasschnelli jonasschnelli referenced this pull request May 31, 2017

@laanwj laanwj removed the Needs backport label May 31, 2017

codablock added a commit to codablock/dash that referenced this pull request Jan 26, 2018
Merge bitcoin#10228: build: regenerate bitcoin-config.h as necessary
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9
andvgal added a commit to energicryptocurrency/energi that referenced this pull request Jan 6, 2019
Merge bitcoin#10228: build: regenerate bitcoin-config.h as necessary
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9
CryptoCentric added a commit to absolute-community/absolute that referenced this pull request Feb 27, 2019
Merge bitcoin#10228: build: regenerate bitcoin-config.h as necessary
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request May 10, 2019
Merge bitcoin#10228: build: regenerate bitcoin-config.h as necessary
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request May 15, 2019
Merge bitcoin#10228: build: regenerate bitcoin-config.h as necessary
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request May 20, 2019
Merge bitcoin#10228: build: regenerate bitcoin-config.h as necessary
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9
PastaPastaPasta added a commit to PastaPastaPasta/dash that referenced this pull request May 21, 2019
Merge bitcoin#10228: build: regenerate bitcoin-config.h as necessary
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jun 28, 2019
Merge #10228: build: regenerate bitcoin-config.h as necessary
Summary:
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9

Backport of Core PR10228
bitcoin/bitcoin#10228

Test Plan:
  cd build/
  make clean
  rm src/config/stamp-h1
  rm src/config/bitcoin-config.h
  make check
  ls src/config/

`make check` should build successfully and `bitcoin-config.h` and `stamp-h1` files should be present in `build/src/config/`.

Reviewers: deadalnix, Fabien, jasonbcox, markblundeberg, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D3384
jtoomim added a commit to jtoomim/bitcoin-abc that referenced this pull request Jun 29, 2019
Merge #10228: build: regenerate bitcoin-config.h as necessary
Summary:
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9

Backport of Core PR10228
bitcoin/bitcoin#10228

Test Plan:
  cd build/
  make clean
  rm src/config/stamp-h1
  rm src/config/bitcoin-config.h
  make check
  ls src/config/

`make check` should build successfully and `bitcoin-config.h` and `stamp-h1` files should be present in `build/src/config/`.

Reviewers: deadalnix, Fabien, jasonbcox, markblundeberg, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D3384
jonspock added a commit to jonspock/devault that referenced this pull request Jul 5, 2019
Merge #10228: build: regenerate bitcoin-config.h as necessary
Summary:
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9

Backport of Core PR10228
bitcoin/bitcoin#10228

Test Plan:
  cd build/
  make clean
  rm src/config/stamp-h1
  rm src/config/bitcoin-config.h
  make check
  ls src/config/

`make check` should build successfully and `bitcoin-config.h` and `stamp-h1` files should be present in `build/src/config/`.

Reviewers: deadalnix, Fabien, jasonbcox, markblundeberg, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D3384
jonspock added a commit to devaultcrypto/devault that referenced this pull request Jul 9, 2019
Merge #10228: build: regenerate bitcoin-config.h as necessary
Summary:
91ab8f5 build: fix bitcoin-config.h regeneration after touching build files (Cory Fields)
3577603 build: remove wonky auto top-level convenience targets (Cory Fields)

Tree-SHA512: 2e68634439eeb7eca43cd2858135a583bfe0cf146e021a8384a24f7267aacc6f99bdc7a6d497a04d32e6a03e9446f0f599afb5bd53346dadf19f47d5fb2ea9f9

Backport of Core PR10228
bitcoin/bitcoin#10228

Test Plan:
  cd build/
  make clean
  rm src/config/stamp-h1
  rm src/config/bitcoin-config.h
  make check
  ls src/config/

`make check` should build successfully and `bitcoin-config.h` and `stamp-h1` files should be present in `build/src/config/`.

Reviewers: deadalnix, Fabien, jasonbcox, markblundeberg, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: deadalnix, O1 Bitcoin ABC, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D3384
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.