[php-src] master: Refactor root build directories (#13785)

From: Date: Wed, 27 Mar 2024 15:20:08 +0000
Subject: [php-src] master: Refactor root build directories (#13785)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-127871@lists.php.net to get a copy of this message
Author: Peter Kokot (petk) Committer: GitHub (web-flow) Pusher: petk Date: 2024-03-27T16:20:03+01:00 Commit: https://github.com/php/php-src/commit/413f2cd427c79d24d076d5a80f661b00f3ddfa80 Raw diff: https://github.com/php/php-src/commit/413f2cd427c79d24d076d5a80f661b00f3ddfa80.diff Refactor root build directories (#13785) 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. Changed paths: M build/php.m4 M configure.ac Diff: diff --git a/build/php.m4 b/build/php.m4 index f75b4a8b534a..be5763c520c9 100644 --- a/build/php.m4 +++ b/build/php.m4 @@ -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,,[ diff --git a/configure.ac b/configure.ac index 1551ab5d7626..2bf60c434d99 100644 --- a/configure.ac +++ b/configure.ac @@ -1228,6 +1228,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 @@ -1747,19 +1748,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 \ @@ -1794,8 +1797,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

« previous php.cvs (#127871) next »