home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941a.tgz / v941a.tar / icon.v941src / Makefile next >
Makefile  |  2002-03-27  |  4KB  |  184 lines

  1. #  Makefile for Version 9.4 of Icon
  2. #
  3. #  Things have changed since Version 9.3.
  4. #  See doc/install.htm for instructions.
  5.  
  6.  
  7. #  configuration parameters
  8. VERSION=v941
  9. name=unspecified
  10. csw=custom
  11. dest=/must/specify/dest/
  12.  
  13.  
  14. ##################################################################
  15. #
  16. # Default targets.
  17.  
  18. All:    Icont Ilib Ibin
  19.  
  20. config/unix/$(name)/status src/h/define.h:
  21.     :
  22.     : To configure Icon, run either
  23.     :
  24.     :    make Configure name=xxxx     [for no graphics]
  25.     : or    make X-Configure name=xxxx   [with X-Windows graphics]
  26.     :
  27.     : where xxxx is one of
  28.     :
  29.     @cd config/unix; ls -d `find * -type d -prune -print`
  30.     :
  31.     @exit 1
  32.  
  33.  
  34. ##################################################################
  35. #
  36. # Code configuration.
  37.  
  38.  
  39. # Configure the code for a specific system.
  40.  
  41. Configure:    config/unix/$(name)/status
  42.         $(MAKE) Pure >/dev/null
  43.         cd config/unix; sh setup.sh $(name) NoGraphics $(csw)
  44.  
  45. X-Configure:    config/unix/$(name)/status
  46.         $(MAKE) Pure >/dev/null
  47.         cd config/unix; sh setup.sh $(name) Graphics $(csw)
  48.  
  49.  
  50. # Get the status information for a specific system.
  51.  
  52. Status:
  53.         @cat config/unix/$(name)/status
  54.  
  55.  
  56. ##################################################################
  57. #
  58. # Compilation.
  59.  
  60.  
  61. # The interpreter: icont and iconx.
  62.  
  63. Icont bin/icont: Common
  64.         cd src/icont;        $(MAKE)
  65.         cd src/runtime;        $(MAKE) 
  66.  
  67.  
  68. # The compiler: rtt, the run-time system, and iconc.
  69. # (NO LONGER SUPPORTED OR MAINTAINED.)
  70.  
  71. Iconc bin/iconc: Common
  72.         cd src/runtime;        $(MAKE) comp_all
  73.         cd src/iconc;        $(MAKE)
  74.  
  75.  
  76. # Common components.
  77.  
  78. Common:        src/h/define.h
  79.         cd src/common;        $(MAKE)
  80.         cd src/rtt;        $(MAKE)
  81.  
  82.  
  83. # The Icon program library.
  84.  
  85. Ilib:        bin/icont
  86.         cd ipl;            $(MAKE)
  87.  
  88. Ibin:        bin/icont
  89.         cd ipl;            $(MAKE) Ibin
  90.  
  91.  
  92. ##################################################################
  93. #
  94. # Installation and packaging.
  95.  
  96.  
  97. # Installation:  "make Install dest=new-icon-directory"
  98.  
  99. D=$(dest)
  100. Install:
  101.         test -d $D || mkdir $D
  102.         test -d $D/bin || mkdir $D/bin
  103.         test -d $D/lib || mkdir $D/lib
  104.         test -d $D/doc || mkdir $D/doc
  105.         test -d $D/man || mkdir $D/man
  106.         test -d $D/man/man1 || mkdir $D/man/man1
  107.         rm -f $D/bin/icon* $D/doc/* $D/man/man1/*
  108.         cd $D/lib; rm -f *
  109.         cp README $D
  110.         cp bin/[abcdefghijklmnopqrstuvwxyz]* $D/bin
  111.         rm -f $D/bin/libXpm* $D/bin/rt* $D/bin/icon
  112.         (cd $D/bin; ln -s icont icon)
  113.         cp lib/*.* $D/lib
  114.         cp doc/*.* $D/doc
  115.         cp man/man1/*.* $D/man/man1
  116.  
  117.  
  118. # Bundle up for binary distribution.
  119.  
  120. DIR=icon.$(VERSION)
  121. Package:
  122.         rm -rf $(DIR)
  123.         umask 002; $(MAKE) Install dest=$(DIR)
  124.         tar cf - icon.$(VERSION) | gzip -9 >icon.$(VERSION).tgz
  125.         rm -rf $(DIR)
  126.  
  127.  
  128. ##################################################################
  129. #
  130. # Tests.
  131.  
  132. Test    Test-icont:    ; cd tests; $(MAKE) Test
  133. Samples Samples-icont:    ; cd tests; $(MAKE) Samples
  134.  
  135. Test-iconc:        ; cd tests; $(MAKE) Test-iconc
  136. Samples-iconc:        ; cd tests; $(MAKE) Samples-iconc
  137.  
  138.  
  139. #################################################################
  140. #
  141. # Run benchmarks.
  142.  
  143. Benchmark:
  144.         $(MAKE) Benchmark-icont
  145.  
  146. Benchmark-iconc:
  147.         cd tests/bench;        $(MAKE) benchmark-iconc
  148.  
  149. Benchmark-icont:
  150.         cd tests/bench;        $(MAKE) benchmark-icont
  151.  
  152.  
  153. ##################################################################
  154. #
  155. # Cleanup.
  156. #
  157. # "make Clean" removes intermediate files, leaving executables and library.
  158. # "make Pure"  also removes binaries, library, and configured files.
  159.  
  160. Clean:
  161.         touch Makedefs
  162.         rm -rf icon.*
  163.         cd src;            $(MAKE) Clean
  164.         cd ipl;            $(MAKE) Clean
  165.         cd tests;        $(MAKE) Clean
  166.  
  167. Pure:
  168.         touch Makedefs
  169.         rm -rf icon.*
  170.         rm -rf bin/[abcdefghijklmnopqrstuvwxyz]*
  171.         rm -rf lib/[abcdefghijklmnopqrstuvwxyz]*
  172.         cd ipl;            $(MAKE) Pure
  173.         cd src;            $(MAKE) Pure
  174.         cd tests;        $(MAKE) Pure
  175.         cd config/unix;     $(MAKE) Pure
  176.  
  177.  
  178.  
  179. #  (This is used at Arizona to prepare source distributions.)
  180.  
  181. Dist-Clean:
  182.         rm -rf xx `find * -type d -name CVS`
  183.         rm -f  xx `find * -type f | xargs grep -l '<<ARIZONA-[O]NLY>>'`
  184.