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.
This commit is contained in:
Peter Kokot 2024-08-01 00:14:56 +02:00 committed by GitHub
parent a578c27a51
commit c96f08aa70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions

View File

@ -96,9 +96,8 @@ dnl
dnl Adds "file" to the list of files generated by AC_OUTPUT. This macro can be
dnl used several times.
dnl
AC_DEFUN([PHP_OUTPUT],[
PHP_OUTPUT_FILES="$PHP_OUTPUT_FILES $1"
])
AC_DEFUN([PHP_OUTPUT],
[AS_VAR_APPEND([PHP_OUTPUT_FILES], [" m4_normalize([$1])"])])
dnl ----------------------------------------------------------------------------
dnl Build system base macros.

View File

@ -508,7 +508,14 @@ if test "$PHP_FPM" != "no"; then
PHP_ADD_BUILD_DIR([sapi/fpm/fpm])
PHP_ADD_BUILD_DIR([sapi/fpm/fpm/events])
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])
PHP_OUTPUT([
sapi/fpm/init.d.php-fpm
sapi/fpm/php-fpm.8
sapi/fpm/php-fpm.conf
sapi/fpm/php-fpm.service
sapi/fpm/status.html
sapi/fpm/www.conf
])
PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/fpm/Makefile.frag])
SAPI_FPM_PATH=sapi/fpm/php-fpm