home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / fchek284.zip / dcl2inc.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1995-03-11  |  984b  |  26 lines

  1. #!/bin/sh
  2. # ========================================================================
  3. # Extract COMMON block declarations from .dcl files output by ftnchek
  4. # 2.8.2 (or later), and provided that they are unique, output *.inc include
  5. # files, and modified .dcl files with extension .dcn containing INCLUDE
  6. # statements in place of COMMON block declarations.  In addition, write
  7. # a sorted list of include file dependencies on stdout for adding to a
  8. # Makefile.
  9. #
  10. # Usage:
  11. #    ftnchek -makedcls=1 *.f
  12. #    dcl2inc *.dcl
  13. #
  14. # You can then manually replace the old declarations in the *.f files
  15. # with the contents of each corresponding *.dcn file.  Any COMMON
  16. # blocks that are not identical to their first occurrence will be left
  17. # intact, instead of being replaced by INCLUDE statements, and a
  18. # warning will be issued for each of them.
  19. #
  20. # [11-Mar-1995]
  21. # ========================================================================
  22.  
  23. LIBDIR=/usr/local/lib/ftnchek
  24.  
  25. nawk -f $LIBDIR/dcl2inc.awk $*
  26.