Skip to content

bpo-45020: Fix build out of source tree #28410

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

Merged
merged 1 commit into from
Sep 17, 2021
Merged

bpo-45020: Fix build out of source tree #28410

merged 1 commit into from
Sep 17, 2021

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 17, 2021

  • Makefile.pre.in: Add $(srcdir) when needed, remove it when it was
    used by mistake.
  • freeze_modules.py tool uses ./Programs/_freeze_module if the
    executable doesn't exist in the source tree.

https://bugs.python.org/issue45020

* Makefile.pre.in: Add $(srcdir) when needed, remove it when it was
  used by mistake.
* freeze_modules.py tool uses ./Programs/_freeze_module if the
  executable doesn't exist in the source tree.
@vstinner
Copy link
Member Author

cc @ericsnowcurrently

@Fidget-Spinner
Copy link
Member

Thanks for the fix Victor. I can't give a helpful review since I'm not a Make expert, but I want to add that the previous change broke pyperformance compile_all for me, and now I tested that it works again :)!

Copy link
Member

@ericsnowcurrently ericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for fixing this, Victor!

@vstinner
Copy link
Member Author

My test is to build Python out of source tree:

mkdir build
cd build
../configure --with-pydebug
make

Without this PR, it fails to build.

With this PR, it builds.

I also tested make regen-all (in build/) which is not a common use case (to use it when not building Python from the source tree), but I fixed it anyway.

@vstinner vstinner merged commit 41551ee into python:main Sep 17, 2021
@vstinner vstinner deleted the build_out_tree branch September 17, 2021 18:20
@vstinner
Copy link
Member Author

Thanks for the fix Victor. I can't give a helpful review since I'm not a Make expert, but I want to add that the previous change broke pyperformance compile_all for me, and now I tested that it works again :)!

I never met a Make expert. IMO real Make experts don't say it to avoid getting questions from other developers lost with autotools :-)

niyas-sait pushed a commit to niyas-sait/cpython that referenced this pull request Sep 21, 2021
* Makefile.pre.in: Add $(srcdir) when needed, remove it when it was
  used by mistake.
* freeze_modules.py tool uses ./Programs/_freeze_module if the
  executable doesn't exist in the source tree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants