summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-04-29 11:47:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-04-29 11:47:45 +0200
commit908cb21c78bc5911f37390e9a18a550b0cf216b0 (patch)
tree3fa66473b83f52fd76a0a61eb840f8530c83e67d
parent16bcfb22c3ebd76ea57eb7672d405b7cbcb07678 (diff)
Add -cc, -ccp options to dist.sh to pass C compiler in addition to C++
-rwxr-xr-xdist.sh39
1 files changed, 27 insertions, 12 deletions
diff --git a/dist.sh b/dist.sh
index 6c0ecb3..cd46476 100755
--- a/dist.sh
+++ b/dist.sh
@@ -7,7 +7,9 @@
# -test
# -db <database>
# -odb <odb-compiler-path>
+# -cc <c-compiler>
# -cxx <c++-compiler>
+# -ccp <gcc-plugin-compiler>
# -cxxp <g++-plugin-compiler>
# -<db>-options <options>
# -<db>-test-options <options>
@@ -45,7 +47,9 @@ rebuild=n
complete=n
db=
odb=$src_root/odb/odb/odb
+cc=gcc
cxx=g++
+ccp=gcc-4.5
cxxp=g++-4.5
cxxflags="-W -Wall -Wno-unknown-pragmas -O3"
@@ -85,11 +89,21 @@ while [ $# -gt 0 ]; do
odb=$1
shift
;;
+ -cc)
+ shift
+ cc=$1
+ shift
+ ;;
-cxx)
shift
cxx=$1
shift
;;
+ -ccp)
+ shift
+ ccp=$1
+ shift
+ ;;
-cxxp)
shift
cxxp=$1
@@ -200,7 +214,7 @@ mkdir -p $out_root/pack
#
if [ $complete = y ]; then
cd $src_root/../cutl
- ./dist.sh -cxx "$cxxp" -out "$out_root/libcutl"
+ ./dist.sh -cc "$ccp" -cxx "$cxxp" -out "$out_root/libcutl"
cd $wd
fi
@@ -213,7 +227,8 @@ dist dist_prefix=$out_root/odb
cd $out_root/odb
./bootstrap
- ./configure --with-libcutl=../libcutl CXX="$cxxp" CXXFLAGS="$cxxflags"
+ ./configure --with-libcutl=../libcutl CC="$ccp" CXX="$cxxp" \
+CXXFLAGS="$cxxflags"
make -j 8
make dist
@@ -236,7 +251,7 @@ cd $out_root/libodb
if [ $rebuild = y ]; then
./bootstrap
- ./configure CXX="$cxx" CXXFLAGS="$cxxflags"
+ ./configure CC="$cc" CXX="$cxx" CXXFLAGS="$cxxflags"
fi
make -j 8
@@ -258,7 +273,7 @@ cd $out_root/libodb-mssql
if [ $rebuild = y ]; then
./bootstrap
./configure --with-libodb=../libodb \
- CXX="$cxx" \
+ CC="$cc" CXX="$cxx" \
CXXFLAGS="$cxxflags" \
$mssql_options
fi
@@ -282,7 +297,7 @@ cd $out_root/libodb-oracle
if [ $rebuild = y ]; then
./bootstrap
./configure --with-libodb=../libodb \
- CXX="$cxx" \
+ CC="$cc" CXX="$cxx" \
CXXFLAGS="$cxxflags" \
$oracle_options
fi
@@ -306,7 +321,7 @@ cd $out_root/libodb-pgsql
if [ $rebuild = y ]; then
./bootstrap
./configure --with-libodb=../libodb \
- CXX="$cxx" \
+ CC="$cc" CXX="$cxx" \
CXXFLAGS="$cxxflags" \
$pgsql_options
fi
@@ -330,7 +345,7 @@ cd $out_root/libodb-sqlite
if [ $rebuild = y ]; then
./bootstrap
./configure --with-libodb=../libodb \
- CXX="$cxx" \
+ CC="$cc" CXX="$cxx" \
CXXFLAGS="$cxxflags" \
$sqlite_options
fi
@@ -354,7 +369,7 @@ cd $out_root/libodb-mysql
if [ $rebuild = y ]; then
./bootstrap
./configure --with-libodb=../libodb \
- CXX="$cxx" \
+ CC="$cc" CXX="$cxx" \
CXXFLAGS="$cxxflags" \
$mysql_options
fi
@@ -377,7 +392,7 @@ cd $out_root/libodb-boost
if [ $rebuild = y ]; then
./bootstrap
- ./configure --with-libodb=../libodb CXX="$cxx" CXXFLAGS="$cxxflags"
+ ./configure --with-libodb=../libodb CC="$cc" CXX="$cxx" CXXFLAGS="$cxxflags"
fi
make -j 8
@@ -398,7 +413,7 @@ cd $out_root/libodb-qt
if [ $rebuild = y ]; then
./bootstrap
- ./configure --with-libodb=../libodb CXX="$cxx" CXXFLAGS="$cxxflags"
+ ./configure --with-libodb=../libodb CC="$cc" CXX="$cxx" CXXFLAGS="$cxxflags"
fi
make -j 8
@@ -439,7 +454,7 @@ for d in $db; do
--with-libodb-boost=../libodb-boost \
--with-libodb-qt=../libodb-qt \
${!optvar} \
-CXX="$cxx" \
+CC="$cc" CXX="$cxx" \
CXXFLAGS="$cxxflags" \
ODB=$odb
fi
@@ -490,7 +505,7 @@ for d in $db; do
--with-libodb-boost=../libodb-boost \
--with-libodb-qt=../libodb-qt \
${!optvar} \
-CXX="$cxx" \
+CC="$cc" CXX="$cxx" \
CXXFLAGS="$cxxflags" \
ODB=$odb
fi