Skip to content

Commit c96f08a

Browse files
authored
Autotools: Normalize PHP_OUTPUT arguments (#15177)
The m4_normalize([$1]) normalizes items into a single-space-separated list of files to append them to the global PHP_OUTPUT_FILES variable that is processed by AC_CONFIG_FILES. Redundant newlines are also removed in the generated configure script. PHP extensions using phpize can't use this macro so it's safe to change this.
1 parent a578c27 commit c96f08a

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

build/php.m4

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,8 @@ dnl
9696
dnl Adds "file" to the list of files generated by AC_OUTPUT. This macro can be
9797
dnl used several times.
9898
dnl
99-
AC_DEFUN([PHP_OUTPUT],[
100-
PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
101-
])
99+
AC_DEFUN([PHP_OUTPUT],
100+
[AS_VAR_APPEND([PHP_OUTPUT_FILES], [" m4_normalize([$1])"])])
102101

103102
dnl ----------------------------------------------------------------------------
104103
dnl Build system base macros.

sapi/fpm/config.m4

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,14 @@ if test "$PHP_FPM" != "no"; then
508508

509509
PHP_ADD_BUILD_DIR([sapi/fpm/fpm])
510510
PHP_ADD_BUILD_DIR([sapi/fpm/fpm/events])
511-
PHP_OUTPUT([sapi/fpm/php-fpm.conf sapi/fpm/www.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html])
511+
PHP_OUTPUT([
512+
sapi/fpm/init.d.php-fpm
513+
sapi/fpm/php-fpm.8
514+
sapi/fpm/php-fpm.conf
515+
sapi/fpm/php-fpm.service
516+
sapi/fpm/status.html
517+
sapi/fpm/www.conf
518+
])
512519
PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag])
513520

514521
SAPI_FPM_PATH=sapi/fpm/php-fpm

0 commit comments

Comments
 (0)