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

View File

@ -30,27 +30,31 @@ cppunit:
$(MAKE) -C $(POCO_BASE)/CppUnit
install: libexecs
install -d $(INSTALLDIR)/include/Poco
install -d $(INSTALLDIR)/lib
install -d $(INSTALLDIR)/bin
mkdir -p $(INSTALLDIR)/include/Poco
mkdir -p $(INSTALLDIR)/lib
mkdir -p $(INSTALLDIR)/bin
for comp in $(COMPONENTS) ; do \
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
fi ; \
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec install {} $(INSTALLDIR)/bin \; ; \
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
fi ; \
done
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec install {} $(INSTALLDIR)/lib \;
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
.PHONY: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec
.PHONY: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests
.PHONY: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
libexecs = Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec
tests = Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests
samples = Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
libexecs: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec
tests: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests
samples: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
.PHONY: $(libexecs)
.PHONY: $(tests)
.PHONY: $(samples)
libexecs: $(filter-out $(foreach f,$(OMIT),$f%),$(libexecs))
tests: $(filter-out $(foreach f,$(OMIT),$f%),$(tests))
samples: $(filter-out $(foreach f,$(OMIT),$f%),$(samples))
Foundation-libexec:
$(MAKE) -C $(POCO_BASE)/Foundation
@ -61,9 +65,6 @@ Foundation-tests: Foundation-libexec cppunit
Foundation-samples: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/Foundation/samples
ifeq ($(POCO_XML_SUPPORT),exclude)
#no XML support
else
XML-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/XML
@ -72,11 +73,7 @@ XML-tests: XML-libexec cppunit
XML-samples: XML-libexec
$(MAKE) -C $(POCO_BASE)/XML/samples
endif
ifeq ($(POCO_UTIL_SUPPORT),exclude)
#no Util support
else
Util-libexec: Foundation-libexec XML-libexec
$(MAKE) -C $(POCO_BASE)/Util
@ -85,11 +82,7 @@ Util-tests: Util-libexec cppunit
Util-samples: Util-libexec
$(MAKE) -C $(POCO_BASE)/Util/samples
endif
ifeq ($(POCO_NET_SUPPORT),exclude)
#no Net support
else
Net-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/Net
@ -98,11 +91,7 @@ Net-tests: Net-libexec cppunit
Net-samples: Net-libexec Foundation-libexec XML-libexec Util-libexec
$(MAKE) -C $(POCO_BASE)/Net/samples
endif
ifeq ($(POCO_NETSSL_SUPPORT),exclude)
#no NetSSL support
else
NetSSL_OpenSSL-libexec: Foundation-libexec Net-libexec Util-libexec
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL
@ -111,11 +100,7 @@ NetSSL_OpenSSL-tests: NetSSL_OpenSSL-libexec cppunit
NetSSL_OpenSSL-samples: NetSSL_OpenSSL-libexec
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/samples
endif
ifeq ($(POCO_DATA_SUPPORT),exclude)
#no Data support
else
Data-libexec: Foundation-libexec
$(MAKE) -C $(POCO_BASE)/Data
@ -125,36 +110,17 @@ Data-tests: Data-libexec cppunit
Data-samples: Data-libexec Data-libexec Data/SQLite-libexec
$(MAKE) -C $(POCO_BASE)/Data/samples
ifeq ($(POCO_DATA_SQLITE_SUPPORT), exclude)
#no SQLite support
else
Data/SQLite-libexec: Foundation-libexec Data-libexec
$(MAKE) -C $(POCO_BASE)/Data/SQLite
Data/SQLite-tests: Data/SQLite-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/SQLite/testsuite
endif
ifeq ($(POCO_DATA_ODBC_SUPPORT), exclude)
#no ODBC support
else
Data/ODBC-libexec: Foundation-libexec Data-libexec
$(MAKE) -C $(POCO_BASE)/Data/ODBC
Data/ODBC-tests: Data/ODBC-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/ODBC/testsuite
endif
ifeq ($(POCO_DATA_MYSQL_SUPPORT), exclude)
#no MySQL support
else
Data/MySQL-libexec: Foundation-libexec Data-libexec
$(MAKE) -C $(POCO_BASE)/Data/MySQL
Data/MySQL-tests: Data/ODBC-libexec cppunit
$(MAKE) -C $(POCO_BASE)/Data/MySQL/testsuite
endif
endif
clean:
$(MAKE) -C $(POCO_BASE)/Foundation clean

