This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Script to download gcc prerequisites


On 05/27/2010 07:52 PM, NightStrike wrote:
> On Tue, May 25, 2010 at 12:08 PM, Andrew Haley <aph@redhat.com> wrote:
>> +wget http://www.mpfr.org/mpfr-current/$MPFR.tar.gz || exit 1
> 
> This doesn't work if the version specified isn't the current version.
>
> For mingw-w64, we use this:
> 
> (this is from a GNU makefile, for purposes of understanding the strip syntax)
> 
> $(WGET) $@ http://www.mpfr.org/mpfr-$(strip
> ${MPFR_VERSION})/mpfr-$(strip ${MPFR_VERSION}).tar.bz2
> 
> so really, for your purposes, you would want something like:
> 
> wget http://www.mpfr.org/$MPFR/$MPFR.tar.gz

OK to apply?

I guess I need a toplevel maintainer or geoffk.

Andrew.


2010-05-25  Andrew Haley  <aph@redhat.com>

        * download_prerequisites: New script.

Index: contrib/download_prerequisites
===================================================================
--- contrib/download_prerequisites      (revision 0)
+++ contrib/download_prerequisites      (revision 0)
@@ -0,0 +1,38 @@
+#! /bin/sh
+
+# Download some prerequisites needed by gcc.
+# Run this from the top level of the gcc source tree and the gcc
+# build will do the right thing.
+#
+# (C) 2010 Free Software Foundation
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+# 
+# This program 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 more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see http://www.gnu.org/licenses/.
+
+MPFR=mpfr-2.4.2
+GMP=gmp-4.3.2
+MPC=mpc-0.8.2
+
+wget http://www.mpfr.org/$MPFR/$MPFR.tar.gz || exit 1
+tar xzf $MPFR.tar.gz || exit 1
+ln -sf $MPFR mpfr || exit 1
+
+wget ftp://ftp.gmplib.org/pub/$GMP/$GMP.tar.bz2 || exit 1
+tar xjf $GMP.tar.bz2  || exit 1
+ln -sf $GMP gmp || exit 1
+
+wget http://www.multiprecision.org/mpc/download/$MPC.tar.gz || exit 1
+tar xzf $MPC.tar.gz || exit 1
+ln -sf $MPC mpc || exit 1
+
+rm $MPFR.tar.gz $GMP.tar.bz2 $MPC.tar.gz || exit 1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]