home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / Makefile < prev    next >
Makefile  |  2002-03-15  |  2KB  |  78 lines

  1. #  Makefile for the Icon Program Library
  2.  
  3.  
  4. #  Make a library distribution (portable ucode and include files).
  5.  
  6. Ilib:    ../bin/libcfunc.so
  7. ../bin/libcfunc.so:  ../bin/icont
  8.     cp incl/*.icn gincl/*.icn cfuncs/icall.h ../lib
  9.     cd procs;  LPATH= ../../bin/icont -usc *.icn; mv *.u? ../../lib
  10.     cd gprocs; LPATH= ../../bin/icont -usc *.icn; mv *.u? ../../lib
  11.     if grep LoadFunc ../src/h/define.h >/dev/null; then $(MAKE) Cfuncs; fi
  12.  
  13.  
  14. #  Make C functions.  Only called if LoadFunc is defined.
  15.  
  16. Cfuncs:
  17.     cd cfuncs; LPATH= $(MAKE) ICONT=../../bin/icont
  18.     mv cfuncs/*.u? ../lib
  19.     mv cfuncs/libcfunc.so ../bin
  20.  
  21.  
  22. #  Make selected program binaries (platform-dependent icode) for ../bin,
  23. #  given that ../lib is ready
  24.  
  25. Ibin:    ../bin/ipatch
  26. ../bin/ipatch:  ../bin/icont
  27.     MAKE=$(MAKE) ./BuildBin
  28.  
  29.  
  30. #  Make a full set of program binaries (not usually done) in ./iexe,
  31. #  given that ../lib is ready
  32.  
  33. Iexe:
  34.     rm -f iexe/*
  35.     MAKE=$(MAKE) ./BuildExe
  36.  
  37.  
  38. #  Check for undefined identifiers in ../lib.
  39. #  (A few are expected: references to Mp, program, init, goal).
  40.  
  41. Undef:
  42.     cd ../lib; for f in *.u2; do (echo $$f; icont -us -fs $$f); done
  43.  
  44.  
  45. #  Check for stray files
  46.  
  47. Strays:
  48.     for d in *procs *progs *incl; do (cd $$d; pwd; gcomp CVS *.icn); done
  49.  
  50.  
  51. #  Verify that all procedures and programs build, including packs,
  52. #  and perform some other sanity checks
  53.  
  54. Check:
  55.     ./CheckAll
  56.  
  57.  
  58. #  Make Zip files for separate distribution of the library
  59.  
  60. ZipFiles:  Ilib
  61.     rm -rf ilib *.zip
  62.     zip -qrX9 bipl.zip docs incl procs progs packs data cfuncs -x '*/CVS/*'
  63.     zip -qrX9 gipl.zip gdocs gincl gprocs gprogs gpacks gdata  -x '*/CVS/*'
  64.     zip -qrX9 mipl.zip mincl mprocs mprogs                     -x '*/CVS/*'
  65.     mkdir ilib
  66.     cp ../lib/*.* ilib
  67.     zip -qrX9 ilib.zip ilib
  68.     rm -rf ilib
  69.  
  70.  
  71. #  Clean up.
  72.  
  73. Clean Pure:
  74.     -rm -rf ilib iexe *.zip */*.u[12] */*.zip
  75.     -rm -f xx `find *procs *progs -type f -perm -100 -print`
  76.     for d in cfuncs *packs/[abcdefghijklmnopqrstuvwxyz]*; do \
  77.         (cd $$d; $(MAKE) Clean); done
  78.