summaryrefslogtreecommitdiff
path: root/binary/mingw
diff options
context:
space:
mode:
Diffstat (limited to 'binary/mingw')
-rwxr-xr-xbinary/mingw/build-dist25
1 files changed, 22 insertions, 3 deletions
diff --git a/binary/mingw/build-dist b/binary/mingw/build-dist
index e01679d..59ed868 100755
--- a/binary/mingw/build-dist
+++ b/binary/mingw/build-dist
@@ -12,6 +12,22 @@ function error ()
echo "$*" 1>&2
}
+# Find output directory for a project. It is either $1-default or if
+# that doesn't exist, it is $1.
+#
+function find_out_dir ()
+{
+ # Get the actual directory in case -default is a symlink.
+ #
+ tmp=`realpath $1-default 2>/dev/null`
+
+ if [ -n "$tmp" -a -d "$tmp" ]; then
+ echo "$tmp"
+ else
+ echo "$1"
+ fi
+}
+
rebuild=n
pack=n
@@ -88,7 +104,8 @@ fi
# Build libodb
#
if [ $pack = n ]; then
- make -C $src_root/odb/libodb dist dist_prefix=$out_root/libodb
+ make -C `find_out_dir $src_root/odb/libodb` -f $src_root/odb/libodb/makefile \
+ dist dist_prefix=$out_root/libodb
if [ $rebuild = y ]; then
cd libodb
@@ -114,7 +131,8 @@ cd ../..
# Build libodb-boost
#
if [ $pack = n ]; then
- make -C $src_root/odb/libodb-boost dist dist_prefix=$out_root/libodb-boost
+ make -C `find_out_dir $src_root/odb/libodb-boost` -f $src_root/odb/libodb-boost/makefile \
+ dist dist_prefix=$out_root/libodb-boost
if [ $rebuild = y ]; then
cd libodb-boost
@@ -139,7 +157,8 @@ cd ..
# Build libodb-qt
#
if [ $pack = n ]; then
- make -C $src_root/odb/libodb-qt dist dist_prefix=$out_root/libodb-qt
+ make -C `find_out_dir $src_root/odb/libodb-qt` -f $src_root/odb/libodb-qt/makefile \
+ dist dist_prefix=$out_root/libodb-qt
if [ $rebuild = y ]; then
cd libodb-qt