mirror of
https://github.com/php/php-src.git
synced 2024-11-23 09:54:15 +08:00
Remove PHP atomic includes and PHP_DEFINE M4 macro (#13372)
PHP_DEFINE was introduced with the PHP 5 build system9d9d39a0de
and then refactored via350de12bc2
. This was once used to put defined constants into a single file to have more fine-graned dependencies (atomic includes). Since no known PHP extension is using this and it makes very little sense to use this, this M4 macro can be removed in favor of the Autoconf native way using AC_DEFINE and the usual included files php_config.h and config.h. - Generated unused include directory removed - Remove include dir from DEFS - Remove also include dir from PDO checks
This commit is contained in:
parent
250547c7ab
commit
eb76a83008
1
.gitignore
vendored
1
.gitignore
vendored
@ -79,7 +79,6 @@ Makefile.fragments
|
||||
Makefile.objects
|
||||
|
||||
# Directories for shared object files and headers generated by `./configure`
|
||||
include/
|
||||
libs/
|
||||
modules/
|
||||
|
||||
|
@ -63,6 +63,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
|
||||
- Symbol DARWIN has been removed (use __APPLE__ to target Darwin systems).
|
||||
- Symbol MISSING_FCLOSE_DECL and M4 macro PHP_MISSING_FCLOSE_DECL removed.
|
||||
- Symbol HAVE_BSD_ICONV has been removed.
|
||||
- M4 macro PHP_DEFINE (atomic includes) removed (use AC_DEFINE and config.h).
|
||||
|
||||
c. Windows build system changes
|
||||
- The configure options --with-oci8-11g, --with-oci8-12c, --with-oci8-19 have
|
||||
|
@ -2,7 +2,7 @@ mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p
|
||||
INSTALL = $(top_srcdir)/build/shtool install -c
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
|
||||
DEFS = -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir)
|
||||
DEFS = -I$(top_builddir)/main -I$(top_srcdir)
|
||||
COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH)
|
||||
|
||||
all: $(all_targets)
|
||||
@ -135,7 +135,6 @@ distclean: clean
|
||||
if test "$(srcdir)" != "$(builddir)"; then \
|
||||
rm -f ext/phar/phar/phar.inc; \
|
||||
fi
|
||||
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
|
||||
|
||||
prof-gen:
|
||||
CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-generate all
|
||||
|
17
build/php.m4
17
build/php.m4
@ -69,15 +69,6 @@ AC_DEFUN([PHP_EXPAND_PATH],[
|
||||
fi
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_DEFINE(WHAT [, value[, directory]])
|
||||
dnl
|
||||
dnl Creates builddir/include/what.h and in there #define WHAT value.
|
||||
dnl
|
||||
AC_DEFUN([PHP_DEFINE],[
|
||||
[echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > ]ifelse([$3],,[include],[$3])[/php_]translit($1,A-Z,a-z)[.h]
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl PHP_SUBST(varname)
|
||||
dnl
|
||||
@ -135,12 +126,8 @@ dnl Creates build directories and Makefile placeholders.
|
||||
dnl
|
||||
AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
|
||||
AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
|
||||
test -d include || $php_shtool mkdir include
|
||||
> Makefile.objects
|
||||
> Makefile.fragments
|
||||
dnl We need to play tricks here to avoid matching the grep line itself.
|
||||
pattern=define
|
||||
$EGREP $pattern'.*include/php' $srcdir/configure|$SED 's/.*>//'|xargs touch 2>/dev/null
|
||||
])
|
||||
|
||||
dnl
|
||||
@ -2115,9 +2102,7 @@ dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]])
|
||||
dnl
|
||||
AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[
|
||||
AC_CACHE_CHECK([for PDO includes], pdo_cv_inc_path, [
|
||||
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
|
||||
pdo_cv_inc_path=$abs_srcdir/ext
|
||||
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
|
||||
if test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
|
||||
pdo_cv_inc_path=$abs_srcdir/ext
|
||||
elif test -f $phpincludedir/ext/pdo/php_pdo_driver.h; then
|
||||
pdo_cv_inc_path=$phpincludedir/ext
|
||||
|
@ -1692,7 +1692,7 @@ PHP_SUBST(all_targets)
|
||||
PHP_SUBST(install_targets)
|
||||
PHP_SUBST(install_binary_targets)
|
||||
|
||||
PHP_INSTALL_HEADERS([Zend/ TSRM/ include/ main/ main/streams/])
|
||||
PHP_INSTALL_HEADERS([Zend/ TSRM/ main/ main/streams/])
|
||||
PHP_INSTALL_HEADERS([Zend/Optimizer], [ \
|
||||
zend_call_graph.h \
|
||||
zend_cfg.h \
|
||||
|
@ -7,8 +7,6 @@
|
||||
especially noticeable on slower systems
|
||||
* slow recursive make replaced with one global Makefile
|
||||
* eases integration of proper dependencies
|
||||
* adds PHP_DEFINE(what[, value]) which creates a single include-file per what.
|
||||
This will allow more fine-grained dependencies.
|
||||
* abandoning the "one library per directory" concept
|
||||
* improved integration of the CLI
|
||||
* several new targets:
|
||||
|
Loading…
Reference in New Issue
Block a user