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 / Makefile next >
Makefile  |  2002-02-25  |  4KB  |  183 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/lib/* $D/doc/* $D/man/man1/*
  108.         cp README $D
  109.         cp bin/[abcdefghijklmnopqrstuvwxyz]* $D/bin
  110.         rm -f $D/bin/libXpm* $D/bin/rt* $D/bin/icon
  111.         (cd $D/bin; ln -s icont icon)
  112.         cp lib/*.* $D/lib
  113.         cp doc/*.* $D/doc
  114.         cp man/man1/*.* $D/man/man1
  115.  
  116.  
  117. # Bundle up for binary distribution.
  118.  
  119. DIR=icon.$(VERSION)
  120. Package:
  121.         rm -rf $(DIR)
  122.         umask 002; $(MAKE) Install dest=$(DIR)
  123.         tar cf - icon.$(VERSION) | gzip -9 >icon.$(VERSION).tgz
  124.         rm -rf $(DIR)
  125.  
  126.  
  127. ##################################################################
  128. #
  129. # Tests.
  130.  
  131. Test    Test-icont:    ; cd tests; $(MAKE) Test
  132. Samples Samples-icont:    ; cd tests; $(MAKE) Samples
  133.  
  134. Test-iconc:        ; cd tests; $(MAKE) Test-iconc
  135. Samples-iconc:        ; cd tests; $(MAKE) Samples-iconc
  136.  
  137.  
  138. #################################################################
  139. #
  140. # Run benchmarks.
  141.  
  142. Benchmark:
  143.         $(MAKE) Benchmark-icont
  144.  
  145. Benchmark-iconc:
  146.         cd tests/bench;        $(MAKE) benchmark-iconc
  147.  
  148. Benchmark-icont:
  149.         cd tests/bench;        $(MAKE) benchmark-icont
  150.  
  151.  
  152. ##################################################################
  153. #
  154. # Cleanup.
  155. #
  156. # "make Clean" removes intermediate files, leaving executables and library.
  157. # "make Pure"  also removes binaries, library, and configured files.
  158.  
  159. Clean:
  160.         touch Makedefs
  161.         rm -rf icon.*
  162.         cd src;            $(MAKE) Clean
  163.         cd ipl;            $(MAKE) Clean
  164.         cd tests;        $(MAKE) Clean
  165.  
  166. Pure:
  167.         touch Makedefs
  168.         rm -rf icon.*
  169.         rm -rf bin/[abcdefghijklmnopqrstuvwxyz]*
  170.         rm -rf lib/[abcdefghijklmnopqrstuvwxyz]*
  171.         cd ipl;            $(MAKE) Pure
  172.         cd src;            $(MAKE) Pure
  173.         cd tests;        $(MAKE) Pure
  174.         cd config/unix;     $(MAKE) Pure
  175.  
  176.  
  177.  
  178. #  (This is used at Arizona to prepare source distributions.)
  179.  
  180. Dist-Clean:
  181.         rm -rf xx `find * -type d -name CVS`
  182.         rm -f  xx `find * -type f | xargs grep -l '<<ARIZONA-[O]NLY>>'`
  183.