Skip to content

Commit

Permalink
Changed rebuild-netcdf to work with .tar.gz instead of git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobstanley committed Dec 20, 2012
1 parent a7c4af2 commit 7324db5
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions rebuild-netcdf
@@ -1,20 +1,19 @@
#!/bin/sh

if [ ! -f "liblib/Makefile.am" ]; then
echo "This script must be run from the netcdf root directory"
exit 1
fi

set -e

NETCDF=netcdf-4.2.1.1
NETCDF_WIN="$( cd "$( dirname "$0" )" && pwd )"

BINARIES=$NETCDF_WIN/bin

# Reset to known state

echo "# Resetting NetCDF repository to clean state"
git clean -fd
git reset --hard
echo "# Resetting NetCDF sources to clean state"

cd $NETCDF_WIN
rm -rf $NETCDF
tar -zxvf $NETCDF.tar.gz
cd $NETCDF


# Generate stdcall wrappers
Expand Down Expand Up @@ -46,3 +45,18 @@ echo
echo "# Building NetCDF"

make

# Harvest Binaries

echo
echo "# Harvesting Binaries"

rm -rf $BINARIES
mkdir $BINARIES

cp include/netcdf.h $BINARIES/netcdf.h
cp liblib/netcdfdll.def $BINARIES/netcdf.def
cp liblib/.libs/libnetcdf-7.dll $BINARIES/netcdf.dll
dlltool --input-def=$BINARIES/netcdf.def \
--dllname=netcdf.dll \
--output-lib=$BINARIES/netcdf.lib

0 comments on commit 7324db5

Please sign in to comment.