Permalink
Browse files

rather crude fix for being able to build in different dir than where …

…./configure resides: copy all required stuff; depends on autoconf having correct value
  • Loading branch information...
1 parent 84e6797 commit 53250913d4de8e79e990b7ecf6da9c28f4fdeab2 @atzedijkstra atzedijkstra committed Feb 17, 2014
Showing with 29 additions and 1 deletion.
  1. +15 −1 EHC/configure
  2. +14 −0 EHC/configure.ac
View
@@ -2752,6 +2752,20 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
HostPlatform=`/bin/sh $srcdir/config.sub $host` || exit 1
+
+### check whether we are indeed in the src dir, otherwise copy required stuff to the current dir first
+if test "${srcdir}" != "." -a "${srcdir}" != ""
+then
+ # copy all the relevant stuff
+ echo "copying from: ${srcdir}"
+ for stuff in Makefile VERSION mk test bin ehclib extlibs src
+ do
+ echo "copying into builddir: ${stuff}"
+ d=`dirname ${stuff}`
+ rsync --archive --update --exclude='.*' ${srcdir}/${stuff} ${d}
+ done
+fi
+
### Version info, extract from file VERSION
# big change
EH_VERSION_MAJOR=`awk -F . '{print $1}' VERSION`
@@ -10287,7 +10301,7 @@ then
fi
echo " MP library : $mplib"
-if test "$mplib" == "gmp" ; then
+if test "$mplib" = "gmp" ; then
if test "x$gmpLibArchiveExists" = "xyes" ;then
echo " gmp lib archive : $gmpLibArchive"
else
View
@@ -13,6 +13,20 @@ AC_PROG_MAKE_SET
AC_CANONICAL_HOST
dnl ** canonicalize platform names
HostPlatform=`/bin/sh $srcdir/config.sub $host` || exit 1
+
+### check whether we are indeed in the toplevel dir, otherwise copy required stuff to the current dir first
+if test "${srcdir}" != "." -a "${srcdir}" != ""
+then
+ # copy all the relevant stuff
+ echo "copying from: ${srcdir}"
+ for stuff in Makefile VERSION mk test bin ehclib extlibs src
+ do
+ echo "copying into builddir: ${stuff}"
+ d=`dirname ${stuff}`
+ rsync --archive --update --exclude='.*' ${srcdir}/${stuff} ${d}
+ done
+fi
+
### Version info, extract from file VERSION
# big change
EH_VERSION_MAJOR=`awk -F . '{print $1}' VERSION`

0 comments on commit 5325091

Please sign in to comment.