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

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

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.
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
Copy link
Member

laanwj 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
Copy link
Member Author

theuni 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
Copy link
Member

laanwj commented Apr 20, 2017

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

Sounds good to me then.

@laanwj
Copy link
Member

laanwj 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
Copy link
Member Author

theuni 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
Copy link
Member

laanwj 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
Copy link
Member

laanwj commented Apr 20, 2017

utACK 91ab8f5

@luke-jr
Copy link
Member

luke-jr commented Apr 20, 2017

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

@practicalswift
Copy link
Contributor

utACK 91ab8f5

Thanks for fixing this @theuni

@sipa
Copy link
Member

sipa commented Apr 21, 2017

Concept ACK

@theuni
Copy link
Member Author

theuni 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
laanwj added a commit that referenced this pull request Apr 21, 2017
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
@maflcko maflcko added this to the 0.14.2 milestone Apr 23, 2017
@jonasschnelli jonasschnelli mentioned this pull request May 31, 2017
codablock pushed a commit to codablock/dash that referenced this pull request Jan 26, 2018
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 pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
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 pushed a commit to absolute-community/absolute that referenced this pull request Feb 27, 2019
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 pushed a commit to PastaPastaPasta/dash that referenced this pull request May 10, 2019
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 pushed a commit to PastaPastaPasta/dash that referenced this pull request May 15, 2019
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 pushed a commit to PastaPastaPasta/dash that referenced this pull request May 20, 2019
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 pushed a commit to PastaPastaPasta/dash that referenced this pull request May 21, 2019
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
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 pushed a commit to jtoomim/bitcoin-abc that referenced this pull request Jun 29, 2019
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 pushed a commit to jonspock/devault that referenced this pull request Jul 5, 2019
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 pushed a commit to devaultcrypto/devault that referenced this pull request Jul 9, 2019
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
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants