]> cvs.zerfleddert.de Git - micropolis/blob - src/tclx/makefile
enable swapping for 8 bit on big endian machines
[micropolis] / src / tclx / makefile
1 #
2 # Makefile --
3 #
4 # Makefile for Extended Tcl. This requires Tcl 6.1 or Tcl 6.2 from Berkeley,
5 # which should be compiled before running this makefile. Its location is
6 # configured below.
7 #
8 #------------------------------------------------------------------------------
9 # Copyright 1992 Karl Lehenbauer and Mark Diekhans.
10 #
11 # Permission to use, copy, modify, and distribute this software and its
12 # documentation for any purpose and without fee is hereby granted, provided
13 # that the above copyright notice appear in all copies. Karl Lehenbauer and
14 # Mark Diekhans make no representations about the suitability of this
15 # software for any purpose. It is provided "as is" without express or
16 # implied warranty.
17 #------------------------------------------------------------------------------
18 # $Id: Makefile,v 2.0 1992/10/16 04:54:45 markd Rel $
19 #------------------------------------------------------------------------------
20 #
21
22 include config.mk
23 include config/$(TCL_CONFIG_FILE)
24 SHELL=/bin/sh
25
26 #------------------------------------------------------------------------------
27
28 # List of files that are touched by secondary makefiles when something changes.
29
30 MADE.FILES=ucbsrc/made.tmp ossupp/made.tmp src/made.tmp
31 TKMADE.FILES=tkucbsrc/made.tmp
32
33 CFLAGS= $(OPTIMIZE_FLAG) $(XCFLAGS) -I$(TCL_UCB_DIR) $(MEM_DEBUG_FLAGS) \
34 $(SYS_DEP_FLAGS)
35
36 #------------------------------------------------------------------------------
37
38 all: tcl tcldef runtcl $(TCL_TK_SHELL)
39
40
41 #------------------------------------------------------------------------------
42 # Compile the Extended Tcl library and link the Tcl shell.
43 #
44
45 tcl: TCLX_MAKES
46
47 TCLX_MAKES: libtcl.a
48 cd ucbsrc; $(MAKE) -$(MAKEFLAGS) all
49 cd ossupp; $(MAKE) -$(MAKEFLAGS) all
50 cd tclsrc; $(MAKE) -$(MAKEFLAGS) all
51 cd src; $(MAKE) -$(MAKEFLAGS) all
52
53
54 # Copy the UCB libtcl.a file from where it was built. Force the other
55 # Makefiles to add their .o files to the library by nuking their made.tmp file.
56
57 libtcl.a: $(TCL_UCB_DIR)/libtcl.a
58 cp $(TCL_UCB_DIR)/libtcl.a .
59 rm -f $(MADE.FILES)
60
61 #------------------------------------------------------------------------------
62 # Generate a libtk.a with extensions and a wish shell with Extended Tcl
63 # commands.
64 #
65
66 wish: TKX_MAKES runwish
67
68 TKX_MAKES: libtk.a
69 cd tkucbsrc; $(MAKE) -$(MAKEFLAGS) all
70 cd tksrc; $(MAKE) -$(MAKEFLAGS) all
71
72
73 # Copy the UCB libtk.a file. Force the other Makefiles to add their
74 # .o files to the library by nuking their made.tmp file.
75
76 libtk.a: $(TCL_TK_DIR)/libtk.a
77 cp $(TCL_TK_DIR)/libtk.a libtk.a
78 rm -f $(TKMADE.FILES)
79
80
81 #------------------------------------------------------------------------------
82 # Generate a temporary TCLDEFAULT file so Tcl can be run in this directory.
83 # Also generate a script to point the TCLDEFAULT environment variable
84 # at this file for testing Tcl before its installed.
85
86 tcldef:
87 @echo " - Generating temporary TCLDEFAULT file. -"
88 @echo " - Use runtcl script to test Tcl before installing -"
89 @echo " - Use runwish script to test Tk before installing -"
90 @echo '# Temporary TCLDEFAULT file for debugging' >tcldef
91 @echo "set TCLPATH `pwd`/tcllib" >>tcldef
92 @echo "set TCLINIT `pwd`/tcllib/tclinit.tcl" >>tcldef
93
94 runtcl:
95 @echo ':' >runtcl
96 @echo '# script for testing Tcl before installation' >>runtcl
97 @echo "TCLDEFAULT=`pwd`/tcldef" >>runtcl
98 @echo "export TCLDEFAULT" >>runtcl
99 @echo "if [ \$$# = 0 ]" >>runtcl
100 @echo "then" >>runtcl
101 @echo " exec `pwd`/tcl" >>runtcl
102 @echo "else" >>runtcl
103 @echo " exec `pwd`/tcl \"\$$@\"" >>runtcl
104 @echo "fi" >>runtcl
105 chmod a+rx runtcl
106
107 runwish:
108 @echo ':' >runwish
109 @echo '# script for testing wish before installation' >>runwish
110 @echo "TCLDEFAULT=`pwd`/tcldef" >>runwish
111 @echo "export TCLDEFAULT" >>runwish
112 @echo "if [ \$$# = 0 ]" >>runwish
113 @echo "then" >>runwish
114 @echo " exec `pwd`/wish" >>runwish
115 @echo "else" >>runwish
116 @echo " exec `pwd`/wish \"\$$@\"" >>runwish
117 @echo "fi" >>runwish
118 chmod a+rx runwish
119
120 #------------------------------------------------------------------------------
121 #
122 # just test to see if the C++ include file compiles and links
123
124 tclplus:
125 cd src;$(MAKE) -$(MAKEFLAGS) tclplus
126
127 #------------------------------------------------------------------------------
128 #
129 # Run the UCB and Extended Tcl tests.
130
131 test: ucbtests extdtests
132
133 ucbtests: all
134 @echo ""
135 @echo "**************************************************"
136 @echo "* Ignore failures in tests: expr-2.2 & expr-2.6 *"
137 @echo "**************************************************"
138 @echo ""
139 ./runtcl -c "cd $(TCL_UCB_DIR)/tests;source all"
140
141 extdtests: all
142 ./runtcl -c "cd tests;source all"
143
144 #------------------------------------------------------------------------------
145 # Install Tcl.
146
147 install: all
148 ./runtcl tclsrc/install.tcl
149
150
151 #------------------------------------------------------------------------------
152 # Clean up the mess we made.
153
154 clean:
155 cd ucbsrc; $(MAKE) -$(MAKEFLAGS) clean
156 cd ossupp; $(MAKE) -$(MAKEFLAGS) clean
157 cd src; $(MAKE) -$(MAKEFLAGS) clean
158 cd tclsrc; $(MAKE) -$(MAKEFLAGS) clean
159 cd tkucbsrc; $(MAKE) -$(MAKEFLAGS) clean
160 cd tksrc; $(MAKE) -$(MAKEFLAGS) clean
161 touch junk~ config/junk~
162 -rm -f *~ config/*~ libtcl.a tcldef libtk.a runtcl runwish
Impressum, Datenschutz