xref: /PHP-7.3/buildconf (revision 9f5cb626)
1#!/bin/sh
2
3eval `grep '^PHP_EXTRA_VERSION=' configure.ac`
4case "$PHP_EXTRA_VERSION" in
5  *-dev)
6    dev=1
7    ;;
8  *)
9    dev=0
10    ;;
11esac
12
13devok=0
14debug=no
15
16while test $# -gt 0; do
17  if test "$1" = "--force"; then
18    devok=1
19    echo "Forcing buildconf"
20  fi
21
22  if test "$1" = "--debug"; then
23    debug=yes
24  fi
25
26  shift
27done
28
29if test "$dev" = "0" -a "$devok" = "0"; then
30  echo "You should not run buildconf in a release package." >&2
31  echo "use buildconf --force to override this check." >&2
32  exit 1
33fi
34
35if test "$devok" = "1"; then
36  echo "Removing configure caches"
37  rm -rf autom4te.cache config.cache
38fi
39
40rm -f generated_lists
41
42if test "$debug" = "yes"; then
43  ${MAKE:-make} -s -f build/build.mk SUPPRESS_WARNINGS=""
44else
45  ${MAKE:-make} -s -f build/build.mk
46fi
47