home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / tcl / 1254 < prev    next >
Encoding:
Text File  |  1992-08-25  |  2.1 KB  |  73 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!mdisea!kelsey
  3. From: kelsey@mdd.comm.mot.com (Joe Kelsey)
  4. Subject: Patch to tk2.3 Makefile for portability
  5. Message-ID: <1992Aug25.201601.15399@mdd.comm.mot.com>
  6. Summary: Add LIB_DIR variable; pass TCL_LIBRARY to tcl MAKE.
  7. Keywords: patch Makefile tk 2.3
  8. Sender: news@mdd.comm.mot.com
  9. Organization: Motorola, Mobile Data Division - Seattle, WA
  10. Date: Tue, 25 Aug 1992 20:16:01 GMT
  11. Lines: 60
  12.  
  13. I've made the following change to every release of tk so far...
  14.  
  15. Basically, I want to control as much of the make process as possible from the
  16. single point of invocation in the tk directory.  So, that means that if you
  17. decide to install the library some place other than /usr/local/lib, you have
  18. to change *both* TK_LIBRARY and TCL_LIBRARY.  In order to make this process
  19. easy, I add the LIB_DIR variable to the tk Makefile and use that variable to
  20. generate the TK_LIBRARY define and the TCL_LIBRARY define to pass to the tcl
  21. make process.  I also changed the tcl ``make'' to ``$(MAKE)'' so that it gets
  22. the make flags passed to the parent process.
  23.  
  24. I hope others find this useful and maybe even see it in the ``official''
  25. release...
  26.  
  27. /Joe
  28. ----
  29. *** Makefile.orig    Tue Aug 25 12:45:22 1992
  30. --- Makefile    Tue Aug 25 12:55:04 1992
  31. ***************
  32. *** 27,36 ****
  33.   #            switch unless your library is in a non-standard place.
  34.   #
  35.   
  36.   TCL_DIR        = tcl
  37.   XLIB        = -lX11
  38.   CC        = cc
  39. ! CFLAGS        = -I. -I$(TCL_DIR) -g -DTK_VERSION=\"2.2\"
  40.   
  41.   LIBS = libtk.a $(TCL_DIR)/libtcl.a
  42.   
  43. --- 27,37 ----
  44.   #            switch unless your library is in a non-standard place.
  45.   #
  46.   
  47. + LIB_DIR        = /usr/local/lib
  48.   TCL_DIR        = tcl
  49.   XLIB        = -lX11
  50.   CC        = cc
  51. ! CFLAGS        = -I. -I$(TCL_DIR) -g -DTK_VERSION=\"2.3\" -DTK_LIBRARY=\"$(LIB_DIR)/tk\"
  52.   
  53.   LIBS = libtk.a $(TCL_DIR)/libtcl.a
  54.   
  55. ***************
  56. *** 78,84 ****
  57.       ranlib libtk.a
  58.   
  59.   $(TCL_DIR)/libtcl.a:
  60. !     cd $(TCL_DIR); make libtcl.a
  61.   
  62.   clean:
  63.       rm -f $(OBJS) main.o libtk.a wish    
  64. --- 79,85 ----
  65.       ranlib libtk.a
  66.   
  67.   $(TCL_DIR)/libtcl.a:
  68. !     cd $(TCL_DIR); $(MAKE) libtcl.a TCL_LIBRARY=$(LIB_DIR)/tcl
  69.   
  70.   clean:
  71.       rm -f $(OBJS) main.o libtk.a wish    
  72.  
  73.