Skip to content

Commit ce17ae2

Browse files
committed
new release/build scripts
1 parent 9bc329f commit ce17ae2

4 files changed

Lines changed: 108 additions & 192 deletions

File tree

Makefile

Lines changed: 15 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,31 @@ cppunit:
3030
$(MAKE) -C $(POCO_BASE)/CppUnit
3131

3232
install: libexecs
33-
install -d $(INSTALLDIR)/include/Poco
34-
install -d $(INSTALLDIR)/lib
35-
install -d $(INSTALLDIR)/bin
33+
mkdir -p $(INSTALLDIR)/include/Poco
34+
mkdir -p $(INSTALLDIR)/lib
35+
mkdir -p $(INSTALLDIR)/bin
3636
for comp in $(COMPONENTS) ; do \
3737
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
3838
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
3939
fi ; \
4040
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
41-
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec install {} $(INSTALLDIR)/bin \; ; \
41+
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
4242
fi ; \
4343
done
44-
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec install {} $(INSTALLDIR)/lib \;
44+
find $(POCO_BUILD)/lib -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
4545
find $(POCO_BUILD)/lib -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
4646

47-
.PHONY: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec
48-
.PHONY: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests
49-
.PHONY: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
47+
libexecs = Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec
48+
tests = Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests
49+
samples = Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
5050

51-
libexecs: Foundation-libexec XML-libexec Util-libexec Net-libexec NetSSL_OpenSSL-libexec Data-libexec Data/SQLite-libexec Data/ODBC-libexec Data/MySQL-libexec
52-
tests: Foundation-tests XML-tests Util-tests Net-tests NetSSL_OpenSSL-tests Data-tests Data/SQLite-tests Data/ODBC-tests Data/MySQL-tests
53-
samples: Foundation-samples XML-samples Util-samples Net-samples NetSSL_OpenSSL-samples Data-samples
51+
.PHONY: $(libexecs)
52+
.PHONY: $(tests)
53+
.PHONY: $(samples)
54+
55+
libexecs: $(filter-out $(foreach f,$(OMIT),$f%),$(libexecs))
56+
tests: $(filter-out $(foreach f,$(OMIT),$f%),$(tests))
57+
samples: $(filter-out $(foreach f,$(OMIT),$f%),$(samples))
5458

5559
Foundation-libexec:
5660
$(MAKE) -C $(POCO_BASE)/Foundation
@@ -61,9 +65,6 @@ Foundation-tests: Foundation-libexec cppunit
6165
Foundation-samples: Foundation-libexec
6266
$(MAKE) -C $(POCO_BASE)/Foundation/samples
6367

64-
ifeq ($(POCO_XML_SUPPORT),exclude)
65-
#no XML support
66-
else
6768
XML-libexec: Foundation-libexec
6869
$(MAKE) -C $(POCO_BASE)/XML
6970

@@ -72,11 +73,7 @@ XML-tests: XML-libexec cppunit
7273

7374
XML-samples: XML-libexec
7475
$(MAKE) -C $(POCO_BASE)/XML/samples
75-
endif
7676

77-
ifeq ($(POCO_UTIL_SUPPORT),exclude)
78-
#no Util support
79-
else
8077
Util-libexec: Foundation-libexec XML-libexec
8178
$(MAKE) -C $(POCO_BASE)/Util
8279

@@ -85,11 +82,7 @@ Util-tests: Util-libexec cppunit
8582

8683
Util-samples: Util-libexec
8784
$(MAKE) -C $(POCO_BASE)/Util/samples
88-
endif
8985

90-
ifeq ($(POCO_NET_SUPPORT),exclude)
91-
#no Net support
92-
else
9386
Net-libexec: Foundation-libexec
9487
$(MAKE) -C $(POCO_BASE)/Net
9588

@@ -98,11 +91,7 @@ Net-tests: Net-libexec cppunit
9891

