| 1 | #!/bin/sh |
| 2 | rm -f fort.2 |
| 3 | CFILE= |
| 4 | SFILE= |
| 5 | if ( test $# -eq 1 ) then |
| 6 | CFILE="$1" |
| 7 | if (test -r s.$1) then |
| 8 | SFILE="$1" |
| 9 | fi |
| 10 | elif ( test $# -eq 2 ) then |
| 11 | if ( test -r c.$1 -a -r s.$2 ) then |
| 12 | CFILE="$1" |
| 13 | SFILE="$2" |
| 14 | else |
| 15 | CFILE="$1.$2" |
| 16 | if (test -r s.$1) then |
| 17 | SFILE="$1" |
| 18 | fi |
| 19 | fi |
| 20 | elif ( test -r c.$3 -a -r s.$2 ) then |
| 21 | CFILE="$3" |
| 22 | SFILE="$2" |
| 23 | else |
| 24 | CFILE="$1.$2" |
| 25 | SFILE="$3" |
| 26 | fi |
| 27 | if ( test "$OS" = "Windows_NT" && echo "$AUTO_DIR" | grep " " ) then |
| 28 | if command -v cygpath > /dev/null; then |
| 29 | # use short file name for AUTO_DIR with spaces |
| 30 | AUTO_DIR=$(cygpath -u $(cygpath -s -m "$AUTO_DIR")) |
| 31 | fi |
| 32 | fi |
| 33 | if ( test -n "$SFILE" -a -r c.$CFILE ) then |
| 34 | echo s=\'$SFILE\' | cat - c.$CFILE | make -f "$AUTO_DIR/cmds/cmds.make" EQUATION_NAME=$1 |
| 35 | else |
| 36 | make -f "$AUTO_DIR/cmds/cmds.make" EQUATION_NAME=$1 < c.$CFILE |
| 37 | fi |