summaryrefslogtreecommitdiff
path: root/distrib/cvs-build
diff options
context:
space:
mode:
authorchak <unknown>2000-05-02 07:50:41 +0000
committerchak <unknown>2000-05-02 07:50:41 +0000
commit4543231901d23f0d6e5d278ff9a2be3d648aa073 (patch)
treea7204326ca3de32f84cbea9101f58291e2d166f1 /distrib/cvs-build
parent1e2dc51066e0ebaf5d9baa8578386478078a430f (diff)
downloadhaskell-4543231901d23f0d6e5d278ff9a2be3d648aa073.tar.gz
[project @ 2000-05-02 07:50:41 by chak]
Removed a last flaw and use `cvs export' instead of `cvs checkout' now.
Diffstat (limited to 'distrib/cvs-build')
-rw-r--r--distrib/cvs-build34
1 files changed, 22 insertions, 12 deletions
diff --git a/distrib/cvs-build b/distrib/cvs-build
index e2b1d97e46..911589e680 100644
--- a/distrib/cvs-build
+++ b/distrib/cvs-build
@@ -29,6 +29,13 @@
# Requires: autoconf, cvs, GNU tar, gnuopt
+# TODO
+# ----
+#
+# * cover other fptools
+# * it would be convenient to be able to specify an alternative .spec file
+# (instead of using that in the repository)
+
# Default values
# --------------
@@ -36,14 +43,20 @@
#
CVS_REPOSITORY=:pserver:anoncvs@glass.cse.ogi.edu:/cvs
-# We build the CVS head by default (indicated by an empty tag)
+# We build the CVS head by default (a date of `tomorrow' guarantees to catch
+# the most recent check ins in the presence of clock skews - `now' wouldn't do
+# that)
#
-CVS_TAG=
+CVS_TAG="-D tomorrow"
# This is where we let rpm do the actual build
#
BUILD_DIR=/tmp/cvs-build-$$
+# Works only for i386 for the moment...
+# !!!IMPROVE THIS
+ARCH=i386
+
START_DIR=`pwd`
# Command line option processing
@@ -72,13 +85,13 @@ fi
# Check the sources out of CVS
#
-echo "*** Checking sources out of CVS... (will build in $BUILD_DIR)"
+echo "*** Exporting sources from CVS... (will build in $BUILD_DIR)"
mkdir -p $BUILD_DIR || exit 1
cd $BUILD_DIR
-cvs -d $CVS_REPOSITORY checkout $CVS_TAG fpconfig || exit 1
+cvs -d $CVS_REPOSITORY export $CVS_TAG fpconfig || exit 1
cd fptools
-cvs checkout $CVS_TAG ghc || exit 1
-cvs checkout $CVS_TAG hslibs || exit 1
+cvs -d $CVS_REPOSITORY export $CVS_TAG ghc || exit 1
+cvs -d $CVS_REPOSITORY export $CVS_TAG hslibs || exit 1
VERSION=`sed -e 's/.*\([0-9]\)\.\([0-9]*\).*/\1.\2/' ghc/VERSION`
echo "*** ...got ghc $VERSION"
@@ -98,15 +111,12 @@ mkdir $BUILD_DIR/SPEC
mkdir $BUILD_DIR/SOURCES
mkdir $BUILD_DIR/BUILD
mkdir $BUILD_DIR/RPMS
+mkdir $BUILD_DIR/RPMS/$ARCH
mkdir $BUILD_DIR/SRPMS
-# !!!not nice
-mkdir $BUILD_DIR/RPMS/i386
-
cp ghc/ghc.spec $BUILD_DIR/SPEC/ghc-${VERSION}.spec
cd $BUILD_DIR
-tar -cz --exclude='*CVS' -f $BUILD_DIR/SOURCES/ghc-$VERSION-src.tar.gz fptools\
- || exit 1
+tar -cz -f $BUILD_DIR/SOURCES/ghc-$VERSION-src.tar.gz fptools || exit 1
rm -rf $BUILD_DIR/fptools
# set up the configuration for rpm
@@ -135,7 +145,7 @@ echo "*** ...made the packages"
echo "*** Cleaning up..."
cd $START_DIR
cp $BUILD_DIR/SOURCES/ghc-$VERSION-src.tar.gz .
-cp $BUILD_DIR/RPMS/ghc* .
+cp $BUILD_DIR/RPMS/$ARCH/ghc* .
cp $BUILD_DIR/SRPMS/ghc* .
rm -rf $BUILD_DIR