9992
Net-samples: Net-libexec Foundation-libexec XML-libexec Util-libexec
10093
$(MAKE) -C $(POCO_BASE)/Net/samples
101-
endif
10294

103-
ifeq ($(POCO_NETSSL_SUPPORT),exclude)
104-
#no NetSSL support
105-
else
10695
NetSSL_OpenSSL-libexec: Foundation-libexec Net-libexec Util-libexec
10796
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL
10897

@@ -111,11 +100,7 @@ NetSSL_OpenSSL-tests: NetSSL_OpenSSL-libexec cppunit
111100

112101
NetSSL_OpenSSL-samples: NetSSL_OpenSSL-libexec
113102
$(MAKE) -C $(POCO_BASE)/NetSSL_OpenSSL/samples
114-
endif
115103

116-
ifeq ($(POCO_DATA_SUPPORT),exclude)
117-
#no Data support
118-
else
119104
Data-libexec: Foundation-libexec
120105
$(MAKE) -C $(POCO_BASE)/Data
121106

@@ -125,36 +110,17 @@ Data-tests: Data-libexec cppunit
125110
Data-samples: Data-libexec Data-libexec Data/SQLite-libexec
126111
$(MAKE) -C $(POCO_BASE)/Data/samples
127112

128-
ifeq ($(POCO_DATA_SQLITE_SUPPORT), exclude)
129-
#no SQLite support
130-
else
131113
Data/SQLite-libexec: Foundation-libexec Data-libexec
132114
$(MAKE) -C $(POCO_BASE)/Data/SQLite
133115

134116
Data/SQLite-tests: Data/SQLite-libexec cppunit
135117
$(MAKE) -C $(POCO_BASE)/Data/SQLite/testsuite
136-
endif
137118

138-
ifeq ($(POCO_DATA_ODBC_SUPPORT), exclude)
139-
#no ODBC support
140-
else
141119
Data/ODBC-libexec: Foundation-libexec Data-libexec
142120
$(MAKE) -C $(POCO_BASE)/Data/ODBC
143121

144122
Data/ODBC-tests: Data/ODBC-libexec cppunit
145123
$(MAKE) -C $(POCO_BASE)/Data/ODBC/testsuite
146-
endif
147-
148-
ifeq ($(POCO_DATA_MYSQL_SUPPORT), exclude)
149-
#no MySQL support
150-
else
151-
Data/MySQL-libexec: Foundation-libexec Data-libexec
152-
$(MAKE) -C $(POCO_BASE)/Data/MySQL
153-
154-
Data/MySQL-tests: Data/ODBC-libexec cppunit
155-
$(MAKE) -C $(POCO_BASE)/Data/MySQL/testsuite
156-
endif
157-
endif
158124

159125
clean:
160126
$(MAKE) -C $(POCO_BASE)/Foundation clean

configure

Lines changed: 35 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22
#
33
# configure
44
#
5-
# $Id: //poco/Main/dist/configure#8 $
5+
# $Id: //poco/1.3/dist/configure#6 $
66
#
77
# Configuration script for POCO.
88
#
9-
# Usage:
10-
# configure [<options>...]
11-
#
12-
# Specify --help to display supported options.
9+
# Invoke configure --help for help.
1310
#
1411

