new release/build scripts

This commit is contained in:
Guenter Obiltschnig
2008-09-29 07:43:47 +00:00
parent 9bc329f95d
commit ce17ae2c66
4 changed files with 108 additions and 192 deletions

63
dist/configure vendored
View File

@@ -2,17 +2,14 @@
#
# configure
#
# $Id: //poco/Main/dist/configure#8 $
# $Id: //poco/1.3/dist/configure#6 $
#
# Configuration script for POCO.
#
# Usage:
# configure [<options>...]
#
# Specify --help to display supported options.
# Invoke configure --help for help.
#
showhelp ()
showhelp()
{
cat << ENDHELP
usage: configure {options}
@@ -52,35 +49,52 @@ Options:
Compile with -DPOCO_NO_FPENVIRONMENT.
Useful if your C++ compiler has incomplete floating-point support
(such as uclibc-based systems).
--omit=<component>{,<component>}
Do not build the specified component(s).
ENDHELP
}
# save cwd
build=`pwd`
# get directory where we are located
cd `dirname $0`
base=`pwd`
cd $build
if [ `uname` = "QNX" ] ; then
EXPR=expr
NOTFOUND=0
else
EXPR="expr --"
NOTFOUND=""
fi
tests="tests"
samples="samples"
flags=""
omit=""
# parse arguments
while [ "$1" != "" ] ; do
val=`expr $1 : '--config=\(.*\)'`
if [ "$val" != "" ] ; then
val=`$EXPR "$1" : '--config=\(.*\)'`
if [ "$val" != "$NOTFOUND" ] ; then
config=$val;
fi
val=`expr $1 : '--prefix=\(.*\)'`
if [ "$val" != "" ] ; then
val=`$EXPR "$1" : '--prefix=\(.*\)'`
if [ "$val" != "$NOTFOUND" ] ; then
prefix=$val
fi
val=`expr $1 : '--stdcxx-base=\(.*\)'`
if [ "$val" != "" ] ; then
val=`$EXPR $1 : '--stdcxx-base=\(.*\)'`
if [ "$val" != "$NOTFOUND" ] ; then
stdcxx_base=$val
fi
val=`$EXPR "$1" : '--omit=\(.*\)'`
if [ "$val" != "$NOTFOUND" ] ; then
omit="$omit `echo $val | tr ',;' ' '`"
fi
if [ "$1" = "--no-samples" ] ; then
samples=""
@@ -97,12 +111,12 @@ while [ "$1" != "" ] ; do
if [ "$1" = "--no-fpenvironment" ] ; then
flags="$flags -DPOCO_NO_FPENVIRONMENT"
fi
if [ "$1" = "--help" ] ; then
showhelp
exit 0
fi
shift
done
@@ -110,11 +124,11 @@ done
# ...special cases for CYGWIN or MinGW
if [ "$config" = "" ] ; then
config=`uname`
cyg=`expr $config : '\(CYGWIN\).*'`
cyg=`$EXPR $config : '\(CYGWIN\).*'`
if [ "$cyg" = "CYGWIN" ] ; then
config=CYGWIN
else
ming=`expr $config : '\(MINGW\).*'`
ming=`$EXPR $config : '\(MINGW\).*'`
if [ "$ming" = "MINGW" ] ; then
config=MinGW
fi
@@ -122,13 +136,11 @@ if [ "$config" = "" ] ; then
fi
if [ ! -f "$base/build/config/$config" ] ; then
echo "Unknown configuration: $config"
echo "Please use the --config=<config_name> option."
echo "The <config_name> can be one of the following:"
echo ""
echo "`ls -C $base/build/config/`"
echo ""
exit 1
echo "Unknown configuration: $config"
echo "Please use the --config option to specify another build configuration"
echo "The following configurations are available:"
ls $base/build/config
exit 1
fi
if [ "$prefix" = "" ] ; then
@@ -147,6 +159,7 @@ echo "POCO_BASE = $base" >>$build/config.make
echo "POCO_BUILD = $build" >>$build/config.make
echo "POCO_PREFIX = $prefix" >>$build/config.make
echo "POCO_FLAGS = $flags" >>$build/config.make
echo "OMIT = $omit" >>$build/config.make
if [ "$stdcxx_base" != "" ] ; then
echo "STDCXX_BASE = $stdcxx_base" >>$build/config.make
fi