Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

executable file 62 lines (43 sloc) 1.691 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
#! /bin/sh

# Copyright (c) 1994-2012 by Marc Feeley, All Rights Reserved.

herefromroot="prebuilt/windows"
rootfromhere="../.."

#if [ "`id -un`" != "Administrator" ] ; then
# echo "You must execute this script as Administrator!"
# exit 1
#fi

export INSTALL_PREFIX="/c/Gambit-C/././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././././."
export DOS_INSTALL_PREFIX="`echo \"$INSTALL_PREFIX\" | sed -e \"s|^/c|C:|g\"`"

cd "`dirname $0`"

for VARIANT in mingw visualc; do

  cd "$rootfromhere"

  case "$VARIANT" in
      mingw) CONFIG_CC="gcc -mno-cygwin"
             RUN_TESTS=0
             ;;
    visualc) CONFIG_CC="cl.exe"
             RUN_TESTS=0
             ;;
  esac

  cmd /c "C:\PROGRA~1\MICROS~1.0\VC\VCVARS~1.BAT && c:/MinGW/msys/1.0/bin/sh -c \"./configure --prefix=\\\"$DOS_INSTALL_PREFIX\\\" --enable-multiple-versions --enable-symlinks --enable-single-host CC=\\\"$CONFIG_CC\\\"\""

  cd "$herefromroot"

  chmod +x build-phase2

  cmd /c "C:\PROGRA~1\MICROS~1.0\VC\VCVARS~1.BAT && c:/MinGW/msys/1.0/bin/sh -c \"./build-phase2 \\\"$VARIANT\\\" \\\"$RUN_TESTS\\\"\"" > build-phase2.out

  cat build-phase2.out

  SUCCESS=0

  if fgrep "************ TESTS SUCCESSFUL" build-phase2.out > /dev/null; then
    SUCCESS=1
  else
    if fgrep "************ TESTS SKIPPED" build-phase2.out > /dev/null; then
      SUCCESS=1
    fi
  fi

  rm -f build-phase2.out

  if [ "$SUCCESS" == "1" ] ; then
    echo "************ BUILD SUCCESSFUL ($VARIANT variant)"
  else
    echo "************ BUILD FAILED ($VARIANT variant)"
    exit 1
  fi

done

echo "************ windows BUILD SUCCESSFUL"
Something went wrong with that request. Please try again.