[cig-commits] r14677 - mc/1D/hc/trunk
walter at geodynamics.org
walter at geodynamics.org
Mon Apr 13 12:50:04 PDT 2009
Author: walter
Date: 2009-04-13 12:50:04 -0700 (Mon, 13 Apr 2009)
New Revision: 14677
Added:
mc/1D/hc/trunk/make_binary_package
Modified:
mc/1D/hc/trunk/Makefile
mc/1D/hc/trunk/make_tar
Log:
Clean up makefile and add a script to build binary packages
Modified: mc/1D/hc/trunk/Makefile
===================================================================
--- mc/1D/hc/trunk/Makefile 2009-04-13 19:40:47 UTC (rev 14676)
+++ mc/1D/hc/trunk/Makefile 2009-04-13 19:50:04 UTC (rev 14677)
@@ -18,11 +18,11 @@
#
#
# object file directory
-ODIR = ../hc/objects/$(ARCH)/
+ODIR = objects/$(ARCH)/
#
#
# binary directory
-BDIR = ../hc/bin/$(ARCH)/
+BDIR = bin/$(ARCH)/
# include files
OINCS = hc.h hc_filenames.h sh.h hc_constants.h
@@ -223,20 +223,17 @@
grep -v "int main(" > hc_auto_proto.h
dirs:
- if [ ! -s ../hc/ ]; then\
- mkdir ../hc/;\
+ if [ ! -s objects/ ]; then\
+ mkdir objects;\
fi;
- if [ ! -s ../hc/objects/ ]; then\
- mkdir ../hc/objects;\
+ if [ ! -s objects/$(ARCH)/ ]; then\
+ mkdir objects/$(ARCH);\
fi;
- if [ ! -s ../hc/objects/$(ARCH)/ ]; then\
- mkdir ../hc/objects/$(ARCH);\
- fi;
- if [ ! -s ../hc/bin/ ];then\
- mkdir ../hc/bin;\
+ if [ ! -s bin/ ];then\
+ mkdir bin;\
fi;\
- if [ ! -s ../hc/bin/$(ARCH) ];then\
- mkdir ../hc/bin/$(ARCH);\
+ if [ ! -s bin/$(ARCH) ];then\
+ mkdir bin/$(ARCH);\
fi
clean:
Added: mc/1D/hc/trunk/make_binary_package
===================================================================
--- mc/1D/hc/trunk/make_binary_package (rev 0)
+++ mc/1D/hc/trunk/make_binary_package 2009-04-13 19:50:04 UTC (rev 14677)
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# create a directory with the binaries. It invokes make, so it needs
+# NETCDFHOME and GMTHOME set.
+
+ver=${1-1.0}
+date=`date '+%m%d%y'`
+
+dest=../hc-$ver.$date
+
+CFLAGS="-O2" LDFLAGS="-static" make all
+strip bin/* bin/*/*
+
+mkdir "$dest"
+cp README.TXT calc_vel_and_plot "$dest"
+mkdir "$dest/example_data" "$dest/prem"
+cp -a bin/ "$dest"
+cp example_data/* "$dest/example_data"
+cp prem/* "$dest/prem"
+mkdir "$dest/hcplates"
+cp hcplates/data hcplates/enes hcplates/parameter_file.default hcplates/plates_ids.ixz hcplates/point.j hcplates/README hcplates/run_example.mk "$dest/hcplates"
+
Property changes on: mc/1D/hc/trunk/make_binary_package
___________________________________________________________________
Name: svn:executable
+ *
Modified: mc/1D/hc/trunk/make_tar
===================================================================
--- mc/1D/hc/trunk/make_tar 2009-04-13 19:40:47 UTC (rev 14676)
+++ mc/1D/hc/trunk/make_tar 2009-04-13 19:50:04 UTC (rev 14677)
@@ -13,7 +13,7 @@
mkdir $HOME/tmp/hc/prem/
mkdir $HOME/tmp/hc/hcplates/
-cp *.c *.h Makefile Makefile.include README.TXT INSTALLATION.TXT calc_vel_and_plot \
+cp *.c *.h Makefile Makefile.include README.TXT calc_vel_and_plot \
$HOME/tmp/hc
cp example_data/* $HOME/tmp/hc/example_data/
cp prem/prem* $HOME/tmp/hc/prem/
More information about the CIG-COMMITS
mailing list