home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 7 / FreshFishVol7.bin / bbs / gnu / libg++-2.6-fsf.lha / libg++-2.6 / libg++ / proto-kit / make-types < prev    next >
Text File  |  1991-06-28  |  2KB  |  51 lines

  1. #!/bin/sh 
  2. #
  3. # using information included in the prototype dependencies and 
  4. # the hierarchy datasets, print off a GNU Make compatible form
  5. # of the type variable lists
  6. #
  7.  
  8. ( ../bin/prototype -voutput_type=user-types ../include/prototype.dependencies ; \
  9.   ) | gawk '{ for (i = 1 ; i <= NF ; i ++) printf "%s\n", $i ; }' | sort > \
  10.   /tmp/make-types.$$.user_types ;
  11.  
  12. ( ../bin/prototype -voutput_type=user-prototypes ../include/prototype.dependencies ; \
  13.   ../bin/hierarchy -voutput_type=general ../include/file_types.hierarchy \
  14.   ) | gawk '{ for (i = 1 ; i <= NF ; i ++) printf "%s\n", $i ; }' | sort > \
  15.   /tmp/make-types.$$.user_proto_types ;
  16.  
  17. ( ../bin/prototype -voutput_type=libg++-prototypes ../include/prototype.dependencies ; \
  18.   ) | gawk '{ for (i = 1 ; i <= NF ; i ++) printf "%s\n", $i ; }' | sort > \
  19.   /tmp/make-types.$$.lib_proto_types ;
  20.  
  21. # within each variable, all types are on a line by themselves.
  22.  
  23. echo 'USER_TYPES :=  \' ; 
  24. cat /tmp/make-types.$$.user_types | gawk '{ printf "\t%s \\\n", $0 ; }' ;
  25. echo ;
  26.  
  27. echo 'LIB_TYPES := \' ; 
  28. echo ;
  29.  
  30. echo 'USER_PROTO_TYPES := \' ; 
  31. cat /tmp/make-types.$$.user_proto_types | gawk '{ printf "\t%s \\\n", $0 ; }' ; 
  32. echo ;
  33.  
  34. echo 'USER_BASE_PROTO_TYPES := \' ; 
  35. cat /tmp/make-types.$$.user_proto_types | gawk -F. '{ printf "\t%s \\\n", $NF; }' | \
  36.   sort | uniq ; 
  37. echo ;
  38.  
  39. echo 'LIB_PROTO_TYPES := \' ; 
  40. cat /tmp/make-types.$$.lib_proto_types | gawk '{ printf "\t%s \\\n", $0 ; }' ;
  41. echo ;
  42.  
  43. echo 'LIB_BASE_PROTO_TYPES := \' ; 
  44. cat /tmp/make-types.$$.lib_proto_types | gawk -F. '{ printf "\t%s \\\n", $NF; }' | \
  45.   sort | uniq ; 
  46. echo ;
  47.  
  48. rm -f /tmp/make-types.$$.user_types ;
  49. rm -f /tmp/make-types.$$.user_proto_types ;
  50. rm -f /tmp/make-types.$$.lib_proto_types ;
  51.