Skip to content

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

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion build/php.m4
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,11 @@ AC_DEFUN([PHP_SELECT_SAPI],[
])

dnl
dnl PHP_ADD_BUILD_DIR
dnl PHP_ADD_BUILD_DIR(dirs [, create])
dnl
dnl Add build directories and directories required for the out-of-source builds.
dnl When "create" is given, the provided "dirs" are created immediately upon
dnl macro invocation, instead of deferring it to the PHP_GEN_BUILD_DIRS.
dnl
AC_DEFUN([PHP_ADD_BUILD_DIR],[
ifelse($2,,[
Expand Down
21 changes: 11 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,7 @@ if test "$PHP_PEAR" != "no"; then
esac
fi

PHP_ADD_BUILD_DIR([pear])
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/pear/Makefile.frag,$abs_srcdir/pear,pear)
fi

Expand Down Expand Up @@ -1740,19 +1741,21 @@ PHP_ADD_SOURCES(Zend, \
Optimizer/zend_dump.c \
, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)

PHP_ADD_BUILD_DIR(main main/streams)
PHP_ADD_BUILD_DIR(TSRM)
PHP_ADD_BUILD_DIR(Zend Zend/asm Zend/Optimizer)

PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/scripts/Makefile.frag,$abs_srcdir/scripts,scripts)
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Zend/Makefile.frag,$abs_srcdir/Zend,Zend)

AC_DEFINE([HAVE_BUILD_DEFS_H], 1, [ ])

dnl Make directories when building in a separate build directory.
$php_shtool mkdir -p pear
$php_shtool mkdir -p scripts
$php_shtool mkdir -p scripts/man1
PHP_ADD_BUILD_DIR([m4_normalize([
main
main/streams
scripts
scripts/man1
TSRM
Zend
Zend/asm
Zend/Optimizer
])])

ALL_OUTPUT_FILES="main/build-defs.h \
scripts/phpize scripts/man1/phpize.1 \
Expand Down Expand Up @@ -1787,8 +1790,6 @@ fi

dnl Create configuration headers.
dnl ----------------------------------------------------------------------------
test -d Zend || $php_shtool mkdir Zend

cat >Zend/zend_config.h <<FEO
#include <../main/php_config.h>
FEO
Expand Down