15-
showhelp ()
12+
showhelp()
1613
{
1714
cat << ENDHELP
1815
usage: configure {options}
@@ -53,66 +50,51 @@ Options:
5350
Useful if your C++ compiler has incomplete floating-point support
5451
(such as uclibc-based systems).
5552
56-
--exclude-XML
57-
Disable building of Poco::XML component support
58-
59-
--exclude-Util
60-
Disable building of Poco::Util component support
61-
62-
--exclude-Net
63-
Disable building of Poco::Net component support
64-
65-
--exclude-NetSSL
66-
Disable building of Poco::NetSSL component support
53+
--omit=<component>{,<component>}
54+
Do not build the specified component(s).
6755
68-
--exclude-Data
69-
Disable building of Poco::Data component support
70-
71-
--exclude-ODBC
72-
Disable building of Poco::Data::ODBC component support
73-
74-
--exclude-SQLite
75-
Disable building of Poco::Data::SQLite component support
76-
77-
--exclude-MySQL
78-
Disable building of Poco::Data::MySQL component support
79-
8056
ENDHELP
8157
}
58+
8259
# save cwd
8360
build=`pwd`
8461
# get directory where we are located
8562
cd `dirname $0`
8663
base=`pwd`
8764
cd $build
65+
if [ `uname` = "QNX" ] ; then
66+
EXPR=expr
67+
NOTFOUND=0
68+
else
69+
EXPR="expr --"
70+
NOTFOUND=""
71+
fi
8872

8973
tests="tests"
9074
samples="samples"
9175
flags=""
92-
poco_xml_support="include"
93-
poco_util_support="include"
94-
poco_net_support="include"
95-
poco_netssl_support="include"
96-
poco_data_support="include"
97-
poco_data_odbc_support="include"
98-
poco_data_sqlite_support="include"
99-
poco_data_mysql_support="include"
76+
omit=""
10077
# parse arguments
10178
while [ "$1" != "" ] ; do
102-
val=`expr $1 : '--config=\(.*\)'`
103-
if [ "$val" != "" ] ; then
79+
val=`$EXPR "$1" : '--config=\(.*\)'`
80+
if [ "$val" != "$NOTFOUND" ] ; then
10481
config=$val;
10582
fi
10683

107-
val=`expr $1 : '--prefix=\(.*\)'`
108-
if [ "$val" != "" ] ; then
84+
val=`$EXPR "$1" : '--prefix=\(.*\)'`
85+
if [ "$val" != "$NOTFOUND" ] ; then
10986
prefix=$val
11087
fi
111-
112-
val=`expr $1 : '--stdcxx-base=\(.*\)'`
113-
if [ "$val" != "" ] ; then
88+
89+
val=`$EXPR $1 : '--stdcxx-base=\(.*\)'`
90+
if [ "$val" != "$NOTFOUND" ] ; then
11491
stdcxx_base=$val
11592
fi
93+
94+
val=`$EXPR "$1" : '--omit=\(.*\)'`
95+
if [ "$val" != "$NOTFOUND" ] ; then
96+
omit="$omit `echo $val | tr ',;' ' '`"
97+
fi
11698

11799
if [ "$1" = "--no-samples" ] ; then
118100
samples=""
@@ -130,69 +112,35 @@ while [ "$1" != "" ] ; do
130112
flags="$flags -DPOCO_NO_FPENVIRONMENT"
131113
fi
132114

133-
if [ "$1" = "--exclude-XML" ] ; then
134-
poco_xml_support="exclude"
135-
fi
136-
137-
if [ "$1" = "--exclude-Util" ] ; then
138-
poco_util_support="exclude"
139-
fi
140-
141-
if [ "$1" = "--exclude-Net" ] ; then
142-
poco_net_support="exclude"
143-
fi
144-
145-
if [ "$1" = "--exclude-NetSSL" ] ; then
146-
poco_netssl_support="exclude"
147-
fi
148-
149-
if [ "$1" = "--exclude-Data" ] ; then
150-
poco_data_support="exclude"
151-
fi
152-
153-
if [ "$1" = "--exclude-ODBC" ] ; then
154-
poco_data_odbc_support="exclude"
155-
fi
156-
157-
if [ "$1" = "--exclude-SQLite" ] ; then
158-
poco_data_sqlite_support="exclude"
159-
fi
160-
161-
if [ "$1" = "--exclude-MySQL" ] ; then
162-
poco_data_mysql_support="exclude"
163-
fi
164-
165115
if [ "$1" = "--help" ] ; then
166116
showhelp
167117
exit 0
168118
fi
169-
119+
170120
shift
171121
done
172122

