diff options
author | burley <burley@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-11 21:53:17 +0000 |
---|---|---|
committer | burley <burley@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-11 21:53:17 +0000 |
commit | 4b61f2a600a929f19719f8805c9e13b59af346ab (patch) | |
tree | e344fc9c60e7a4b8b2d0e90fe1969fff821bfed4 /contrib/download_f2c | |
parent | 7750472447ce9c786d5eafca127b9f6834c7dbcb (diff) | |
download | gcc-4b61f2a600a929f19719f8805c9e13b59af346ab.tar.gz |
New shell scripts to ease dealing with Netlib f2c vis-a-vis g77 libg2c
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29346 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib/download_f2c')
-rwxr-xr-x | contrib/download_f2c | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/contrib/download_f2c b/contrib/download_f2c new file mode 100755 index 00000000000..159c52e7d87 --- /dev/null +++ b/contrib/download_f2c @@ -0,0 +1,77 @@ +#!/bin/sh +# +# download_f2c +# +# Unpacks a directory full of f2c stuff obtained from netlib, naming +# the directory f2c-YYYYMMDD (YYYYMMDD being the current date), +# leaving it in current working directory. +# +# This shell script downloads the tarball from netlib, unpacks everything, +# and strips off the redundant files, leaving a bare-bones (but fully +# reproducible) f2c source directory. (You must have yacc/bison to rebuild +# gram.c, by the way.) +# +# (C) 1999 Free Software Foundation +# Originally by James Craig Burley <craig@jcb-sc.com>, September 1999. +# +# This script is Free Software, and it can be copied, distributed and +# modified as defined in the GNU General Public License. A copy of +# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html +# +# FIXME: Replace WHOAMI with whatever is the canonical way to +# obtain the user's email address these days. + +dir=f2c-`date +%Y%m%d` +if [ ! -d $dir ] +then + mkdir $dir +fi +cd $dir + +echo Preparing $dir... + +if [ ! -d tmp ] +then + mkdir tmp +fi + +if [ ! -f tmp/f2c.tar ] +then + cd tmp + echo Downloading f2c.tar via ftp... + ftp -n netlib.bell-labs.com <<EOF + user ftp WHOAMI + type binary + cd netlib + get f2c.tar + quit +EOF + cd .. +fi + +echo Unpacking f2c.tar... + +tar xf tmp/f2c.tar +cd f2c +find . -name "*.gz" -print | sed -e "s:^\(.*\).gz:rm -f \1.Z:g" | sh +mv src libf77.gz libi77.gz f2c.1t.gz f2c.h.gz changes.gz disclaimer.gz readme.gz permission.gz .. +cd .. +rm -fr f2c +gunzip *.gz +(cd src; rm -f MD5 MD5.gz gram.c.gz .depend .depend.gz f2c.1.gz index.html index.html.gz; gunzip *.gz) +sh libf77 > /dev/null && rm libf77 +rm -f libF77/xsum0.out libF77/libF77.xsum +sh libi77 > /dev/null && rm libi77 +rm -f libI77/xsum0.out libI77/libI77.xsum +rm -f src/xsum0.out +touch src/xsum.out +cmp f2c.h src/f2c.h && rm -fv src/f2c.h +cmp src/readme src/README && rm -fv src/readme + +echo Deleting f2c.tar... +rm tmp/f2c.tar +rmdir tmp + +cd .. + +echo Latest f2c now in $dir. |