]> granicus.if.org Git - php/commitdiff
MFB buildconf sanity check
authorWez Furlong <wez@php.net>
Mon, 19 May 2003 11:47:13 +0000 (11:47 +0000)
committerWez Furlong <wez@php.net>
Mon, 19 May 2003 11:47:13 +0000 (11:47 +0000)
buildconf

index 5cd9ade76e60bdf557d1ce51f7a04e836d22dfe6..8c4ab6c298554083135d671263c48338626a5d4f 100755 (executable)
--- a/buildconf
+++ b/buildconf
@@ -1,6 +1,18 @@
 #!/bin/sh
 # $Id$
 
+eval `grep '^EXTRA_VERSION=' configure.in`
+case "$EXTRA_VERSION" in
+       *-dev)
+               dev=1
+               ;;
+       *)
+               dev=0
+               ;;
+esac
+
+devok=0
+
 while test $# -gt 0; do
     if test "$1" = "--copy"; then
         automake_flags=--copy
@@ -11,9 +23,20 @@ while test $# -gt 0; do
         echo "Using Zend Engine 2 code"
     fi
 
+       if test "$1" = "--force"; then
+               devok=1
+               echo "Forcing buildconf"
+       fi
+
     shift
 done
 
+if test "$dev" = "0" -a "$devok" = "0"; then
+       echo "You should not run buildconf in a release package."
+       echo "use buildconf --force to override this check."
+       exit 1
+fi
+
 if test -z "$ZENDDIR"; then
     ZENDDIR=Zend
     echo "using default Zend directory"