mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Automatically remove aclocal.m4 if present
Commit 4e7064d173 removed the usage of
`aclocal.m4`. When using Git repositories, many times cleaning of the
generated files is not done prior to running phpize or buildconf. For
example:
git clone git://github.com/php/php-src
cd php-src
git checkout PHP-7.3
./buildconf
./configure
git checkout PHP-7.4
./buildconf # -> warnings
./configure # -> errors
To not accidentally include `aclocal.m4` file in the generated configure
this enhances build system experience a bit more by removing aclocal.m4
file prior to start building configure file using phpize or buildconf.
This commit is contained in:
@@ -31,8 +31,10 @@ $(stamp): build/buildcheck.sh
|
||||
@build/buildcheck.sh $@
|
||||
|
||||
configure: configure.ac $(PHP_M4_FILES)
|
||||
# Remove aclocal.m4 if present. It is automatically included by autoconf but
|
||||
# not used by the PHP build system since PHP 7.4.
|
||||
@echo rebuilding $@
|
||||
@rm -f $@
|
||||
@rm -f $@ aclocal.m4
|
||||
@$(PHP_AUTOCONF) $(PHP_AUTOCONF_FLAGS)
|
||||
|
||||
$(config_h_in): configure
|
||||
|
||||
@@ -157,6 +157,10 @@ phpize_replace_prefix()
|
||||
|
||||
phpize_autotools()
|
||||
{
|
||||
# Remove aclocal.m4 if present. It is automatically included by autoconf but
|
||||
# not used by the PHP build system since PHP 7.4.
|
||||
rm -f aclocal.m4
|
||||
|
||||
$PHP_AUTOCONF || exit 1
|
||||
$PHP_AUTOHEADER || exit 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user