137
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}
@ -53,66 +50,51 @@ Options:
Useful if your C++ compiler has incomplete floating-point support
(such as uclibc-based systems).
--exclude-XML
Disable building of Poco::XML component support
--omit=<component>{,<component>}
Do not build the specified component(s).
--exclude-Util
Disable building of Poco::Util component support
--exclude-Net
Disable building of Poco::Net component support
--exclude-NetSSL
Disable building of Poco::NetSSL component support
--exclude-Data
Disable building of Poco::Data component support
--exclude-ODBC
Disable building of Poco::Data::ODBC component support
--exclude-SQLite
Disable building of Poco::Data::SQLite component support
--exclude-MySQL
Disable building of Poco::Data::MySQL component support
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=""
poco_xml_support="include"
poco_util_support="include"
poco_net_support="include"
poco_netssl_support="include"
poco_data_support="include"
poco_data_odbc_support="include"
poco_data_sqlite_support="include"
poco_data_mysql_support="include"
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=""
@ -130,43 +112,11 @@ while [ "$1" != "" ] ; do
flags="$flags -DPOCO_NO_FPENVIRONMENT"
fi
if [ "$1" = "--exclude-XML" ] ; then
poco_xml_support="exclude"
fi
if [ "$1" = "--exclude-Util" ] ; then
poco_util_support="exclude"
fi
if [ "$1" = "--exclude-Net" ] ; then
poco_net_support="exclude"
fi
if [ "$1" = "--exclude-NetSSL" ] ; then
poco_netssl_support="exclude"
fi
if [ "$1" = "--exclude-Data" ] ; then
poco_data_support="exclude"
fi
if [ "$1" = "--exclude-ODBC" ] ; then
poco_data_odbc_support="exclude"
fi
if [ "$1" = "--exclude-SQLite" ] ; then
poco_data_sqlite_support="exclude"
fi
if [ "$1" = "--exclude-MySQL" ] ; then
poco_data_mysql_support="exclude"
fi
if [ "$1" = "--help" ] ; then
showhelp
exit 0
fi
shift
done
@ -174,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
@ -186,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
@ -211,14 +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 "POCO_XML_SUPPORT = $poco_xml_support" >>$build/config.make
echo "POCO_NET_SUPPORT = $poco_net_support" >>$build/config.make
echo "POCO_UTIL_SUPPORT = $poco_util_support" >>$build/config.make
echo "POCO_NETSSL_SUPPORT = $poco_netssl_support" >>$build/config.make
echo "POCO_DATA_SUPPORT = $poco_data_support" >>$build/config.make
echo "POCO_DATA_ODBC_SUPPORT = $poco_data_odbc_support" >>$build/config.make
echo "POCO_DATA_SQLITE_SUPPORT = $poco_data_sqlite_support" >>$build/config.make
echo "POCO_DATA_MYSQL_SUPPORT = $poco_data_mysql_support" >>$build/config.make
echo "OMIT = $omit" >>$build/config.make
if [ "$stdcxx_base" != "" ] ; then
echo "STDCXX_BASE = $stdcxx_base" >>$build/config.make
fi
@ -228,14 +169,6 @@ echo "export POCO_BASE" >>$build/config.make
echo "export POCO_BUILD" >>$build/config.make
echo "export POCO_PREFIX" >>$build/config.make
echo "export POCO_FLAGS" >>$build/config.make
echo "export POCO_XML_SUPPORT" >>$build/config.make
echo "export POCO_NET_SUPPORT" >>$build/config.make
echo "export POCO_UTIL_SUPPORT" >>$build/config.make
echo "export POCO_NETSSL_SUPPORT" >>$build/config.make
echo "export POCO_DATA_SUPPORT" >>$build/config.make
echo "export POCO_DATA_ODBC_SUPPORT" >>$build/config.make
echo "export POCO_DATA_SQLITE_SUPPORT" >>$build/config.make
echo "export POCO_DATA_MYSQL_SUPPORT" >>$build/config.make
if [ "$stdcxx_base" != "" ] ; then
echo "export STDCXX_BASE" >>$build/config.make
fi

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

