added -p option for charmc for compiling f90 to specify -mod dir.
authorGengbin Zheng <gzheng@illinois.edu>
Fri, 1 Oct 2004 18:48:02 +0000 (18:48 +0000)
committerGengbin Zheng <gzheng@illinois.edu>
Fri, 1 Oct 2004 18:48:02 +0000 (18:48 +0000)
src/scripts/charmc

index 921465ba4fb562fc57d86f0f66b5fb91b745d9dd..16ce1b95ab6c8c37fe24482af0570a19b854820f 100755 (executable)
@@ -54,6 +54,7 @@ POST_LIBRARIES=""
 PRE_LIBRARIES=""  
 USE_F90_LIBRARIES="0"  
 USE_F77_LIBRARIES="0"  
+F90_MODDIR=
 AMPIMAIN=""
 COPYTO=""        
 MODCOPIES=""        
@@ -573,6 +574,11 @@ do
                OPTS="$OPTS $arg"
                ;;
 
+       "-p")
+               F90_MODDIR="$F90_MODDIR $1"
+               shift
+               ;;
+
        -l*|*.a)
                if [ -n "$POST_LANGUAGE" ]
                then
@@ -747,6 +753,14 @@ else
     CMK_CF90_MODINC="-M"
 fi
 
+if [ -n "$F90_MODDIR" ]
+then
+    for dir in $F90_MODDIR
+    do
+      OPTS_F90="$OPTS_F90 $CMK_CF90_MODINC $dir"
+    done
+fi
+
 if [ -n "$CMK_F90_USE_MODDIR" ]
 then
     CMK_CF90="$CMK_CF90 $CMK_CF90_MODINC$CHARMINC "