home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!mdisea!kelsey
- From: kelsey@mdd.comm.mot.com (Joe Kelsey)
- Subject: Patch to tk2.3 Makefile for portability
- Message-ID: <1992Aug25.201601.15399@mdd.comm.mot.com>
- Summary: Add LIB_DIR variable; pass TCL_LIBRARY to tcl MAKE.
- Keywords: patch Makefile tk 2.3
- Sender: news@mdd.comm.mot.com
- Organization: Motorola, Mobile Data Division - Seattle, WA
- Date: Tue, 25 Aug 1992 20:16:01 GMT
- Lines: 60
-
- I've made the following change to every release of tk so far...
-
- Basically, I want to control as much of the make process as possible from the
- single point of invocation in the tk directory. So, that means that if you
- decide to install the library some place other than /usr/local/lib, you have
- to change *both* TK_LIBRARY and TCL_LIBRARY. In order to make this process
- easy, I add the LIB_DIR variable to the tk Makefile and use that variable to
- generate the TK_LIBRARY define and the TCL_LIBRARY define to pass to the tcl
- make process. I also changed the tcl ``make'' to ``$(MAKE)'' so that it gets
- the make flags passed to the parent process.
-
- I hope others find this useful and maybe even see it in the ``official''
- release...
-
- /Joe
- ----
- *** Makefile.orig Tue Aug 25 12:45:22 1992
- --- Makefile Tue Aug 25 12:55:04 1992
- ***************
- *** 27,36 ****
- # switch unless your library is in a non-standard place.
- #
-
- TCL_DIR = tcl
- XLIB = -lX11
- CC = cc
- ! CFLAGS = -I. -I$(TCL_DIR) -g -DTK_VERSION=\"2.2\"
-
- LIBS = libtk.a $(TCL_DIR)/libtcl.a
-
- --- 27,37 ----
- # switch unless your library is in a non-standard place.
- #
-
- + LIB_DIR = /usr/local/lib
- TCL_DIR = tcl
- XLIB = -lX11
- CC = cc
- ! CFLAGS = -I. -I$(TCL_DIR) -g -DTK_VERSION=\"2.3\" -DTK_LIBRARY=\"$(LIB_DIR)/tk\"
-
- LIBS = libtk.a $(TCL_DIR)/libtcl.a
-
- ***************
- *** 78,84 ****
- ranlib libtk.a
-
- $(TCL_DIR)/libtcl.a:
- ! cd $(TCL_DIR); make libtcl.a
-
- clean:
- rm -f $(OBJS) main.o libtk.a wish
- --- 79,85 ----
- ranlib libtk.a
-
- $(TCL_DIR)/libtcl.a:
- ! cd $(TCL_DIR); $(MAKE) libtcl.a TCL_LIBRARY=$(LIB_DIR)/tcl
-
- clean:
- rm -f $(OBJS) main.o libtk.a wish
-
-