Feature #574 win: Copy binaries to <build>/bin inside Makefile 31/431/2
authorMichael Robson <mprobson@illinois.edu>
Wed, 12 Nov 2014 07:08:02 +0000 (01:08 -0600)
committerMichael Robson <mprobson@illinois.edu>
Wed, 12 Nov 2014 21:02:43 +0000 (15:02 -0600)
Change-Id: Ic6e4499959c58f3eb2a516b7c36b07519d63cea0

build
src/arch/win32/system_ln
src/scripts/Makefile

diff --git a/build b/build
index be9a8c7e96dabc2fb6da60f89edd1cb69843854a..bea890c06612e6dd7673066c7bdb925789208a36 100755 (executable)
--- a/build
+++ b/build
@@ -530,22 +530,17 @@ if [ "x_$WINNAME" = "x_win32" -o "x_$WINNAME" = "x_win64" ]
 then
 #Win32/64 version needs special compilers and *copied* (not linked)
 # source files.
-       [ -d $DESTINATION/bin ] || Echo "Creating dir: $DESTINATION/bin"
-       [ -d $DESTINATION/bin ] || mkdir $DESTINATION/bin
-       echo "Copying compilers for $WINNAME into $DESTINATION/bin directory"
-       cp -f $src/$WINNAME/unix2nt* $DESTINATION/bin
        cp $src/win32/system_ln $DESTINATION/tmp
        cp $src/win32/unistd.h $DESTINATION/tmp
        echo "Compiling createlink.cpp ..."
-       (cd $src/win32; ../../../$DESTINATION/bin/unix2nt_cc  -c createlink.cpp -o createlink.o -D_WIN32_WINNT=0x0500; ../../../$DESTINATION/bin/unix2nt_cc createlink.o)
+       (cd $src/win32; ../$WINNAME/unix2nt_cc  -c createlink.cpp -o createlink.o -D_WIN32_WINNT=0x0500; ../$WINNAME/unix2nt_cc createlink.o)
+
        if test ! -x $src/win32/createlink.exe
        then
                echo "VC++ is not properly installed!"
                exit 1
        fi
-       echo "Copying $src/win32/createlink.exe to $DESTINATION/bin directory"
-       cp $src/win32/createlink.exe $DESTINATION/bin
-        chmod +x $DESTINATION/tmp/system_ln
+       chmod +x $DESTINATION/tmp/system_ln
        cp $src/win32/gathertree.local   $DESTINATION/tmp
        cp $src/win32/gatherflat.local   $DESTINATION/tmp
 else
index 99e16041431091f92cec5fd848c80152bd961fb1..b3b1dad8635f9c7d61f15cbbd4d85a2bf3bd250d 100755 (executable)
@@ -2,7 +2,7 @@
 
 if test "$OS" = 'Windows_NT'
 then
-  junction=`which createlink 2>/dev/null`
+  junction=`ls ../bin/createlink 2>/dev/null`
 fi
 test x$junction = x && junction='cp -f'
 
index 11324ac818ade1f6439b7563dafed6e68d72cca6..ebedd6d7ba90557d5bc8bdf86e8b707d4fbd79c2 100644 (file)
@@ -315,6 +315,10 @@ dirs+sources:
        rm -rf QuickThreads
        rm -rf libs
        rm -rf ../bin ; mkdir ../bin
+       if case `cat .vdir` in *win32*) true;; *win64*) true;; *) false;; esac; then \
+               cp -f ../../src/arch/`cat .vdir | awk -F- '{print $$2}'`/unix2nt* ../bin; \
+               cp -f ../../src/arch/win32/createlink.exe ../bin; \
+       fi
        rm -rf ../lib ; mkdir ../lib
        rm -rf ../lib_so ; mkdir ../lib_so; touch ../lib_so/.charmso
        rm -rf ../examples