Skip to content

Commit e4197bb

Browse files
committed
Create modules directory in a centralized location
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.
1 parent 0941507 commit e4197bb

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

build/php.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
128128
AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
129129
> Makefile.objects
130130
> Makefile.fragments
131+
dnl Create directory for storing shared objects of extensions.
132+
phplibdir=`pwd`/modules
133+
$phpshtool mkdir -p $phplibdir
134+
PHP_SUBST(phplibdir)dnl
131135
])
132136

133137
dnl

configure.ac

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,8 +1401,6 @@ case `eval echo $datadir` in
14011401
;;
14021402
esac
14031403

1404-
phplibdir=`pwd`/modules
1405-
$php_shtool mkdir -p $phplibdir
14061404
phptempdir=`pwd`/libs
14071405

14081406
old_exec_prefix=$exec_prefix
@@ -1529,7 +1527,6 @@ PHP_SUBST_OLD(program_suffix)
15291527
PHP_SUBST(includedir)
15301528
PHP_SUBST(libdir)
15311529
PHP_SUBST(mandir)
1532-
PHP_SUBST(phplibdir)
15331530
PHP_SUBST(phptempdir)
15341531
PHP_SUBST(prefix)
15351532
PHP_SUBST(localstatedir)

scripts/phpize.m4

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ AC_PROG_LIBTOOL
162162

163163
all_targets='$(PHP_MODULES) $(PHP_ZEND_EX)'
164164
install_targets="install-modules install-headers"
165-
phplibdir="`pwd`/modules"
166165
CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H"
167166
CFLAGS_CLEAN='$(CFLAGS) -D_GNU_SOURCE'
168167
CXXFLAGS_CLEAN='$(CXXFLAGS)'
@@ -188,7 +187,6 @@ PHP_SUBST(prefix)
188187
PHP_SUBST(exec_prefix)
189188
PHP_SUBST(libdir)
190189
PHP_SUBST(prefix)
191-
PHP_SUBST(phplibdir)
192190
PHP_SUBST(phpincludedir)
193191

194192
PHP_SUBST(CC)
@@ -213,8 +211,6 @@ PHP_SUBST(BUILD_CC)
213211
PHP_GEN_BUILD_DIRS
214212
PHP_GEN_GLOBAL_MAKEFILE
215213

216-
test -d modules || $php_shtool mkdir modules
217-
218214
AC_CONFIG_HEADERS([config.h])
219215

220216
AC_CONFIG_COMMANDS_PRE([PHP_PATCH_CONFIG_HEADERS([config.h.in])])

0 commit comments

Comments
 (0)