summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--build/Makefile.global2
-rw-r--r--build/build.mk6
-rwxr-xr-xbuild/buildcheck.sh72
-rwxr-xr-xbuildconf42
-rwxr-xr-xscripts/dev/makedist4
6 files changed, 39 insertions, 92 deletions
diff --git a/.gitignore b/.gitignore
index 84f37445c8..8ed6d44385 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,12 +38,9 @@
# Standard object files generated during build process
*.o
-# Cache directories generated by Autoconf tools - autoconf, autoreconf...
+# Cache directories created by Autoconf tools
autom4te.cache/
-# Stamp file generated by `./buildconf` to run `./build/buildcheck.sh`
-/buildmk.stamp
-
# Cache file(s) generated by Autoconf's configure when run as `configure -C`
config.cache
diff --git a/build/Makefile.global b/build/Makefile.global
index acb9edcff7..4790e75d37 100644
--- a/build/Makefile.global
+++ b/build/Makefile.global
@@ -118,7 +118,7 @@ clean:
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
- rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c buildmk.stamp Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
+ rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h TSRM/tsrm_config.h
rm -f main/build-defs.h scripts/phpize
rm -f ext/date/lib/timelib_config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak
rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1
diff --git a/build/build.mk b/build/build.mk
index 678cbe90af..b246fa7c10 100644
--- a/build/build.mk
+++ b/build/build.mk
@@ -19,16 +19,12 @@
#
subdirs = Zend TSRM
-stamp = buildmk.stamp
config_h_in = main/php_config.h.in
PHP_AUTOCONF = autoconf
PHP_AUTOHEADER = autoheader
PHP_AUTOCONF_FLAGS = -f
-all: $(stamp) configure $(config_h_in)
-
-$(stamp): build/buildcheck.sh
- @build/buildcheck.sh $@
+all: configure $(config_h_in)
configure: configure.ac $(PHP_M4_FILES)
# Remove aclocal.m4 if present. It is automatically included by autoconf but
diff --git a/build/buildcheck.sh b/build/buildcheck.sh
deleted file mode 100755
index 6b07f3ae33..0000000000
--- a/build/buildcheck.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-#
-# +----------------------------------------------------------------------+
-# | PHP Version 7 |
-# +----------------------------------------------------------------------+
-# | Copyright (c) The PHP Group |
-# +----------------------------------------------------------------------+
-# | This source file is subject to version 3.01 of the PHP license, |
-# | that is bundled with this package in the file LICENSE, and is |
-# | available through the world-wide-web at the following url: |
-# | http://www.php.net/license/3_01.txt |
-# | If you did not receive a copy of the PHP license and are unable to |
-# | obtain it through the world-wide-web, please send a note to |
-# | license@php.net so we can mail you a copy immediately. |
-# +----------------------------------------------------------------------+
-# | Authors: Stig Bakken <ssb@php.net> |
-# | Sascha Schumann <sascha@schumann.cx> |
-# +----------------------------------------------------------------------+
-#
-# Check PHP build system tools such as autoconf and their versions.
-#
-# SYNOPSIS:
-# buildcheck.sh [stampfile]
-#
-# DESCRIPTION:
-# Optional stampfile is for Makefile to check build system only once.
-#
-# ENVIRONMENT:
-# The following optional variables are supported:
-#
-# PHP_AUTOCONF Overrides the path to autoconf tool.
-# PHP_AUTOCONF=/path/to/autoconf buildcheck.sh
-
-echo "buildconf: checking installation..."
-
-stamp=$1
-
-# Allow the autoconf executable to be overridden by $PHP_AUTOCONF.
-PHP_AUTOCONF=${PHP_AUTOCONF:-autoconf}
-
-# Go to project root.
-cd $(CDPATH= cd -- "$(dirname -- "$0")/../" && pwd -P)
-
-# Get minimum required autoconf version from the configure.ac file.
-min_version=$(sed -n 's/AC_PREREQ(\[\(.*\)\])/\1/p' configure.ac)
-
-# Check if autoconf exists.
-ac_version=$($PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//')
-
-if test -z "$ac_version"; then
- echo "buildconf: autoconf not found." >&2
- echo " You need autoconf version $min_version or newer installed" >&2
- echo " to build PHP from Git." >&2
- exit 1
-fi
-
-# Check autoconf version.
-set -f; IFS='.'; set -- $ac_version; set +f; IFS=' '
-ac_version_num="$(expr ${1} \* 10000 + ${2} \* 100)"
-set -f; IFS='.'; set -- $min_version; set +f; IFS=' '
-min_version_num="$(expr ${1} \* 10000 + ${2} \* 100)"
-
-if test "$ac_version_num" -lt "$min_version_num"; then
- echo "buildconf: autoconf version $ac_version found." >&2
- echo " You need autoconf version $min_version or newer installed" >&2
- echo " to build PHP from Git." >&2
- exit 1
-else
- echo "buildconf: autoconf version $ac_version (ok)"
-fi
-
-test -n "$stamp" && touch $stamp
diff --git a/buildconf b/buildconf
index 87fda4fc59..f3ce3e6ca5 100755
--- a/buildconf
+++ b/buildconf
@@ -78,6 +78,42 @@ if test "$dev" = "0" -a "$force" = "0"; then
fi
fi
+if test "$force" = "1"; then
+ echo "buildconf: Forcing buildconf"
+ echo "buildconf: Removing configure caches and files"
+ rm -rf autom4te.cache config.cache configure
+fi
+
+echo "buildconf: Checking installation"
+
+# Get minimum required autoconf version from the configure.ac file.
+min_version=$(sed -n 's/AC_PREREQ(\[\(.*\)\])/\1/p' configure.ac)
+
+# Check if autoconf exists.
+ac_version=$($PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//')
+
+if test -z "$ac_version"; then
+ echo "buildconf: autoconf not found." >&2
+ echo " You need autoconf version $min_version or newer installed" >&2
+ echo " to build PHP from Git." >&2
+ exit 1
+fi
+
+# Check autoconf version.
+set -f; IFS='.'; set -- $ac_version; set +f; IFS=' '
+ac_version_num="$(expr ${1} \* 10000 + ${2} \* 100)"
+set -f; IFS='.'; set -- $min_version; set +f; IFS=' '
+min_version_num="$(expr ${1} \* 10000 + ${2} \* 100)"
+
+if test "$ac_version_num" -lt "$min_version_num"; then
+ echo "buildconf: autoconf version $ac_version found." >&2
+ echo " You need autoconf version $min_version or newer installed" >&2
+ echo " to build PHP from Git." >&2
+ exit 1
+else
+ echo "buildconf: autoconf version $ac_version (ok)"
+fi
+
# Check if make exists.
if ! test -x "$(command -v $MAKE)"; then
echo "buildconf: make not found." >&2
@@ -85,12 +121,6 @@ if ! test -x "$(command -v $MAKE)"; then
exit 1
fi
-if test "$force" = "1"; then
- echo "buildconf: Forcing buildconf"
- echo "buildconf: Removing configure caches and files"
- rm -rf autom4te.cache config.cache configure
-fi
-
echo "buildconf: Building configure files"
if test "$debug" = "1"; then
diff --git a/scripts/dev/makedist b/scripts/dev/makedist
index 588a7e344b..2bea7c5e80 100755
--- a/scripts/dev/makedist
+++ b/scripts/dev/makedist
@@ -78,10 +78,6 @@ done
set -x
./buildconf --force
-# remove buildmk.stamp. Otherwise, buildcheck.sh might not be run,
-# when a user runs buildconf in the distribution.
-rm -f buildmk.stamp
-
# Generate lexer and parser files
./scripts/dev/genfiles
exit_code=$?