[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203

Stephane Popinet popinet at users.sf.net
Fri May 15 02:56:14 UTC 2009


The following commit has been merged in the upstream branch:
commit ead61dca871741d2555b531ffc8264b7438fd38b
Author: Stephane Popinet <popinet at users.sf.net>
Date:   Tue Feb 24 07:33:43 2009 +1100

    Fix for 'listing' option of wavewatch
    
    darcs-hash:20090223203343-d4795-e397663e2a3fb7340872c41efae0889ed1d749b5.gz

diff --git a/configure.in b/configure.in
index 64917a5..f47c1b3 100644
--- a/configure.in
+++ b/configure.in
@@ -312,7 +312,7 @@ AC_PROG_F77
 AM_CONDITIONAL(BUILD_STOKES, test x$F77 != x)
 
 # Build wavewatch module if wavewatch is installed
-AM_CONDITIONAL(BUILD_WAVEWATCH, test -f $HOME/.wwatch3.env)
+AM_CONDITIONAL(BUILD_WAVEWATCH, test -r $HOME/.wwatch3.env)
 
 dnl header file checks
 AC_CHECK_HEADERS(fpu_control.h,
diff --git a/modules/wavewatch/Makefile.am b/modules/wavewatch/Makefile.am
index 82b1e21..ffb751c 100644
--- a/modules/wavewatch/Makefile.am
+++ b/modules/wavewatch/Makefile.am
@@ -18,15 +18,15 @@ checktypes_LDADD = fchecktypes.o
 
 libwavewatch_a_SOURCES = cfortrantypes.h
 
-libwavewatch.a: gfsw3initmd.o
+libwavewatch.a: gfsw3initmd.o $(HOME)/.wwatch3.env
 	rm -f libwavewatch.a
 	$(AR) cru libwavewatch.a `grep WWATCH3_DIR $(HOME)/.wwatch3.env | awk '{print $$2 "/obj/w3*.o"}'` gfsw3initmd.o
 	$(RANLIB) libwavewatch.a
 
-gfsw3initmd.o: gfsw3initmd.ftn
+gfsw3initmd.o: gfsw3initmd.ftn $(HOME)/.wwatch3.env gfsad3
 	sh gfsad3 gfsw3initmd.ftn
 
-fchecktypes.o: fchecktypes.ftn
+fchecktypes.o: fchecktypes.ftn $(HOME)/.wwatch3.env gfsad3
 	sh gfsad3 fchecktypes.ftn
 
 cfortrantypes.h: checktypes
diff --git a/modules/wavewatch/gfsad3 b/modules/wavewatch/gfsad3
index c866dfa..92e5060 100755
--- a/modules/wavewatch/gfsad3
+++ b/modules/wavewatch/gfsad3
@@ -7,7 +7,7 @@ if [ "$#" -gt '3' ] || [ "$#" -lt 1 ]; then
     echo "usage: gfsad3 file.ftn" 1>&2 ; exit 1
 fi
 
-if test -f $HOME/.wwatch3.env; then
+if test -r $HOME/.wwatch3.env; then
     main_dir=`awk '{if ($1 == "WWATCH3_DIR") print $2;}' < $HOME/.wwatch3.env`
     tmp_dir=`awk '{if ($1 == "WWATCH3_TMP") print $2;}' < $HOME/.wwatch3.env`
 else
@@ -37,12 +37,16 @@ if test -f $tmp_dir/w3adc.err; then
 fi
 
 if test -f $tmp_dir/$basename.l; then
-    awk -v basename=$basename 'BEGIN{FS=":| "; i = 0;}{
+    if awk -v basename=$basename 'BEGIN{FS=":| "; i = 0;}{
       if ($1 == basename ".f90") i = 1;
       if (i == 1)
         print $0;
-    }' < $tmp_dir/$basename.l > /dev/stderr
-    exit 1
+    }END{
+      exit (i == 0);
+    }' < $tmp_dir/$basename.l > $tmp_dir/$basename.l.error; then
+	cat $tmp_dir/$basename.l.error > /dev/stderr
+	exit 1
+    fi
 fi
 
 mv -f $main_dir/obj/$basename.o .

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list