-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Refactor root build directories #13785
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
Conversation
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.
Looks good but is it what @arnaud-lb needed/requested right ? |
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. |
oh ok. |
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. |
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. |
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. |
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. |
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.