home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / fortran / toolpack.000 / toolpack / toolpack1.2 / scriptsource / pfort.s < prev    next >
Encoding:
Text File  |  1993-10-04  |  2.2 KB  |  83 lines

  1. #! /bin/csh
  2. #  pfort is a csh script to verify the portability of a Fortran program
  3. #  using ISTPF.
  4. #    (via the combined tool fragment ISTLA = ISTLX/ISTYP/ISTSA and then ISTPF)
  5. #
  6. #
  7. #  Invocation:
  8. #
  9. #  pfort Fortran_source_file
  10. #
  11. #  Check command line validity.
  12. if ( $#argv == '0' ) then
  13. TOOLPACKPATH/toolpack1.2/util/echoerr \
  14. Invocation:
  15. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  16. TOOLPACKPATH/toolpack1.2/util/echoerr \
  17. pfort Fortran_source_file
  18. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  19. TOOLPACKPATH/toolpack1.2/util/echoerr \
  20. Error/Warning messages sent to standard output and may be redirected to a file.
  21. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  22.    exit
  23. endif
  24. #  Check that Fortran_source_file exists.
  25. if ( -e $1 == 0 ) then
  26. TOOLPACKPATH/toolpack1.2/util/echoerr \
  27. "'$1' does not exist."
  28.    exit
  29. endif
  30. #
  31. #  Create PFS.  If PFS already exists, exit with an advisory message.
  32. #
  33. if ( -e _.TOOLPACK == 0 ) then
  34.    mkdir _.TOOLPACK
  35. else
  36. TOOLPACKPATH/toolpack1.2/util/echoerr \
  37. Toolpack-created directory '"_.TOOLPACK"' exists. \
  38. Remove with script '"discard"'.
  39.    exit
  40. endif
  41. #  Make a tab-free copy of the Fortran source and use it as source.
  42. set src = la.src$$
  43. expand $1 > _.TOOLPACK/$src
  44. #  Parse tree file name.
  45. set tree = _.latree
  46. #  Symbol table file name.
  47. set symb = _.lasymb
  48. #  Attribute file name.
  49. set attrib = _.laattrib
  50. #  Comment file name.
  51. set cmt = _.lacmt
  52. #  Comment index file name.
  53. set indx = _.laindx
  54. #  Create the interprocess file IST.CMD and append parameters for ISTLA.
  55. TOOLPACKPATH/toolpack1.2/util/mkipf \
  56. $src $cmt $tree $symb $indx $attrib
  57. #
  58. #  Invoke ISTLA.
  59. #
  60. TOOLPACKPATH/toolpack1.2/exec/istla.u
  61. #
  62. #  If tool terminated with errors, advise user to obtain listing.  Exit.
  63. if ( `cat _.TOOLPACK/_.info` == -1 ) then
  64. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  65. TOOLPACKPATH/toolpack1.2/util/echoerr \
  66. 'Errors detected.  Invoke script "getlst" to obtain a listing showing'
  67. TOOLPACKPATH/toolpack1.2/util/echoerr \
  68. statement and token numbers.
  69. TOOLPACKPATH/toolpack1.2/util/echoerr ""
  70.    /bin/rm -r _.TOOLPACK
  71.    exit
  72. endif
  73. #  Create the interprocess file IST.CMD and append parameters for ISTPF.
  74. TOOLPACKPATH/toolpack1.2/util/mkipf \
  75. $tree $symb $attrib -
  76. #
  77. #  Invoke ISTPF.
  78. #
  79. TOOLPACKPATH/toolpack1.2/exec/istpf.u
  80. #
  81. /bin/rm -r _.TOOLPACK
  82. #
  83.