View File

@ -1,6 +1,6 @@
#! /bin/sh
#
# $Id: //poco/1.3/release/script/mkrelease#7 $
# $Id: //poco/1.3/release/script/mkrelease#10 $
#
# mkrelease
#
@ -153,11 +153,11 @@ done
#
# Create components file
#
echo "CppUnit" >${target}/components
for comp in $comps ;
do
echo $comp >>${target}/components
done
echo "CppUnit" >>${target}/components
#
@ -206,18 +206,18 @@ cppunit:
$(MAKE) -C $(POCO_BASE)/CppUnit
install: libexecs
install -d $(INSTALLDIR)/include/Poco
install -d $(INSTALLDIR)/lib
install -d $(INSTALLDIR)/bin
mkdir -p $(INSTALLDIR)/include/Poco
mkdir -p $(INSTALLDIR)/lib
mkdir -p $(INSTALLDIR)/bin
for comp in $(COMPONENTS) ; do \
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
fi ; \
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec install {} $(INSTALLDIR)/bin \; ; \
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
fi ; \
done
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec install {} $(INSTALLDIR)/lib \;
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
ENDOFSCRIPT
@ -236,13 +236,17 @@ do
fi
done
echo ".PHONY:$libexecs" >>${target}/Makefile
echo ".PHONY:$tests" >>${target}/Makefile
echo ".PHONY:$samples" >>${target}/Makefile
echo "libexecs = $libexecs" >>${target}/Makefile
echo "tests = $tests" >> ${target}/Makefile
echo "samples = $samples" >> ${target}/Makefile
echo "" >>${target}/Makefile
echo "libexecs:$libexecs" >>${target}/Makefile
echo "tests:$tests" >>${target}/Makefile
echo "samples:$samples" >>${target}/Makefile
echo '.PHONY: $(libexecs)' >>${target}/Makefile
echo '.PHONY: $(tests)' >>${target}/Makefile
echo '.PHONY: $(samples)' >>${target}/Makefile
echo "" >>${target}/Makefile
echo 'libexecs: $(filter-out $(foreach f,$(OMIT),$f%),$(libexecs))' >>${target}/Makefile
echo 'tests: $(filter-out $(foreach f,$(OMIT),$f%),$(tests))' >>${target}/Makefile
echo 'samples: $(filter-out $(foreach f,$(OMIT),$f%),$(samples))' >>${target}/Makefile
for comp in $comps ;
do
@ -321,7 +325,7 @@ ENDOFSCRIPT
#
cat >${target}/build_vs71.cmd <<'ENDOFSCRIPT'
@echo off
buildwin 71 shared both yes
buildwin 71 build shared both yes
ENDOFSCRIPT
@ -330,7 +334,7 @@ ENDOFSCRIPT
#
cat >${target}/build_vs80.cmd <<'ENDOFSCRIPT'
@echo off
buildwin 80 shared both yes
buildwin 80 build shared both yes
ENDOFSCRIPT
@ -339,7 +343,7 @@ ENDOFSCRIPT
#
cat >${target}/build_vs90.cmd <<'ENDOFSCRIPT'
@echo off
buildwin 90 shared both yes
buildwin 90 build shared both yes
ENDOFSCRIPT