home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / c / agl103p.lha / src / agl / Compile < prev    next >
Encoding:
Text File  |  1994-12-09  |  994 b   |  48 lines

  1. #! /bin/csh -f
  2. # the above line doesn't really work on the Amiga, but it's nice to be formal
  3.  
  4. # this file can be a little screwy to fool csh into acting like it should
  5.  
  6. alias basename usr:bin/basename
  7.  
  8.  
  9. setenv BIN usr:bin
  10. set space " "
  11.  
  12.  
  13. ### extract current files from RCS WITHOUT locking (cat is there to succeed)
  14. # echo
  15. # echo "    Extracting RCS Files (ignore existing files)
  16. # co -M -q RCS/*.h,v | cat
  17.  
  18.  
  19. ### create prototype header
  20. echo
  21. echo "    Creating Prototypes"
  22. foreach i ( *.c ) "set j `basename $i .c` ; prototype $i >pro/$j.pro"
  23. cat pro/*.pro > prototypes.h
  24.  
  25. set filelist filelist
  26.  
  27.  
  28. # make list of .o files
  29. echo -n > $filelist
  30. foreach i ( RCS/*.c,v ) " set j ` basename $i .c,v ` ; echo -n $space $j.o >> $filelist "
  31.  
  32.  
  33. ### set list of .o files
  34.  
  35. # set list `cat filelist`
  36. # setenv OFILES $list
  37.  
  38. # cheat
  39. cp filelist env:OFILES
  40. echo -n OFILES= >env:OMACRO
  41. cat env:OFILES >>env:OMACRO
  42.  
  43. ### make it all
  44. smake -f sas.makefile BIN=$BIN $OMACRO all
  45.  
  46. ### backups
  47. # copy #?.h #?.c usr:src/cbackup
  48.