summaryrefslogtreecommitdiff
path: root/scripts/classpath-build
blob: cd0e7d63e24440d7d4d5110b32c26384367a1fe8 (plain)
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
63
64
65
66
67
68
#!/bin/sh

# cvs may timeout ...
set -e

export CVS_RSH=ssh

CLASSPATH_CVSSRCDIR=$HOME/src/cvs/classpath
CLASSPATH_SRCDIR=$HOME/src/classpath
CLASSPATH_BUILDDIR=$HOME/src/classpath/build

DATE=`date +"%Y%m%d"`
OUTPUTDIR=$HOME/public_html/classpath/daily
LOGFILE=$OUTPUTDIR/classpath-$DATE.log

echo -n > $LOGFILE

if [ -d $CLASSPATH_CVSSRCDIR ] ; then
  echo "update cvs source tree" >> $LOGFILE
  cd $CLASSPATH_CVSSRCDIR
  cvs -z 3 update >> $LOGFILE 2>&1
fi

if [ -d $CLASSPATH_SRCDIR ] ; then

  # delete old sources
  echo "delete old source tree" >> $LOGFILE

  # workaround for automake safety behaviour with umask
  chmod u+w -R $CLASSPATH_SRCDIR

  rm -rf $CLASSPATH_SRCDIR

fi

echo "copy cvs tree to source tree" >> $LOGFILE
cp -a $CLASSPATH_CVSSRCDIR $CLASSPATH_SRCDIR
cd $CLASSPATH_SRCDIR

# patch version in configure.ac
if [ -f configure.ac ] ; then
  mv configure.ac configure.ac.orig
  sed "s/, \[.*cvs\]/, [$DATE]/" < configure.ac.orig > configure.ac
fi

# generate autofriends stuff
./autogen.sh >> $LOGFILE 2>&1

# create build directory
mkdir build
cd build
  
# configure and build classpath
export LD_LIBRARY_PATH=/usr/local/lib
../configure --prefix=$HOME/local/classpath --with-jikes=/usr/bin/jikes --enable-glibj=both --enable-jni --enable-gtk-peer --enable-regen-headers >> $LOGFILE 2>&1
make >> $LOGFILE 2>&1
make install >> $LOGFILE 2>&1

make dist >> $LOGFILE 2>&1
#make distcheck >> $LOGFILE 2>&1
cp classpath-$DATE.tar.gz $OUTPUTDIR

cd $OUTPUTDIR
ln -sf classpath-$DATE.tar.gz LATEST-SNAPSHOT
ln -sf classpath-$DATE.log LATEST-BUILDLOG

exit 0