|
From: <jbo...@li...> - 2006-06-12 15:47:49
|
Author: jfr...@jb...
Date: 2006-06-12 11:47:43 -0400 (Mon, 12 Jun 2006)
New Revision: 4741
Modified:
labs/jbossweb/trunk/src/share/native/build/buildphp.sh
Log:
Remove the installed packages before building them.
Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh
===================================================================
--- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-06-12 10:18:55 UTC (rev 4740)
+++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-06-12 15:47:43 UTC (rev 4741)
@@ -128,17 +128,25 @@
# $1 : Source base directory
# $2 : Install directory
# $3 : Additional parameters for that machines/product.
-# $4 : Additional make command
+# $4 : Parameter like additional make command
+# depend : Do make depend
+# libtool : copy libtool
+# clean : remove existing installed dir.
Build()
{
BASDIR=$1
INSDIR=$2
ADDCON=$3
-ADDINS=$4
+ADDOPE=$4
SUBDIR=$5
echo "************************* Configure in ${BASDIR} ********************"
-echo "prefix: ${INSDIR}"
-echo "parameters: ${ADDCON}"
+echo "parameters: --prefix=${INSDIR} ${ADDCON}"
+case "${ADDOPE}" in
+ *clean*)
+ echo "cleaning ${INSDIR}"
+ rm -rf ${INSDIR}
+ ;;
+esac
if [ -z "${SUBDIR}" ]
then
SRCDIR=${BASDIR}
@@ -160,21 +168,23 @@
echo "configure in ${SRCDIR} failed"
exit 1
fi
- if [ "$ADDINS" = "depend" ]
- then
- make $ADDINS
- if [ $? -ne 0 ]
- then
- echo "Make $ADDINS in ${SRCDIR} failed"
- exit 1
- fi
- fi
- if [ "$ADDINS" = "libtool" ]
- then
+ case "${ADDOPE}" in
+ *depend*)
+ make depend
+ if [ $? -ne 0 ]
+ then
+ echo "Make depend in ${SRCDIR} failed"
+ exit 1
+ fi
+ ;;
+ esac
+ case "${ADDOPE}" in
+ *libtool*)
# On Solaris the libtool of old packages is broken
# It does not build shared libraries.
+ echo "Copying libtool"
cp $TOOLS/bin/libtool .
- fi
+ esac
make clean
if [ $? -ne 0 ]
then
@@ -193,15 +203,6 @@
echo "Make install in ${SRCDIR} failed"
exit 1
fi
- if [ ! -z "$ADDINS" ] && [ "$ADDINS" != "depend" ]
- then
- make $ADDINS
- if [ $? -ne 0 ]
- then
- echo "Make $ADDINS in ${SRCDIR} failed"
- exit 1
- fi
- fi
)
}
@@ -375,7 +376,7 @@
if ${BUILDFTT2}
then
Extract freetype ${FTT2URL} ${FTT2VER}
- Build freetype-${FTT2VER} ${TOOLS}/FTT2 "--enable-shared" "" ""
+ Build freetype-${FTT2VER} ${TOOLS}/FTT2 "--enable-shared" "clean+libtool" ""
ADDCONF="$ADDCONF --with-freetype-dir=$TOOLS/FTT2"
LGDCONF="$LGDCONF --with-freetype=$TOOLS/FTT2"
else
@@ -387,7 +388,7 @@
if ${BUILDICNV}
then
Extract libiconv ${ICNVURL} ${ICNVVER}
- Build libiconv-${ICNVVER} ${TOOLS}/ICNV "--enable-shared" "" ""
+ Build libiconv-${ICNVVER} ${TOOLS}/ICNV "--enable-shared" "clean" ""
ADDCONF="$ADDCONF --with-iconv-dir=$TOOLS/ICNV"
LGDCONF="$LGDCONF --with-libiconv-prefix=$TOOLS/ICNV"
fi
@@ -398,7 +399,7 @@
if ${BUILDMSQL}
then
Extract mysql ${MSQLURL} ${MSQLVER}
- Build mysql-${MSQLVER} ${TOOLS}/MSQL "--enable-shared" "" ""
+ Build mysql-${MSQLVER} ${TOOLS}/MSQL "--enable-shared" "clean" ""
fi
#
@@ -406,7 +407,7 @@
if ${BUILDKRB5}
then
Extract krb5 ${KRB5URL} ${KRB5VER}
- Build krb5-${KRB5VER} ${TOOLS}/KRB5 "--enable-shared --with-tcl=no" "" "src"
+ Build krb5-${KRB5VER} ${TOOLS}/KRB5 "--enable-shared --with-tcl=no" "clean" "src"
ADDCONF="$ADDCONF --with-kerberos=$TOOLS/KRB5"
else
if ${ALLOWCRYPTO}
@@ -422,7 +423,7 @@
if ${BUILDGTTX}
then
Extract gettext ${GTTXURL} ${GTTXVER}
- Build gettext-${GTTXVER} ${TOOLS}/GTTX "--enable-shared" "" ""
+ Build gettext-${GTTXVER} ${TOOLS}/GTTX "--enable-shared" "clean" ""
ADDCONF="$ADDCONF --with-gettext=$TOOLS/GTTX"
else
ADDCONF="$ADDCONF --with-gettext"
@@ -433,6 +434,7 @@
if ${BUILDJPEG}
then
# Directory are not created by jpeg installation...
+ rm -rf ${TOOLS}/JPEG
mkdir -p ${TOOLS}/JPEG/include
mkdir -p ${TOOLS}/JPEG/lib
mkdir -p ${TOOLS}/JPEG/bin
@@ -450,7 +452,7 @@
if ${BUILDLPNG}
then
Extract libpng ${LPNGURL} ${LPNGVER}
- Build libpng-${LPNGVER} ${TOOLS}/LPNG "" ""
+ Build libpng-${LPNGVER} ${TOOLS}/LPNG "clean" ""
ADDCONF="$ADDCONF --with-png-dir=$TOOLS/LPNG"
LGDCONF="$LGDCONF --with-png=$TOOLS/LPNG"
# libgd makes _very_ strange things with png.
@@ -471,7 +473,7 @@
if ${BUILDLBGD}
then
Extract gd ${LBGDURL} ${LBGDVER}
- Build gd-${LBGDVER} ${TOOLS}/LBGD "--without-xpm $LGDCONF" ""
+ Build gd-${LBGDVER} ${TOOLS}/LBGD "--without-xpm $LGDCONF" "clean" ""
ADDCONF="$ADDCONF --with-gd=$TOOLS/LBGD \
--enable-gd-native-ttf \
"
@@ -486,7 +488,7 @@
if ${BUILDXML2}
then
Extract libxml2 ${XML2URL} ${XML2VER}
- Build libxml2-${XML2VER} ${TOOLS}/LIBXML2 "" ""
+ Build libxml2-${XML2VER} ${TOOLS}/LIBXML2 "clean" ""
ADDCONF="$ADDCONF --with-libxml-dir=$TOOLS/LIBXML2"
else
ADDCONF="$ADDCONF --with-libxml-dir"
@@ -536,13 +538,13 @@
export CPPFLAGS
LDFLAGS=-L$TOOLS/SSL/lib
export LDFLAGS
- Build openldap-${LDAPVER} ${TOOLS}/LDAP "--with-threads --disable-slapd --with-tls=openssl" "depend"
+ Build openldap-${LDAPVER} ${TOOLS}/LDAP "--with-threads --disable-slapd --with-tls=openssl" "depend+clean" ""
else
if ${ALLOWCRYPTO}
then
- Build openldap-${LDAPVER} ${TOOLS}/LDAP "--with-threads --disable-slapd --with-tls" ""
+ Build openldap-${LDAPVER} ${TOOLS}/LDAP "--with-threads --disable-slapd --with-tls" "depend+clean" ""
else
- Build openldap-${LDAPVER} ${TOOLS}/LDAP "--with-threads --disable-slapd --without-tls --with-kerberos=no" ""
+ Build openldap-${LDAPVER} ${TOOLS}/LDAP "--with-threads --disable-slapd --without-tls --with-kerberos=no" "depend+clean" ""
fi
fi
ADDCONF="$ADDCONF --with-ldap=$TOOLS/LDAP"
@@ -558,9 +560,9 @@
Extract postgresql ${PSQLURL} ${PSQLVER}
if ${BUILDOSSL}
then
- Build postgresql-${PSQLVER} ${TOOLS}/POSTGRESQL "--without-readline LDFLAGS=-L${TOOLS}/SSL/lib" "" ""
+ Build postgresql-${PSQLVER} ${TOOLS}/POSTGRESQL "--without-readline LDFLAGS=-L${TOOLS}/SSL/lib" "clean" ""
else
- Build postgresql-${PSQLVER} ${TOOLS}/POSTGRESQL --without-readline "" ""
+ Build postgresql-${PSQLVER} ${TOOLS}/POSTGRESQL --without-readline "clean" ""
fi
ADDCONF="$ADDCONF --with-pgsql=$TOOLS/POSTGRESQL --with-pdo-pgsql=$TOOLS/POSTGRESQL/bin"
else
|