173123
# autodetect build environment
174124
# ...special cases for CYGWIN or MinGW
175125
if [ "$config" = "" ] ; then
176126
config=`uname`
177-
cyg=`expr $config : '\(CYGWIN\).*'`
127+
cyg=`$EXPR $config : '\(CYGWIN\).*'`
178128
if [ "$cyg" = "CYGWIN" ] ; then
179129
config=CYGWIN
180130
else
181-
ming=`expr $config : '\(MINGW\).*'`
131+
ming=`$EXPR $config : '\(MINGW\).*'`
182132
if [ "$ming" = "MINGW" ] ; then
183133
config=MinGW
184134
fi
185135
fi
186136
fi
187137

188138
if [ ! -f "$base/build/config/$config" ] ; then
189-
echo "Unknown configuration: $config"
190-
echo "Please use the --config=<config_name> option."
191-
echo "The <config_name> can be one of the following:"
192-
echo ""
193-
echo "`ls -C $base/build/config/`"
194-
echo ""
195-
exit 1
139+
echo "Unknown configuration: $config"
140+
echo "Please use the --config option to specify another build configuration"
141+
echo "The following configurations are available:"
142+
ls $base/build/config
143+
exit 1
196144
fi
197145

198146
if [ "$prefix" = "" ] ; then
@@ -211,14 +159,7 @@ echo "POCO_BASE = $base" >>$build/config.make
211159
echo "POCO_BUILD = $build" >>$build/config.make
212160
echo "POCO_PREFIX = $prefix" >>$build/config.make
213161
echo "POCO_FLAGS = $flags" >>$build/config.make
214-
echo "POCO_XML_SUPPORT = $poco_xml_support" >>$build/config.make
215-
echo "POCO_NET_SUPPORT = $poco_net_support" >>$build/config.make
216-
echo "POCO_UTIL_SUPPORT = $poco_util_support" >>$build/config.make
217-
echo "POCO_NETSSL_SUPPORT = $poco_netssl_support" >>$build/config.make
218-
echo "POCO_DATA_SUPPORT = $poco_data_support" >>$build/config.make
219-
echo "POCO_DATA_ODBC_SUPPORT = $poco_data_odbc_support" >>$build/config.make
220-
echo "POCO_DATA_SQLITE_SUPPORT = $poco_data_sqlite_support" >>$build/config.make
221-
echo "POCO_DATA_MYSQL_SUPPORT = $poco_data_mysql_support" >>$build/config.make
162+
echo "OMIT = $omit" >>$build/config.make
222163
if [ "$stdcxx_base" != "" ] ; then
223164
echo "STDCXX_BASE = $stdcxx_base" >>$build/config.make
224165
fi
@@ -228,14 +169,6 @@ echo "export POCO_BASE" >>$build/config.make
228169
echo "export POCO_BUILD" >>$build/config.make
229170
echo "export POCO_PREFIX" >>$build/config.make
230171
echo "export POCO_FLAGS" >>$build/config.make
231-
echo "export POCO_XML_SUPPORT" >>$build/config.make
232-
echo "export POCO_NET_SUPPORT" >>$build/config.make
233-
echo "export POCO_UTIL_SUPPORT" >>$build/config.make
234-
echo "export POCO_NETSSL_SUPPORT" >>$build/config.make
235-
echo "export POCO_DATA_SUPPORT" >>$build/config.make
236-
echo "export POCO_DATA_ODBC_SUPPORT" >>$build/config.make
237-
echo "export POCO_DATA_SQLITE_SUPPORT" >>$build/config.make
238-
echo "export POCO_DATA_MYSQL_SUPPORT" >>$build/config.make
239172
if [ "$stdcxx_base" != "" ] ; then
240173
echo "export STDCXX_BASE" >>$build/config.make
241174
fi

0 commit comments

Comments
 (0)