From ad1a964c7c1a03287c501ec4de1242640ddc9265 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 9 Sep 2014 14:32:11 -0400 Subject: Support environments where `find` is Windows' find --- dev/make-sdk-win32.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dev/make-sdk-win32.sh b/dev/make-sdk-win32.sh index 2c3713b5dc..27c7f6a961 100755 --- a/dev/make-sdk-win32.sh +++ b/dev/make-sdk-win32.sh @@ -38,6 +38,16 @@ has_spaces() { REVISION=1 BASE="/cygdrive/c/CoqSDK-$REVISION" +# Windows has a version of FIND in C:/Windows/system32/find, and we don't want to use that +if [ -x /usr/bin/find ] +then + FIND=/usr/bin/find +else + echo "WARNING: /usr/bin/find does not exist. Falling back on:" + which find + FIND=find +fi + WGET_ARGS="-N -q" if [ "$(has_spaces $BASE; echo $?)" -ne 0 ]; then @@ -149,7 +159,7 @@ install_ocaml() { cp -r tmp/\$_OUTDIR/lib "$BASE/" cp -r tmp/lib "$BASE/" cp -r tmp/\$_OUTDIR/etc "$BASE/" - find "$BASE" -name '*.dll' -o -name '*.exe' | tr '\n' '\0' \ + "$FIND" "$BASE" -name '*.dll' -o -name '*.exe' | tr '\n' '\0' \ | xargs -0 chmod a+x mv "$BASE/lib/topfind" "$BASE/lib/topfind.in" sed -i 's|@SITELIB@|@BASE@/lib/site-lib|g' "$BASE/lib/topfind.in" -- cgit v1.2.3 From 7fa5d7af208c5ff305674739859dbb8f066ffb87 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 9 Sep 2014 14:34:59 -0400 Subject: Support machines that have a full or nonexistant C drive --- dev/make-sdk-win32.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dev/make-sdk-win32.sh b/dev/make-sdk-win32.sh index 27c7f6a961..a0dec19faf 100755 --- a/dev/make-sdk-win32.sh +++ b/dev/make-sdk-win32.sh @@ -8,6 +8,9 @@ # by Jason Gross # License: Expat/MIT http://opensource.org/licenses/MIT +# This script reads the following environment variables: +# BASE - set to non-empty to give a different location for the zip file, e.g., if /cygdrive/c is full or doesn't exist + set -e # set -x @@ -36,7 +39,15 @@ has_spaces() { # The SDK itself REVISION=1 -BASE="/cygdrive/c/CoqSDK-$REVISION" +# support for working on computers that don't have a C: drive +if [ -z "$BASE" ] +then + TRUE_BASE=/cygdrive/c +else + # get absolute path + TRUE_BASE="$(readlink -f "$BASE")" +fi +BASE="$TRUE_BASE/CoqSDK-$REVISION" # Windows has a version of FIND in C:/Windows/system32/find, and we don't want to use that if [ -x /usr/bin/find ] -- cgit v1.2.3 From 53aaa78e51c163f54a5f55bcf54b2ec7627aa791 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 9 Sep 2014 14:37:40 -0400 Subject: Support 64-bit cygwin --- dev/make-sdk-win32.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/make-sdk-win32.sh b/dev/make-sdk-win32.sh index a0dec19faf..9f904cbaaf 100755 --- a/dev/make-sdk-win32.sh +++ b/dev/make-sdk-win32.sh @@ -27,7 +27,7 @@ glib_URL='http://dl.arirux.de/5/binaries32/'$glib gtk_URL='http://dl.arirux.de/5/binaries32/'$gtk camlp5_URL='http://pauillac.inria.fr/~ddr/camlp5/distrib/src/'$camlp5 -cygwin=setup-x86.exe +cygwin=setup-${HOSTTYPE/i6/x}.exe cygwin_URL='http://cygwin.com/'$cygwin cygwin_PKGS=p7zip,zip,sed,make,mingw64-i686-gcc-g++,mingw64-i686-gcc-core,mingw64-i686-gcc,patch,rlwrap,libreadline6,diffutils -- cgit v1.2.3 From 4f2740386f5094a7930dd682c5f2a012481a07ed Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 9 Sep 2014 14:38:27 -0400 Subject: Minor code style cleanup in make-sdk-win32 --- dev/make-sdk-win32.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dev/make-sdk-win32.sh b/dev/make-sdk-win32.sh index 9f904cbaaf..0b8d1515bb 100755 --- a/dev/make-sdk-win32.sh +++ b/dev/make-sdk-win32.sh @@ -62,9 +62,9 @@ fi WGET_ARGS="-N -q" if [ "$(has_spaces $BASE; echo $?)" -ne 0 ]; then - echo "ERROR: The current base directory ($BASE) has spaces." - echo "ERROR: building lablgtk would fail." - exit 1 + echo "ERROR: The current base directory ($BASE) has spaces." + echo "ERROR: building lablgtk would fail." + exit 1 fi cyg_install() { @@ -118,8 +118,6 @@ make_environ() { > "\$BASE/lib/topfind" sed s"|@BASE@|\$(cygpath -m "\$BASE")|g" "\$BASE/etc/findlib.conf.in" \\ > "\$BASE/etc/findlib.conf" - EOF - cat >> "$BASE/environ" <<- EOF echo "Good. You can now build Coq and Coqide from cygwin." EOF popd >/dev/null -- cgit v1.2.3 From 0f122180329259737dd1a32b18016c045c60da2d Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 9 Sep 2014 14:39:08 -0400 Subject: Add a VERBOSE flag to make-sdk-win32 For debugging purposes. --- dev/make-sdk-win32.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dev/make-sdk-win32.sh b/dev/make-sdk-win32.sh index 0b8d1515bb..f0a024a798 100755 --- a/dev/make-sdk-win32.sh +++ b/dev/make-sdk-win32.sh @@ -9,10 +9,14 @@ # License: Expat/MIT http://opensource.org/licenses/MIT # This script reads the following environment variables: +# VERBOSE - set to non-empty to have wget/this script be more verbose, for debugging purposes # BASE - set to non-empty to give a different location for the zip file, e.g., if /cygdrive/c is full or doesn't exist set -e -# set -x +if [ ! -z "$VERBOSE" ] +then + set -x +fi # Resources ocaml=ocaml-4.01.0-i686-mingw64-installer3.exe @@ -49,6 +53,13 @@ else fi BASE="$TRUE_BASE/CoqSDK-$REVISION" +if [ -z "$VERBOSE" ] +then + WGET_ARGS="-N -q" +else + WGET_ARGS="-N" +fi + # Windows has a version of FIND in C:/Windows/system32/find, and we don't want to use that if [ -x /usr/bin/find ] then -- cgit v1.2.3 From 06857793f696cb5e3c7f2c39ad8c6dde30d7982f Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Tue, 9 Sep 2014 14:39:36 -0400 Subject: Bump CoqSDK revision number --- dev/make-sdk-win32.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/make-sdk-win32.sh b/dev/make-sdk-win32.sh index f0a024a798..8e818410f4 100755 --- a/dev/make-sdk-win32.sh +++ b/dev/make-sdk-win32.sh @@ -42,7 +42,7 @@ has_spaces() { # http://www.dependencywalker.com/depends22_x86.zip # The SDK itself -REVISION=1 +REVISION=2 # support for working on computers that don't have a C: drive if [ -z "$BASE" ] then -- cgit v1.2.3