Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions buildconf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@
#
# A wrapper around Autoconf that generates files to build PHP on *nix systems.

set -ex

PHP_AUTOCONF=${PHP_AUTOCONF:-autoconf}
PHP_AUTOHEADER=${PHP_AUTOHEADER:-autoheader}
force=0
debug=0

# Go to project root.
cd "$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)" || exit
cd "$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)"

php_extra_version=$(grep '^AC_INIT(' configure.ac) || exit
php_extra_version=$(grep '^AC_INIT(' configure.ac)
case "$php_extra_version" in
*-dev*)
dev=1
Expand Down
2 changes: 2 additions & 0 deletions scripts/dev/gen_verify_stub
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -ex

# Handle GNU vs. BSD checksum utilities
sha256sum="$(which sha256sum)"
sha256sum="${sha256sum:-$(which shasum) -a 256}"
Expand Down
4 changes: 3 additions & 1 deletion scripts/dev/genfiles
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
# For example:
# YACC=/path/to/bison ./genfiles

set -ex

YACC=${YACC:-bison}
YACC="$YACC -l"
YFLAGS="-Wall"
Expand All @@ -40,7 +42,7 @@ SED=${SED:-sed}
MAKE=${MAKE:-make}

# Go to project root.
cd "$(CDPATH='' cd -- "$(dirname -- "$0")/../../" && pwd -P)" || exit
cd "$(CDPATH='' cd -- "$(dirname -- "$0")/../../" && pwd -P)"

# Check required bison version from the configure.ac file.
required_bison_version=$($SED -n 's/PHP_PROG_BISON(\[\([0-9\.]*\)\].*/\1/p' configure.ac)
Expand Down
13 changes: 6 additions & 7 deletions scripts/dev/makedist
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@
# Written by Stig Bakken <ssb@guardian.no> 1997-05-28.
# Adapted to Git by Stanislav Malyshev <stas@php.net>.

set -ex

# Check whether gtar is present (GNU tar)
tar="$(which gtar)"
tar="${tar:-$(which tar)}"
tar="$(command -v gtar || command -v tar)"

# Handle GNU vs. BSD checksum utilities
md5sum="$(which md5sum)"
md5sum="${md5sum:-$(which md5)}"
md5sum="$(command -v md5sum || command -v md5)"

# GNU touch is preferred since it handles local TZ in timestamps
touch="$(which gtouch)"
touch="${touch:-$(which touch)}"
touch="$(command -v gtouch || command -v touch)"

if [[ $($tar --version) == *"bsdtar"* ]]; then
echo "Found bsdtar at $tar, but this script needs GNU tar."
exit 1
fi

# Go to project root directory.
cd "$(CDPATH='' cd -- "$(dirname -- "$0")/../../" && pwd -P)" || exit
cd "$(CDPATH='' cd -- "$(dirname -- "$0")/../../" && pwd -P)"

# Process options and arguments.
while :; do
Expand Down
Loading