X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=rebuild;h=fe6576e2e49d3b2c34bb6b8ce8db007efc37a939;hp=0643c83ef3e071d65938243a88eb0ea48b4bef6b;hb=a759e1fae5a4d0e989b9735adf8f3224ed9419d7;hpb=87bb1a405f87dfa3c175d3a6cf88597c67284456 diff --git a/rebuild b/rebuild index 0643c83..fe6576e 100755 --- a/rebuild +++ b/rebuild @@ -1,8 +1,16 @@ #!/bin/bash rm -f warnings +if test -d "$1"; then + PREFIX=$1 +else + PREFIX=/opt +fi + +echo "Using prefix '$PREFIX' for phpize and php-config!" + echo -n "executing phpize... " -phpize 2>&1 >/dev/null +${PREFIX}/bin/phpize 2>&1 >/dev/null if test $? -ne 0 ; then echo "FAILED!" exit 1 @@ -10,8 +18,8 @@ fi echo "DONE" echo -n "configuring... " -CFLAGS="-W -Wchar-subscripts -Wformat=2 -Wno-format-y2k -Wimplicit -Wmissing-braces -Wunused-variable -Wbad-function-cast -Wpointer-arith -Wsign-compare -Winline" \ - ./configure >/dev/null +CFLAGS="-Wall -Wextra -Wno-unused-parameter -Wfloat-equal -Wdeclaration-after-statement -Wundef -Wbad-function-cast -Wcast-align -Wmissing-field-initializers -Wnested-externs" \ + ./configure --with-php-config=${PREFIX}/bin/php-config $2 >/dev/null if test $? -ne 0 ; then echo "FAILED!" exit 1 @@ -19,7 +27,7 @@ fi echo "DONE" echo -n "building... " -make clean install 2>warnings >/dev/null +make clean all 2>warnings >/dev/null if test $? -ne 0 ; then echo "FAILED!" else @@ -27,6 +35,6 @@ else fi if test -s warnings; then - cat warnings + grep -E "^/.+http" warnings fi