home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / gnusmalltalk / makefile < prev    next >
Makefile  |  1992-03-01  |  5KB  |  191 lines

  1. ######################################################################
  2. #
  3. # Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
  4. # Written by Steve Byrne, with lots of good input from Dave Ciemiewicz.
  5. #
  6. # This file is part of GNU Smalltalk.
  7. #
  8. # GNU Smalltalk is free software; you can redistribute it and/or modify it
  9. # under the terms of the GNU General Public License as published by the Free
  10. # Software Foundation; either version 1, or (at your option) any later version.
  11. # GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT
  12. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  13. # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  14. # details.
  15. # You should have received a copy of the GNU General Public License along with
  16. # GNU Smalltalk; see the file COPYING.  If not, write to the Free Software
  17. # Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  
  18. #
  19. #######################################################################
  20.  
  21. ##################
  22. ##################
  23. ##################
  24. ###
  25. ### See mst.texinfo for details on installation.
  26. ###
  27. ##################
  28. ##################
  29. ##################
  30.  
  31. ##############
  32. #
  33. # These variables you may wish to change
  34. #
  35. ##############
  36.  
  37. # Mail path to GNU Smalltalk maintainer (Steve Byrne)
  38. MAINTAINER = 'sbb@Eng.sun.com'
  39.  
  40. # Uncomment this to use the winning GNU C compiler
  41. #CC = gcc
  42.  
  43. # These two definitions are used to allow you to add your own files
  44. # and libraries that will be linked into the GNU Smalltalk executable image.
  45. # see ./examples/Makefile for an example of how to use these
  46. USER_OBJS =
  47. USER_LIBS =
  48.  
  49. # This controls what file gets created on a 'make tar'...it could be the name
  50. # of a tape drive.
  51. TAR_FILE = mst.tar    # change this or override to be correct for your site
  52.  
  53. # Note: an alternative is  CPP = /lib/cpp
  54. CPP = $(CC) -E
  55.  
  56. # Uncomment these lines to enable the ultra-winning readline-reader
  57. #READLINEDIR = ./readline          # <-- set this appropriately
  58. #READLINE = -DUSE_READLINE -DREADLINEDIRDEF=$(READLINEDIR)
  59.  
  60. # Uncomment these lines to enable the use of the GNU dynamic linking package
  61. #DLDDIR = /usr/gnu/dld
  62. #DLD = -DUSE_DLD -DDLDDIRDEF=$(DLDDIR)
  63.  
  64.  
  65. COMPILE_TYPE = # Normal case
  66. #COMPILE_TYPE = -DOPTIMIZE
  67. #COMPILE_TYPE = -DPROFILE
  68.  
  69. ######################################################################
  70. ######################################################################
  71. ######################################################################
  72. ###
  73. ### You typically won't want to change any variables below this 
  74. ### point, although you may want to add rules for your own C functions
  75. ### below.
  76. ###
  77. ######################################################################
  78. ######################################################################
  79. ######################################################################
  80.  
  81. COMMON_LIBS = $(READLINE) $(DLD) 
  82.  
  83. MAKE = make  # BSD doesn't have it as a default.
  84.  
  85. # This controls the distribution version (not completely yet)
  86. VERSION=1.2
  87.  
  88. all: xmakefile $(USER_OBJS)
  89.     @$(MAKE) $(MFLAGS) \
  90.         CC=$(CC) \
  91.         "USER_OBJS=$(USER_OBJS)" "USER_LIBS=$(USER_LIBS)" \
  92.         -f xmakefile mst
  93.  
  94. mst lexdebug: xmakefile $(USER_OBJS)
  95.     @$(MAKE) $(MFLAGS) CC=$(CC) \
  96.         "USER_OBJS=$(USER_OBJS)" "USER_LIBS=$(USER_LIBS)" \
  97.         -f xmakefile $@
  98.  
  99.  
  100. profile:
  101.     $(MAKE) CFLAGS='$(CFLAGS) -pg -Dprofiling' -f xmakefile $@
  102.  
  103. regress:
  104.     (cd ./test; run-regression-tests)
  105.  
  106. clean:
  107.     -rm -f *.o core
  108.     -rm -f mst mst.im
  109.     -rm -f junk.c xmakefile
  110.  
  111. #
  112. # Install into the directories pointed to by mstpaths.h
  113. #
  114.  
  115. install: xmakefile
  116.     @$(MAKE) $(MFLAGS) -f xmakefile install
  117.  
  118. #
  119. # Create a tar file based on the Smalltalk source files
  120. #
  121. tar:
  122.     rm -f smalltalk-$(VERSION)
  123.     ln -s . smalltalk-$(VERSION)
  124.     sed -e "s/^/smalltalk-$(VERSION)\//" < mstfiles > mstdistfiles
  125.     tar cvf $(TAR_FILE) `cat mstdistfiles`
  126.     rm -f mstdistfiles
  127.  
  128. xmakefile: ymakefile mstconfig.h mstpaths.h Makefile
  129.     @echo "===== creating configuration dependent xmakefile"
  130.     rm -f xmakefile
  131.     cp ymakefile junk.c
  132.     $(CPP) -DFOR_MAKE $(COMPILE_TYPE) $(COMMON_LIBS) junk.c | \
  133.     sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$$//' -e 's/^ / /' |    \
  134.     sed -n -e '/^..*$$/p' > xmakefile
  135.     rm -f junk.c
  136.     @echo "===== done creating xmakefile"
  137.  
  138.  
  139.  
  140. #
  141. # Make the shar file for GNU Smalltalk
  142. #
  143. shar:
  144.     shar -imstfiles > mst.shar
  145.  
  146.  
  147. #
  148. # (Re)build the tags for Emacs
  149. #
  150. tags:
  151.     etags mst*.[ch]
  152.  
  153. unfin:
  154.     egrep -n '### ' *.[chy]
  155.  
  156. optionals:
  157.     egrep -n '??? ' *.[chy]
  158.  
  159.  
  160. senddiffs: diffs
  161.     kermit -e 1000 -s mst.diffs
  162.  
  163. mail-diffs:
  164.     @echo "Please enter a brief note describing the contents of"
  165.     @echo "the diffs file that you've created.  End with Ctrl-D."
  166.     @cat > mst.diffs.note
  167.     @echo "-----------------------------------" >> mst.diffs.note
  168.     @### If there's a more portable/better way to do this, please
  169.     @### don't hesitate to fix this and send the new version back -- SBB
  170.     @cat mst.diffs.note mst.diffs | mail $(MAINTAINER)
  171.  
  172. # Define ORIG_DIR when making diffs to select a different directory
  173. diffs:
  174.     mk_mst_diffs $(ORIG_DIR)
  175.  
  176. setup:
  177.     @if [ -f ./orig ] ; then \
  178.         echo "./orig exists, but is not a directory" ; \
  179.         exit 1 ; \
  180.     fi
  181.     rm -rf ./orig
  182.     mkdir ./orig
  183.     tar cbf 20 - `cat mstfiles` | (cd ./orig; tar xbBf 20 -)
  184.  
  185. # get an updated version of GNU Smalltalk
  186. update:
  187.     ./get_update
  188.  
  189.