Skip to content

Create modules directory in a centralized location #13411

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 2 commits into from
Mar 21, 2024

Conversation

petk
Copy link
Member

@petk petk commented Feb 16, 2024

Shared objects of extensions during the build are copied to the modules directory. It is a practice established since the early days of the PHP build system. This change ensures that the directory is consistently created in a single location, for both the primary PHP build process and when utilizing phpize within extensions. For now, the shtool is still utilized, until it can be clear that it is obsolete on current systems and their shells in favor of the native mkdir.

@petk
Copy link
Member Author

petk commented Feb 17, 2024

I'll add some more changes here to make it a bit more robust. Sorry, I've missed it before opening the PR. That phplibdir variable shouldn't change the value during the configuration...

@petk petk force-pushed the patch-modules-dir branch from e4197bb to 2c65dea Compare February 18, 2024 08:28
@petk petk marked this pull request as draft February 18, 2024 08:29
Shared objects of extensions during the *nix build are copied to the
`modules` directory. It is a practice established since the early days
of the PHP build system. Other build systems may have similar concept of
"library destination directory". On Windows, they are put into the root
build directory. Such directory simplifies collection of the shared
extensions during testing, or when running the cli executable at the end
of the build process.

This change ensures that the directory is consistently created in a
single location, for both the primary PHP build process and when
utilizing `phpize` within community extensions.

The AC_CONFIG_COMMANDS_PRE is executed at the end of the configuration
phase, before creating the config.status script, where also build
directories and global Makefile are created.

The pwd is executed using the recommended $(...) instead of the obsolete
backticks. Autoconf automatically locates the proper shell and
re-executes the configure script if such case is found that $(...) is
not supported (the initial /bin/sh on Solaris 10, for example).
@petk petk force-pushed the patch-modules-dir branch from 2c65dea to 3ac9e5d Compare March 20, 2024 07:06
@petk petk marked this pull request as ready for review March 20, 2024 07:06
@petk
Copy link
Member Author

petk commented Mar 20, 2024

This one is now ready. Details are in the Git commit message. Build tested with in-source, out-of-source, phpized in-source and out-of-source.

I'll merged it in the following days if everyone is fine with this. cc @devnexen

@petk petk requested a review from devnexen March 20, 2024 07:10
Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

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

See no issue there.

@petk petk merged commit 530e0d6 into php:master Mar 21, 2024
@petk petk deleted the patch-modules-dir branch March 21, 2024 16:43
@petk
Copy link
Member Author

petk commented Mar 21, 2024

Merged to master. In case anything interfering is found, I'll add further patches, but I don't expect any issues here.

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.

2 participants