/[MITgcm]/MITgcm/doc/api_reference/configure
ViewVC logotype

Diff of /MITgcm/doc/api_reference/configure

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2 by edhill, Fri Mar 26 23:46:11 2004 UTC revision 1.3 by edhill, Sun Mar 28 19:28:34 2004 UTC
# Line 18  cat ./dir_list | grep -v '^[ ]*#' | grep Line 18  cat ./dir_list | grep -v '^[ ]*#' | grep
18  name=$0  name=$0
19  cat <<EOF > Makefile  cat <<EOF > Makefile
20  #  #
21  #  ========================================  #  ================================================
22  #  #
23  #  CREATED BY $name -- DO NOT EDIT !!!  #  CREATED BY "$name" -- DO NOT EDIT !!!
24  #  #
25  #  ========================================  #  ================================================
26  #  #
27    
28  .SUFFIXES:  .SUFFIXES:
# Line 30  cat <<EOF > Makefile Line 30  cat <<EOF > Makefile
30  all: all_protex  all: all_protex
31    
32  clean:  clean:
33          -rm -f *.tex *.aux *.dvi *.log *.toc          -rm -f *.tex *.aux *.dvi *.log *.toc *.out
34    
35  EOF  EOF
36    
# Line 41  cat ./.dir_list_nocomments | while read Line 41  cat ./.dir_list_nocomments | while read
41      base_target=`echo $line | awk '{print $1}' | sed -e 's|/|__|g'`      base_target=`echo $line | awk '{print $1}' | sed -e 's|/|__|g'`
42      target=$base_target".tex"      target=$base_target".tex"
43      echo "Finding files for \"$target\" in: $line"      echo "Finding files for \"$target\" in: $line"
44      F_files=""      tex_files=""
45      h_files=""      h_files=""
46        F_files=""
47      c_files=""      c_files=""
48      for i in $line ; do      for i in $line ; do
49          F_files="$F_files"`ls -1 ../../$i/*.F  2>/dev/null`          tex_files="$tex_files"`ls -1 ../../$i/*.tex  2>/dev/null`
50          h_files="$h_files"`ls -1 ../../$i/*.h  2>/dev/null`          h_files="$h_files"`ls -1 ../../$i/*.h  2>/dev/null`
51            F_files="$F_files"`ls -1 ../../$i/*.F  2>/dev/null`
52          c_files="$c_files"`ls -1 ../../$i/*.c  2>/dev/null`          c_files="$c_files"`ls -1 ../../$i/*.c  2>/dev/null`
53      done      done
54    
55      # *.F      # *.tex
56      printf '%s' $base_target"_F = " >> Makefile      printf '%s' $base_target"_tex = " >> Makefile
57      for i in $F_files ; do      for i in $tex_files ; do
58          printf '\\\n%s' " $i " >> Makefile          printf '\\\n%s' " $i " >> Makefile
59      done      done
60      printf '\n' >> Makefile      printf '\n' >> Makefile
# Line 64  cat ./.dir_list_nocomments | while read Line 66  cat ./.dir_list_nocomments | while read
66      done      done
67      printf '\n' >> Makefile      printf '\n' >> Makefile
68    
69        # *.F
70        printf '%s' $base_target"_F = " >> Makefile
71        for i in $F_files ; do
72            printf '\\\n%s' " $i " >> Makefile
73        done
74        printf '\n' >> Makefile
75    
76      # *.c      # *.c
77      printf '%s' $base_target"_c = " >> Makefile      printf '%s' $base_target"_c = " >> Makefile
78      for i in $c_files ; do      for i in $c_files ; do
79          printf '\\\n%s' " $i " >> Makefile          printf '\\\n%s' " $i " >> Makefile
80      done      done
81      printf '\n' >> Makefile      printf '\n' >> Makefile
82      d_F="\$("$base_target"_F)"      d_tex="\$("$base_target"_tex)"
83      d_h="\$("$base_target"_h)"      d_h="\$("$base_target"_h)"
84        d_F="\$("$base_target"_F)"
85      d_c="\$("$base_target"_c)"      d_c="\$("$base_target"_c)"
86      cat <<EOF >> Makefile      cat <<EOF >> Makefile
87  $target: $d_F $d_h $d_c  $target: $d_tex $d_h $d_F $d_c
88          -rm -f $target          -rm -f $target
89  EOF  EOF
90      if test ! "x$F_files" = x ; then      if test ! "x$tex_files" = x ; then
91          printf '\t%s\n' "-./protex -b7 $d_F >> $target" >> Makefile          printf '\t%s\n' "-cat $d_tex >> $target" >> Makefile
92      fi      fi
93      if test ! "x$h_files" = x ; then      if test ! "x$h_files" = x ; then
94          printf '\t%s\n' "-./protex -b7 $d_h >> $target" >> Makefile          printf '\t%s\n' "-./protex -b7 $d_h >> $target" >> Makefile
95      fi      fi
96        if test ! "x$F_files" = x ; then
97            printf '\t%s\n' "-./protex -b7 $d_F >> $target" >> Makefile
98        fi
99      if test ! "x$c_files" = x ; then      if test ! "x$c_files" = x ; then
100          printf '\t%s\n' "-./protex -bC $d_c >> $target" >> Makefile          printf '\t%s\n' "-./protex -bC $d_c >> $target" >> Makefile
101      fi      fi
# Line 111  api_main.dvi:  api_main.tex Line 124  api_main.dvi:  api_main.tex
124          latex api_main          latex api_main
125          latex api_main          latex api_main
126          latex api_main          latex api_main
127            latex api_main
128    
129  all_protex: api_main.dvi  all_protex: api_main.dvi
130    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22