home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / src / executor / genexterns.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1992-08-27  |  1.2 KB  |  29 lines

  1. #! /bin/sh
  2. # ----------------------------------------------------------------
  3. #    genexterns.sh - generate executor externs.h file
  4. #
  5. #    running this in the src/executor directory generates a file
  6. #    called externs.h which contains extern declarations for
  7. #    the executor source files.  It is intended that people
  8. #    run this script and then move the resulting externs.h file
  9. #    to the src/lib/H/executor directory.  When executor changes
  10. #    are checked in, a new externs.h should be checked in also.
  11. #    -cim 5/31/91
  12. #
  13. #    (pgdecs is a program Jeff Goh got off the net a while ago.)
  14. #
  15. #    $Header: /private/postgres/src/executor/RCS/genexterns.sh,v 1.1 1991/06/18 23:32:31 cimarron Exp $
  16. # ----------------------------------------------------------------
  17. rm -f externs.h
  18. pgdecs *.c | sort +2 | awk '\
  19. BEGIN {
  20.     print "/* this file generated by genexterns.sh -- do not edit */\n";
  21.     print "/* $Header: /private/postgres/src/executor/RCS/genexterns.sh,v 1.1 1991/06/18 23:32:31 cimarron Exp $ */\n";
  22. }
  23. /ARGS((void))/     { print "/* bad extern:" $0 " */"; next; }
  24. $2 ~ /^static/     { print "/* bad extern:" $0 " */"; next; }
  25. /^extern/     { print; next; }
  26. { print "/* bad extern:" $0 " */"; next; }
  27. END         { print "\n"; }
  28. ' > externs.h
  29.