compile_hdf5_gcc.sh 735 Bytes
Newer Older
brinn's avatar
brinn committed
1
2
#! /bin/bash

3
source version.sh
brinn's avatar
brinn committed
4
PLATFORM="$1"
5
PATCHES="$2"
brinn's avatar
brinn committed
6

brinn's avatar
brinn committed
7
if [ "$PLATFORM" != "i386" -a "$PLATFORM" != "x86" -a "$PLATFORM" != "amd64" -a "$PLATFORM" != "x86_64" -a "$PLATFORM" != "armv6l" ]; then
brinn's avatar
brinn committed
8
  echo "Syntax: compile_hdf5.sh <platform>"
9
  echo "where <platform> is one of i386, x86, amd64, x86_64, or armv6l"
brinn's avatar
brinn committed
10
11
12
13
14
  exit 1
fi

tar xvf hdf5-$VERSION.tar

15
16
17
18
19
if [ -n "$POSTFIX" ]; then
  mv hdf5-$VERSION hdf5-$VERSION-$POSTFIX
  VERSION="$VERSION-$POSTFIX"
fi

brinn's avatar
brinn committed
20
21
cd hdf5-$VERSION

22
23
if [ -n "$PATCHES" ]; then
  for p in $PATCHES; do
24
    patch -p1 < ../$p
25
26
27
  done
fi

28
CFLAGS=$CFLAGS ./configure --prefix=/opt/hdf5-$VERSION-$PLATFORM --enable-debug=none --enable-production $ADDITIONAL &> configure.log
brinn's avatar
brinn committed
29

30
make &> make.log
brinn's avatar
brinn committed
31
32

make test &> test.log