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

Refactor root build directories #13785

Merged
merged 1 commit into from
Mar 27, 2024
Merged

Refactor root build directories #13785

merged 1 commit into from
Mar 27, 2024

Conversation

petk
Copy link
Member

@petk petk commented Mar 22, 2024

This adds all root build directories in one call. PEAR directory is created only when enabled and duplicated Zend directory creation is removed, because it was intended for the zend_config.h when building out-of-source or using the config.status manually before the PHP_ADD_BUILD_DIR was introduced in the build system.

This adds all root build directories in one call. PEAR directory is
created only when enabled and duplicated Zend directory creation is
removed, because it was intended for the zend_config.h when building
out-of-source or using the config.status manually before the
PHP_ADD_BUILD_DIR was introduced in the build system.
@devnexen
Copy link
Member

Looks good but is it what @arnaud-lb needed/requested right ?

@petk
Copy link
Member Author

petk commented Mar 23, 2024

Those are include flags (-I/path/... -I/path/...) and this is a list of directories to be created using mkdir when building. Nothing is added to the flags here, only mkdir command is used.

@devnexen
Copy link
Member

oh ok.

@petk
Copy link
Member Author

petk commented Mar 23, 2024

Actually, it is very simple issue. They are only created for the out-of-source builds. And the issue is that other macros should create these directories automatically, but to change all those macros and to be sure it works is a bit too difficult. For example, when adding sources PHP_ADD_SOURCES(...) it should also create a build directory automatically. Actually, I've now even noticed that AC_CONFIG_FILES already creates directories in newer Autoconf versions. So some can already be even more simplified (scripts and scripts/man1 for example). I'll see what can be done. Writing Autoconf code is like moving some Yenga blocks and hoping everything still works.

@devnexen
Copy link
Member

I see but I thought I ve read somewhere arnaud build out the tree but I might have confused with what you re solving here.

@petk
Copy link
Member Author

petk commented Mar 23, 2024

Basically goal here is to get to something that Autoconf documentation recommends and to make the config.status script invocation useful :D Because config.status can be used to quickly only recreate all the generated files (main/php_config.h, main/internal_functions.c ...). But this workflow is not so known in php-src. For example, you change some C code that needs configuration files changed, then run config.status and that's it. At least theoretically.

The include directories will be also rechecked. It has about 2 unresolved issues with configuration headers.

@petk petk merged commit 413f2cd into php:master Mar 27, 2024
10 checks passed
@petk petk deleted the patch-build-dirs branch March 27, 2024 15:20
@petk
Copy link
Member Author

petk commented Mar 27, 2024

I'll merge this one and probably refactor it further later on - those main, scripts, and scripts/man directories (and probably some others) can be also created by AC_CONFIG_FILES automatically. But it is a separate issue and to not introduce too many changes at once here with this.

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