[b1f6a9]: x86-mingw32-build.sh.batch Maximize Restore History

Download this file

x86-mingw32-build.sh.batch    102 lines (94 with data), 3.6 kB

# x86-mingw32-build.sh.batch -*- sh -*- vim: filetype=sh
# $Id$
#
# Unattended mode setup for x86-mingw32-build.sh cross compiler build.
#
# Copyright (C) 2006, 2009, 2010, MinGW Project
# Written by Keith Marshall <keithmarshall@users.sourceforge.net>
#
# This file is a component of the x86-mingw32-build script; it is not
# intended for stand alone use.
# 
# x86-mingw32-build is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version.
# 
# x86-mingw32-build is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for further details.
# 
# You should have received a copy of the GNU General Public License along
# with x86-mingw32-build; see the file COPYING.  If not, write to the Free
# Software Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301,
# USA.

BUILD_METHOD=unattended
. $script.mirrors

select_newest()
{
  isyes $ALLOW_DOWNLOADS \
    && option $1 "`enumerate $PACKAGE_DIR/$2- -src.tar.gz`" \
    || eval $1='`enumerate $PACKAGE_DIR/$2- -src.tar.gz`'
  option $1 "`enumerate $PACKAGE_DIR/${3-$2}- -${TARGET_OS}-src.tar.gz`"
  eval 'newest $'$1
}

if isyes $USE_LATEST_VERSIONS
then
  GCC_VERSION=`select_newest GCC_VERSION gcc-core`
  BINUTILS_VERSION=`select_newest BINUTILS_VERSION binutils`
  RUNTIME_VERSION=`select_newest RUNTIME_VERSION mingw-runtime mingwrt`
  W32API_VERSION=`select_newest W32API_VERSION w32api`
fi

option GLOBAL_BASE_OPTIONS "$GLOBAL_USER_OPTIONS"

case $BUILD_COMPONENTS in *gcc*)
  test -n "$GCC_VERSION" && \
    option DOWNLOAD gcc-core-$GCC_VERSION-${gcc_srctag-"src"}.tar.gz
  option GCC_BASE_OPTIONS "$GCC_USER_OPTIONS"
  for PACKAGE in $GCC_LANGUAGE_OPTIONS
  do
    FILE=$PACKAGE
    case $PACKAGE in 'c++') FILE='g++' ;; f77) FILE=g77 ;; esac
    if isyes $ALLOW_DOWNLOADS || \
    test -f $PACKAGE_DIR/gcc-$FILE-$GCC_VERSION-${gcc_srctag-"src"}.tar.gz
    then
      option DOWNLOAD gcc-$FILE-$GCC_VERSION-${gcc_srctag-"src"}.tar.gz
      option GCC_LANGUAGE_SET $PACKAGE ','
      case $PACKAGE in
        'c++') option GCC_BASE_OPTIONS \
           "$GCC_CXX_BASE_OPTIONS $GCC_CXX_USER_OPTIONS" ;;
         java) option GCC_BASE_OPTIONS \
           "$GCC_JAVA_BASE_OPTIONS $GCC_JAVA_USER_OPTIONS" ;;
      esac
    fi
  done ;;
esac
case $BUILD_COMPONENTS in *binutils*)
  if test -n "$BINUTILS_VERSION"
  then
    option DOWNLOAD binutils-$BINUTILS_VERSION-${binutils_srctag-"src"}.tar.gz
  fi
  option BINUTILS_BASE_OPTIONS "$BINUTILS_USER_OPTIONS" ;;
esac
case $BUILD_COMPONENTS in *mingw-runtime*)
  if test -n "$RUNTIME_VERSION"
  then
    test `newest "$RUNTIME_VERSION" 3.15` = "$RUNTIME_VERSION" \
      && mingwrt="mingwrt" mingwrt_srctag=${TARGET_OS-"mingw32"}"-src" \
      || mingwrt="mingw-runtime"
    option DOWNLOAD $mingwrt-$RUNTIME_VERSION-${mingwrt_srctag-"src"}.tar.gz
  fi
  option RUNTIME_BASE_OPTIONS "$RUNTIME_USER_OPTIONS" ;;
esac
case $BUILD_COMPONENTS in *w32api*)
  if test -n "$W32API_VERSION"
  then
    test `newest "$W32API_VERSION" 3.12` = "$W32API_VERSION" \
      && w32api_srctag=${TARGET_OS-"mingw32"}"-src"
    option DOWNLOAD w32api-$W32API_VERSION-${w32api_srctag-"src"}.tar.gz
  fi
  option W32API_BASE_OPTIONS "$W32API_USER_OPTIONS" ;;
esac

. $script.detail > $script.log
. $script.detail

# $RCSfile$Revision: 1.4 $: end of file