1 |
578 |
markom |
#
|
2 |
|
|
# Makefile for Expect
|
3 |
|
|
#
|
4 |
|
|
|
5 |
|
|
# Requires at least Tcl 7.5
|
6 |
|
|
# Known to work with up to Tcl 7.5
|
7 |
|
|
|
8 |
|
|
# While Tk is optional, if you do use Tk, it must be at least Tk 4.1
|
9 |
|
|
# Known to work with up to Tk 4.1
|
10 |
|
|
|
11 |
|
|
VERSION_FULL = \"@EXP_VERSION_FULL@\"
|
12 |
|
|
# Tcl's tclConfig requires VERSION have a short-style version string.
|
13 |
|
|
VERSION = @EXP_VERSION@
|
14 |
|
|
|
15 |
|
|
srcdir = @srcdir@
|
16 |
|
|
VPATH = @srcdir@
|
17 |
|
|
SUBDIRS = @subdirs@
|
18 |
|
|
|
19 |
|
|
EXEEXT = @EXEEXT@
|
20 |
|
|
|
21 |
|
|
######################################################################
|
22 |
|
|
# The following lines are things you may want to change
|
23 |
|
|
######################################################################
|
24 |
|
|
|
25 |
|
|
# Tcl include files. (If you haven't installed Tcl yet, read the README file).
|
26 |
|
|
# This must point to the directory that contains ALL of Tcl's include
|
27 |
|
|
# files, not just the public ones.
|
28 |
|
|
TCLHDIR = @TCLHDIR@
|
29 |
|
|
ITCLHDIR = @ITCLHDIR@
|
30 |
|
|
TCLHDIRDASHI = @TCLHDIRDASHI@
|
31 |
|
|
# Tcl's Tcl library (definitions of parray, etc)
|
32 |
|
|
TCL_LIBRARY = @TCL_LIBRARY@
|
33 |
|
|
|
34 |
|
|
# Tcl library uninstalled. Should be something like -ltcl or ../tcl/libtcl.a
|
35 |
|
|
TCLLIB = @TCL_BUILD_LIB_SPEC@
|
36 |
|
|
ITCLLIB = @ITCLLIB@
|
37 |
|
|
# Tcl library installed. Should be something like -ltcl or ../tcl/libtcl.a
|
38 |
|
|
TCLLIB_INSTALLED = @TCL_LIB_SPEC@
|
39 |
|
|
|
40 |
|
|
# The following definitions are only nec. if you want to use Tk with Expect.
|
41 |
|
|
# Tk include files
|
42 |
|
|
TKHDIR = @TKHDIR@
|
43 |
|
|
TKHDIRDASHI = @TKHDIRDASHI@
|
44 |
|
|
|
45 |
|
|
# Tk library
|
46 |
|
|
TKLIB = @TK_BUILD_LIB_SPEC@
|
47 |
|
|
TKLIB_INSTALLED = @TK_LIB_SPEC@
|
48 |
|
|
|
49 |
|
|
# X11 include files and other flags to compiler
|
50 |
|
|
X11_CFLAGS = @TK_XINCLUDES@
|
51 |
|
|
# X library
|
52 |
|
|
X11_LD_FLAGS =
|
53 |
|
|
# XXX Temporarily commented out until expectk is working again.
|
54 |
|
|
#X11_PROGS = @X_PROGS@
|
55 |
|
|
# X11_PROGS_INSTALLED should really be a separate symbol generated by configure but we're
|
56 |
|
|
# hitting configure's limit on substitutions, so be crude and use one less symbol.
|
57 |
|
|
# XXX Temporarily commented out until expectk is workign again.
|
58 |
|
|
#X11_PROGS_INSTALLED = @X_PROGS@
|
59 |
|
|
|
60 |
|
|
# Flags to pass to both cc and ld
|
61 |
|
|
# You should be able to leave this just the way it is. However, here are some
|
62 |
|
|
# note if you run into problems:
|
63 |
|
|
#
|
64 |
|
|
# Avoid -O (optimize) unless you are convinced your optimizer is flawless
|
65 |
|
|
# (hint: not a chance). I have heard many reports of -O causing Expect to
|
66 |
|
|
# misbehave.
|
67 |
|
|
# I encourage you to use -g (debugging). While it is unlikely you will
|
68 |
|
|
# encounter an internal error in Expect, should this happen, I may just need
|
69 |
|
|
# the -g information and then you will need to recompile Expect. As an aside,
|
70 |
|
|
# Expect is not a space or time pig, so this won't affect the performance of
|
71 |
|
|
# your Expect scripts.
|
72 |
|
|
# Note: On Linux systems which only have dynamic X libraries, the -g prevents
|
73 |
|
|
# the linker from using them. So do not use -g on such systems.
|
74 |
|
|
# From now on, CFLAGS is never used. Instead, use XCFLAGS. This is done so
|
75 |
|
|
# that we can provide a public interface for CFLAGS thereby allowing users
|
76 |
|
|
# to add to it on the Make command-line and still get the rest of the flags
|
77 |
|
|
# computed by configure. Do this at your own risk - it obvious goes against
|
78 |
|
|
# the idea of configure's interface, however this is established tradition
|
79 |
|
|
# at some sites (e.g., Cygnus)!
|
80 |
|
|
CFLAGS = @CFLAGS@
|
81 |
|
|
XCFLAGS = $(CFLAGS) @EXP_CFLAGS@ @EXP_SHLIB_CFLAGS@
|
82 |
|
|
#XCFLAGS = @CFLAGS@ @EXP_CFLAGS@ @EXP_SHLIB_CFLAGS@
|
83 |
|
|
XCFLAGS = @CFLAGS@ @EXP_CFLAGS@
|
84 |
|
|
|
85 |
|
|
# Flags to pass only to linker (after .o files but before libraries)
|
86 |
|
|
LDFLAGS = @EXP_LDFLAGS@
|
87 |
|
|
|
88 |
|
|
# Which C compiler to use. For simplicity, we inherit the same definition
|
89 |
|
|
# used when Tcl was compiled. Changing this definition here can screw up
|
90 |
|
|
# deductions that the configure script made on the assumption that you were
|
91 |
|
|
# using a different compiler.
|
92 |
|
|
CC = @CC@
|
93 |
|
|
|
94 |
|
|
# By default, "make install" will install the appropriate files in
|
95 |
|
|
# /usr/local/bin, /usr/local/lib, /usr/local/man, etc. By changing this
|
96 |
|
|
# variable, you can specify an installation prefix other than /usr/local.
|
97 |
|
|
# You may find it preferable to call configure with the --prefix option
|
98 |
|
|
# to control this information. This is especially handy if you are
|
99 |
|
|
# installing Expect several times (perhaps on a number of machines or
|
100 |
|
|
# in different places). Then you don't have to hand-edit this file.
|
101 |
|
|
# See the INSTALL file for more information. (Analogous information
|
102 |
|
|
# applies to the next variable as well.)
|
103 |
|
|
prefix = @prefix@
|
104 |
|
|
|
105 |
|
|
# You can specify a separate installation prefix for architecture-specific
|
106 |
|
|
# files such as binaries and libraries.
|
107 |
|
|
exec_prefix = @exec_prefix@
|
108 |
|
|
|
109 |
|
|
# The following Expect scripts are not necessary to have installed as
|
110 |
|
|
# commands, but are very useful. Edit out what you don't want installed.
|
111 |
|
|
# The INSTALL file describes these and others in more detail.
|
112 |
|
|
# Some Make's screw up if you delete all of them because SCRIPTS is a
|
113 |
|
|
# target. If this is a problem, just comment out the SCRIPTS target itself.
|
114 |
|
|
SCRIPTS = timed-run timed-read ftp-rfc autopasswd lpunlock weather \
|
115 |
|
|
passmass rftp kibitz rlogin-cwd xpstat tkpasswd dislocate xkibitz \
|
116 |
|
|
tknewsbiff unbuffer mkpasswd cryptdir decryptdir autoexpect
|
117 |
|
|
# A couple of the scripts have man pages of their own.
|
118 |
|
|
# You can delete these too if you don't want'em.
|
119 |
|
|
SCRIPTS_MANPAGES = kibitz dislocate xkibitz tknewsbiff unbuffer mkpasswd \
|
120 |
|
|
passmass cryptdir decryptdir autoexpect
|
121 |
|
|
|
122 |
|
|
# Short directory path where binary can be found to support #! hack.
|
123 |
|
|
# This directory path can be the same as the directory in which the binary
|
124 |
|
|
# actually sits except when the path is so long that the #! mechanism breaks
|
125 |
|
|
# (usually at 32 characters).
|
126 |
|
|
# The solution is to create a directory with a very short name, which consists
|
127 |
|
|
# only of symbolic links back to the true binaries. Subtracting two for "#!"
|
128 |
|
|
# and a couple more for arguments (typically " -f" or " --") gives you 27
|
129 |
|
|
# characters. Pathnames over this length won't be able to use the #! magic.
|
130 |
|
|
# For more info on this, see the execve(2) man page.
|
131 |
|
|
SHORT_BINDIR = @bindir@
|
132 |
|
|
|
133 |
|
|
# If you have ranlib but it should be avoided, change this from "ranlib"
|
134 |
|
|
# to something innocuous like "echo". Known systems with this problem:
|
135 |
|
|
# older SCO boxes.
|
136 |
|
|
RANLIB = @TCL_RANLIB@
|
137 |
|
|
UNSHARED_RANLIB = @UNSHARED_RANLIB@
|
138 |
|
|
|
139 |
|
|
# Change EVENT_ABLE to "noevent" if your system is:
|
140 |
|
|
# old SCO because poll doesn't exist and select is broken on ptys
|
141 |
|
|
# 3b2 SVR3 because select doesn't exist and poll is broken on ptys
|
142 |
|
|
# If you do use "noevent":
|
143 |
|
|
# 1) you must also edit expect_cf.h and change
|
144 |
|
|
# "#undef SIMPLE_EVENT" to "#define SIMPLE_EVENT",
|
145 |
|
|
# 2) you cannot use any event facilities such as "after" or anything in Tk.
|
146 |
|
|
# 3) you cannot expect or interact with two or more processes simultaneously
|
147 |
|
|
#
|
148 |
|
|
EVENT_ABLE = @EVENT_ABLE@
|
149 |
|
|
|
150 |
|
|
# Change EVENT_TYPE to poll if your system is:
|
151 |
|
|
# NCR SVR4 (1.03.01) where select is broken on ttys
|
152 |
|
|
# StarServer (SVR3 and SVR4.0) where select is broken on ttys
|
153 |
|
|
#
|
154 |
|
|
# You will need to change EVENT_TYPE to select if your system is:
|
155 |
|
|
# Pyramid OSx in the att universe where poll is broken (see LIBS below)
|
156 |
|
|
#
|
157 |
|
|
EVENT_TYPE = @EVENT_TYPE@
|
158 |
|
|
|
159 |
|
|
# Define default parameters for ptys. This is used when 1) running in the
|
160 |
|
|
# background, 2) user has not defined the variable STTY_INIT to initialize
|
161 |
|
|
# ptys, and 3) the pty-driver's defaults suck.
|
162 |
|
|
#
|
163 |
|
|
# If your system doesn't understand "sane", try "cooked". Apollo systems
|
164 |
|
|
# need nothing at all and should delete this line. Systems using 8-bit
|
165 |
|
|
# character sets may need to disable parity.
|
166 |
|
|
# Systems that define sane to use @ as line kill and # as erase should
|
167 |
|
|
# use something like "sane kill erase ".
|
168 |
|
|
STTY = -DDFLT_STTY="\"@DEFAULT_STTY_ARGS@\""
|
169 |
|
|
|
170 |
|
|
######################################################################
|
171 |
|
|
# End of things you may want to change
|
172 |
|
|
#
|
173 |
|
|
# Do not change anything after this
|
174 |
|
|
######################################################################
|
175 |
|
|
|
176 |
|
|
bindir = @bindir@
|
177 |
|
|
bindir_arch_indep = $(prefix)/bin
|
178 |
|
|
libdir = @libdir@/expect$(VERSION)
|
179 |
|
|
tcl_libdir = @libdir@
|
180 |
|
|
# CYGNUS LOCAL: use datadir, not $(prefix)/lib.
|
181 |
|
|
libdir_arch_indep = @datadir@
|
182 |
|
|
# END CYGNUS LOCAL
|
183 |
|
|
|
184 |
|
|
mandir = @mandir@
|
185 |
|
|
man1dir = $(mandir)/man1
|
186 |
|
|
man3dir = $(mandir)/man3
|
187 |
|
|
infodir = @infodir@
|
188 |
|
|
includedir = @includedir@
|
189 |
|
|
|
190 |
|
|
# Expect's utility script directories - arch-independent and arch-non-
|
191 |
|
|
# independent. These correspond to the variables "exp_library" and
|
192 |
|
|
# "exp_exec_library".
|
193 |
|
|
SCRIPTDIR = $(libdir_arch_indep)
|
194 |
|
|
EXECSCRIPTDIR = $(libdir)
|
195 |
|
|
|
196 |
|
|
SHELL = @EXP_CONFIG_SHELL@
|
197 |
|
|
|
198 |
|
|
INSTALL = @INSTALL@
|
199 |
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
200 |
|
|
INSTALL_DATA = @INSTALL_DATA@
|
201 |
|
|
|
202 |
|
|
AR = ar
|
203 |
|
|
ARFLAGS = cr
|
204 |
|
|
|
205 |
|
|
LOCAL_EXPECT=LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH ./expect$(EXEEXT)
|
206 |
|
|
|
207 |
|
|
# These definitions are used by the "subdirs_do" target to pass
|
208 |
|
|
# the compile flags down recursively.
|
209 |
|
|
FLAGS_TO_PASS = \
|
210 |
|
|
"CC=$(CC)" \
|
211 |
|
|
"CFLAGS=$(XCFLAGS)" \
|
212 |
|
|
"CFLAGS_INT=$(CFLAGS_INT)" \
|
213 |
|
|
"HDEFS=$(HDEFS)" \
|
214 |
|
|
"INSTALL=$(INSTALL)" \
|
215 |
|
|
"INSTALL_DATA=$(INSTALL_DATA)" \
|
216 |
|
|
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
|
217 |
|
|
"LDFLAGS=$(LDFLAGS)" \
|
218 |
|
|
"RUNTEST=$(RUNTEST)" \
|
219 |
|
|
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
|
220 |
|
|
"SHLIB_CFLAGS=$(@EXP_SHLIB_CFLAGS@)" \
|
221 |
|
|
"prefix=$(prefix)" \
|
222 |
|
|
"exec_prefix=$(exec_prefix)"
|
223 |
|
|
|
224 |
|
|
#
|
225 |
|
|
# Following defines are for DejaGnu
|
226 |
|
|
#
|
227 |
|
|
|
228 |
|
|
# These let the DejaGnu test suite run when DejaGnu isn't
|
229 |
|
|
# installed yet, so run it from the srcdir and objdir.
|
230 |
|
|
EXPECT = ` \
|
231 |
|
|
if [ -f $${rootme}/expect$(EXEEXT) ] ; then \
|
232 |
|
|
echo $${rootme}/expect$(EXEEXT) ; \
|
233 |
|
|
else echo expect ; fi`
|
234 |
|
|
|
235 |
|
|
RUNTESTFLAGS =
|
236 |
|
|
RUNTEST = ` \
|
237 |
|
|
if [ -f ${srcdir}/../dejagnu/runtest$(EXEEXT) ] ; then \
|
238 |
|
|
echo ${srcdir}/../dejagnu/runtest$(EXEEXT) ; \
|
239 |
|
|
else echo runtest ; fi`
|
240 |
|
|
|
241 |
|
|
PTY_TYPE = @PTY_TYPE@
|
242 |
|
|
PTY = pty_$(PTY_TYPE)
|
243 |
|
|
CFILES = exp_command.c expect.c $(PTY).c \
|
244 |
|
|
exp_inter.c exp_regexp.c exp_tty.c \
|
245 |
|
|
exp_log.c exp_main_sub.c exp_pty.c \
|
246 |
|
|
exp_printify.c exp_trap.c exp_strf.c \
|
247 |
|
|
exp_console.c exp_glob.c exp_win.c Dbg.c exp_clib.c \
|
248 |
|
|
exp_closetcl.c exp_memmove.c exp_tty_comm.c \
|
249 |
|
|
exp_$(EVENT_TYPE).c exp_$(EVENT_ABLE).c
|
250 |
|
|
OFILES = exp_command.o expect.o $(PTY).o exp_inter.o exp_regexp.o exp_tty.o \
|
251 |
|
|
exp_log.o exp_main_sub.o exp_pty.o exp_printify.o exp_trap.o \
|
252 |
|
|
exp_console.o exp_strf.o exp_glob.o exp_win.o Dbg.o exp_clib.o \
|
253 |
|
|
exp_closetcl.o exp_memmove.o exp_tty_comm.o \
|
254 |
|
|
exp_$(EVENT_TYPE).o exp_$(EVENT_ABLE).o
|
255 |
|
|
SHARED_OFILES = shared/exp_command.o shared/expect.o shared/$(PTY).o \
|
256 |
|
|
shared/exp_inter.o shared/exp_regexp.o shared/exp_tty.o \
|
257 |
|
|
shared/exp_log.o shared/exp_main_sub.o shared/exp_pty.o \
|
258 |
|
|
shared/exp_printify.o shared/exp_trap.o \
|
259 |
|
|
shared/exp_console.o shared/exp_strf.o shared/exp_glob.o \
|
260 |
|
|
shared/exp_win.o shared/Dbg.o shared/exp_clib.o \
|
261 |
|
|
shared/exp_closetcl.o shared/exp_memmove.o shared/exp_tty_comm.o \
|
262 |
|
|
shared/exp_$(EVENT_TYPE).o shared/exp_$(EVENT_ABLE).o
|
263 |
|
|
|
264 |
|
|
# Expect libraries (both .a and shared)
|
265 |
|
|
EXP_LIB_FILES = @EXP_LIB_FILES@
|
266 |
|
|
# default Expect library (shared if possible, otherwise static)
|
267 |
|
|
EXP_LIB_FILE = @EXP_LIB_FILE@
|
268 |
|
|
# Expect object library (.a)
|
269 |
|
|
EXP_UNSHARED_LIB_FILE = @EXP_UNSHARED_LIB_FILE@
|
270 |
|
|
# Expect object library (shared, if possible)
|
271 |
|
|
EXP_SHARED_LIB_FILE = @EXP_SHARED_LIB_FILE@
|
272 |
|
|
|
273 |
|
|
# expect must be setuid on crays in order to open ptys (and accordingly,
|
274 |
|
|
# you must run this Makefile as root).
|
275 |
|
|
# See the FAQ for more info on why this is necessary on Crays.
|
276 |
|
|
SETUID = @SETUID@
|
277 |
|
|
# SETUID = chmod u+s
|
278 |
|
|
|
279 |
|
|
# allow us to handle null list gracefully, "end_of_list" should not exist
|
280 |
|
|
SCRIPT_LIST = $(SCRIPTS) end_of_list
|
281 |
|
|
SCRIPT_MANPAGE_LIST = $(SCRIPTS_MANPAGES) end_of_list
|
282 |
|
|
|
283 |
|
|
# flags to pass only to the C compiler (not to ld)
|
284 |
|
|
# because STTY can include whitespace and quotes, pass STTY separately
|
285 |
|
|
CPPFLAGS = -I. -I$(srcdir) $(TCLHDIRDASHI) $(TKHDIRDASHI) $(X11_CFLAGS) \
|
286 |
|
|
-DEXP_VERSION=\"$(VERSION)\" \
|
287 |
|
|
-DSCRIPTDIR=\"$(SCRIPTDIR)\" \
|
288 |
|
|
-DEXECSCRIPTDIR=\"$(EXECSCRIPTDIR)\" \
|
289 |
|
|
-DTCL_DEBUGGER
|
290 |
|
|
|
291 |
|
|
# Flags to pass to cc (i.e. add to the end of the CLDFLAGS line below).
|
292 |
|
|
# Note that setting one will not set others automatically. Set all that
|
293 |
|
|
# are relevant.
|
294 |
|
|
#
|
295 |
|
|
# NOTE THAT THESE FLAGS ARE NO LONGER SUPPORTED. THE FUNCTIONALLY IS REPLACED
|
296 |
|
|
# BY THE AUTOMATIC CONFIGURATION CODE. ONLY MESS WITH THE FOLLOWING DEFS IF
|
297 |
|
|
# YOU ARE POSITIVE THE AUTO CONFIG CODE IS FAILING.
|
298 |
|
|
#
|
299 |
|
|
# -DSYSV3 if you are running SVR3 or later.
|
300 |
|
|
# -DSYSV4 if you are running SVR4. This option does not preclude -DSYSV3.
|
301 |
|
|
# -DAUX2 if you are running Mac A/UX 2.
|
302 |
|
|
# -DMIPS_BSD if you are on a Mips machine using the BSD universe.
|
303 |
|
|
# -D_BSD_SIGNALS if you are on a Silicon Graphics AND want BSD semantics when
|
304 |
|
|
# using the expect library. Otherwise, you are better off just sticking
|
305 |
|
|
# with rearming signals.
|
306 |
|
|
|
307 |
|
|
# Flags to pass to ld
|
308 |
|
|
# You may need to add additional ones to the end of the LIBS line below:
|
309 |
|
|
# -lc -lBSD If you are using the BSD compatibility library on an HP/UX,
|
310 |
|
|
# force libc.a to be loaded first.
|
311 |
|
|
# -lsocket For SCO UNIX 3.2.2 (this should now be done automatically)
|
312 |
|
|
# -lX11 For Pyramid OSx, poll is broken, so use select from X lib
|
313 |
|
|
# /usr/ucblib/libucb.a is needed for solaris 2.0 after -lm
|
314 |
|
|
EXP_AND_TCL_LIBS = $(LDFLAGS) @EXP_AND_TCL_LIBS@
|
315 |
|
|
EXP_AND_TK_LIBS = $(LDFLAGS) @EXP_AND_TK_LIBS@
|
316 |
|
|
|
317 |
|
|
CFLAGS_INT = $(MH_CFLAGS) $(CPPFLAGS) $(XCFLAGS)
|
318 |
|
|
|
319 |
|
|
LIB_INSTALL_DIR = $(tcl_libdir)
|
320 |
|
|
LIB_RUNTIME_DIR = $(tcl_libdir)
|
321 |
|
|
# I don't understand why Tcl splits these up, but it does. LIB_RUNTIME_DIR
|
322 |
|
|
# can appear as part of the LD_SEARCH_FLAGS inherited by configure.
|
323 |
|
|
|
324 |
|
|
.c.o:
|
325 |
|
|
$(CC) -c $(CFLAGS_INT) $(STTY) $(HDEFS) $<
|
326 |
|
|
if [ "@EXP_SHLIB_CFLAGS@" != "x" ] ; then \
|
327 |
|
|
if [ ! -d shared ] ; then \
|
328 |
|
|
mkdir shared ; \
|
329 |
|
|
else true; fi ; \
|
330 |
|
|
$(CC) -c $(CFLAGS_INT) @EXP_SHLIB_CFLAGS@ $(STTY) $(HDEFS) $< -o shared/$@ ; \
|
331 |
|
|
fi
|
332 |
|
|
|
333 |
|
|
|
334 |
|
|
all: expect$(EXEEXT) $(EXP_LIB_FILES) ${X11_PROGS}
|
335 |
|
|
@$(MAKE) subdir_do DO=$@ $(FLAGS_TO_PASS)
|
336 |
|
|
|
337 |
|
|
info:
|
338 |
|
|
dvi:
|
339 |
|
|
|
340 |
|
|
# CYGNUS LOCAL aoliva
|
341 |
|
|
LOCAL_EXPECT=$(SHELL) ./expect-bld.sh
|
342 |
|
|
all: expect-bld.sh
|
343 |
|
|
# Run expect within the build tree
|
344 |
|
|
expect-bld.sh: Makefile
|
345 |
|
|
-rm -f $@ $@T
|
346 |
|
|
echo "#! $(SHELL)" > $@T
|
347 |
|
|
r=`pwd`; for var in LD_LIBRARY_PATH SHLIB_PATH ; do \
|
348 |
|
|
echo "$$var=$$r:$$r/../tk/unix:$$r/../tcl/unix\$${$$var+:\$$$$var}; export $$var" >> $@T ; \
|
349 |
|
|
done; echo "exec $$r/expect \$${1+\"\$$@\"}" >> $@T
|
350 |
|
|
chmod +x $@T
|
351 |
|
|
mv $@T $@
|
352 |
|
|
# END CYGNUS LOCAL
|
353 |
|
|
|
354 |
|
|
# build expect binary that does not depend on Expect's shared libs
|
355 |
|
|
expect$(EXEEXT): exp_main_exp.o $(EXP_UNSHARED_LIB_FILE)
|
356 |
|
|
$(CC) $(XCFLAGS) @TCL_LD_FLAGS@ -o expect$(EXEEXT) exp_main_exp.o @EXP_BUILD_LIB_SPEC@ $(TCLLIB) $(EXP_AND_TCL_LIBS)
|
357 |
|
|
$(SETUID) expect$(EXEEXT)
|
358 |
|
|
|
359 |
|
|
expecti$(EXEEXT): exp_main_exp.c $(EXP_UNSHARED_LIB_FILE)
|
360 |
|
|
$(CC) $(CFLAGS_INT) $(STTY) $(HDEFS) $(ITCLHDIR) $(XCFLAGS) @TCL_LD_FLAGS@ -o expecti$(EXEEXT) -DUSE_ITCL $(srcdir)/exp_main_exp.c @EXP_BUILD_LIB_SPEC@ $(TCLLIB) $(ITCLLIB) $(EXP_AND_TCL_LIBS)
|
361 |
|
|
|
362 |
|
|
# install Expect library
|
363 |
|
|
# This is done before the install target because the libraries have to be
|
364 |
|
|
# in place before the installed expect is built. Actually, only the shared
|
365 |
|
|
# lib has to be handled this way, but do both here for consistency.
|
366 |
|
|
# Can't seem to embed shell comments in backslashed lines, so comments here:
|
367 |
|
|
# - To allow bare "load" commands, install shared libs in tcl_libdir rather
|
368 |
|
|
# than Expect's lib-specific directory (libdir).
|
369 |
|
|
# - install hand-generated pkgIndex.tcl file.
|
370 |
|
|
# Local copy is pkgIndex rather than pkgIndex.tcl because pkgIndex.tcl.in
|
371 |
|
|
# is too long for some filesystems, sigh.
|
372 |
|
|
install_shared_lib: $(EXP_LIB_FILES)
|
373 |
|
|
${srcdir}/mkinstalldirs $(libdir)
|
374 |
|
|
if [ -s $(EXP_UNSHARED_LIB_FILE) ] ; then \
|
375 |
|
|
$(INSTALL_DATA) $(EXP_UNSHARED_LIB_FILE) $(libdir)/$(EXP_UNSHARED_LIB_FILE) ; \
|
376 |
|
|
$(UNSHARED_RANLIB) $(libdir)/$(EXP_UNSHARED_LIB_FILE) ; \
|
377 |
|
|
$(INSTALL_DATA) $(EXP_UNSHARED_LIB_FILE) $(tcl_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \
|
378 |
|
|
$(UNSHARED_RANLIB) $(tcl_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \
|
379 |
|
|
else true; fi
|
380 |
|
|
if [ -s $(EXP_SHARED_LIB_FILE) ] ; then \
|
381 |
|
|
$(INSTALL_PROGRAM) $(EXP_SHARED_LIB_FILE) $(tcl_libdir)/$(EXP_SHARED_LIB_FILE) ; \
|
382 |
|
|
$(INSTALL_PROGRAM) pkgIndex $(libdir)/pkgIndex.tcl ; \
|
383 |
|
|
else true; fi
|
384 |
|
|
|
385 |
|
|
expect_installed$(EXEEXT): exp_main_exp.o $(EXP_LIB_FILE) install_shared_lib
|
386 |
|
|
$(CC) $(XCFLAGS) @EXP_SHLIB_CFLAGS@ @TCL_LD_FLAGS@ -o expect_installed$(EXEEXT) exp_main_exp.o @EXP_LIB_SPEC@ $(TCLLIB_INSTALLED) $(EXP_AND_TCL_LIBS)
|
387 |
|
|
$(SETUID) expect_installed$(EXEEXT)
|
388 |
|
|
|
389 |
|
|
# Build Expect with TestCenter
|
390 |
|
|
expect.tc$(EXEEXT): exp_main_exp.o $(OFILES)
|
391 |
|
|
proof $(CC) $(XCFLAGS) @EXP_SHLIB_CFLAGS@ @TCL_LD_FLAGS@ -o expect.tc$(EXEEXT) $(OFILES) exp_main_exp.o $(TCLLIB) $(EXP_AND_TCL_LIBS)
|
392 |
|
|
$(SETUID) expect.tc$(EXEEXT)
|
393 |
|
|
|
394 |
|
|
# Build an executable with both Expect and Tk.
|
395 |
|
|
# Yes, I know that the link line can have libraries repeated. This is a
|
396 |
|
|
# consequence of Tcl's configure combining the Tcl and X dependent libs
|
397 |
|
|
# together. I could fix it by testing all the libraries (again, in Expect's
|
398 |
|
|
# configure) separately for Expectk, but as far as I know, it doesn't hurt
|
399 |
|
|
# anything here, so I'm not worrying about it.
|
400 |
|
|
expectk$(EXEEXT): exp_main_tk.o $(EXP_UNSHARED_LIB_FILE)
|
401 |
|
|
$(CC) $(XCFLAGS) @TCL_LD_FLAGS@ -o expectk$(EXEEXT) exp_main_tk.o @EXP_UNSHARED_LIB_SPEC@ $(TKLIB) $(TCLLIB) $(X11_LD_FLAGS) $(EXP_AND_TK_LIBS)
|
402 |
|
|
$(SETUID) expectk$(EXEEXT)
|
403 |
|
|
|
404 |
|
|
expectk_installed$(EXEEXT): exp_main_tk.o $(EXP_LIB_FILE)
|
405 |
|
|
$(CC) $(XCFLAGS) @EXP_SHLIB_CFLAGS@ @TCL_LD_FLAGS@ -o expectk_installed$(EXEEXT) exp_main_tk.o @EXP_LIB_SPEC@ $(TKLIB_INSTALLED) $(TCLLIB_INSTALLED) $(X11_LD_FLAGS) $(EXP_AND_TK_LIBS)
|
406 |
|
|
$(SETUID) expectk_installed$(EXEEXT)
|
407 |
|
|
|
408 |
|
|
# Build Expectk with TestCenter
|
409 |
|
|
expectk.tc$(EXEEXT): exp_main_tk.o $(OFILES)
|
410 |
|
|
proof $(CC) $(XCFLAGS) @TCL_LD_FLAGS@ -o expectk.tc$(EXEEXT) $(OFILES) exp_main_tk.o $(TKLIB) $(TCLLIB) $(X11_LD_FLAGS) $(EXP_AND_TK_LIBS)
|
411 |
|
|
$(SETUID) expectk.tc$(EXEEXT)
|
412 |
|
|
|
413 |
|
|
$(EXP_UNSHARED_LIB_FILE): $(OFILES)
|
414 |
|
|
-rm -f $(EXP_UNSHARED_LIB_FILE)
|
415 |
|
|
$(AR) $(ARFLAGS) $(EXP_UNSHARED_LIB_FILE) $(OFILES)
|
416 |
|
|
-$(RANLIB) $(EXP_UNSHARED_LIB_FILE)
|
417 |
|
|
|
418 |
|
|
# the dependency should really be SHARED_OFILES rather than OFILES
|
419 |
|
|
# but there's no way to write a rule that says shared/XYZ.o should
|
420 |
|
|
# depend on XYZ.c in a different directory (except by writing the
|
421 |
|
|
# rule out for each file, sigh).
|
422 |
|
|
$(EXP_SHARED_LIB_FILE): $(OFILES)
|
423 |
|
|
-rm -f $(EXP_SHARED_LIB_FILE)
|
424 |
|
|
@TCL_SHLIB_LD@ -o $(EXP_SHARED_LIB_FILE) $(SHARED_OFILES) @EXP_LD_SEARCH_FLAGS@ @EXP_SHLIB_LD_LIBS@
|
425 |
|
|
|
426 |
|
|
.PHONY: install-info install info
|
427 |
|
|
install-info:
|
428 |
|
|
|
429 |
|
|
# CYGNUS LOCAL: minimal/angela
|
430 |
|
|
install-minimal: expect$(EXEEXT) pkgIndex
|
431 |
|
|
${srcdir}/mkinstalldirs $(man1dir) $(bindir)
|
432 |
|
|
# install Expect
|
433 |
|
|
$(INSTALL_PROGRAM) expect$(EXEEXT) $(bindir)/expect$(EXEEXT)
|
434 |
|
|
# install Expect man page
|
435 |
|
|
$(INSTALL_DATA) $(srcdir)/expect.man $(man1dir)/expect.1
|
436 |
|
|
# END CYGNUS LOCAL
|
437 |
|
|
|
438 |
|
|
install: expect$(EXEEXT) expect_installed$(EXEEXT) ${X11_PROGS_INSTALLED} pkgIndex install_shared_lib
|
439 |
|
|
${srcdir}/mkinstalldirs $(man1dir) $(man3dir) $(bindir) $(libdir) $(includedir)
|
440 |
|
|
# install Expect
|
441 |
|
|
$(INSTALL_PROGRAM) expect_installed$(EXEEXT) $(bindir)/expect$(EXEEXT)
|
442 |
|
|
# install Expectk (and man page) if present
|
443 |
|
|
-if [ -s expectk_installed$(EXEEXT) ] ; then \
|
444 |
|
|
$(INSTALL_PROGRAM) expectk_installed$(EXEEXT) $(bindir)/expectk$(EXEEXT) ; \
|
445 |
|
|
$(INSTALL_DATA) $(srcdir)/expectk.man $(man1dir)/expectk.1 ; \
|
446 |
|
|
else true; fi
|
447 |
|
|
# install Expect man page
|
448 |
|
|
$(INSTALL_DATA) $(srcdir)/expect.man $(man1dir)/expect.1
|
449 |
|
|
# install man page for Expect and Expectk libraries
|
450 |
|
|
$(INSTALL_DATA) $(srcdir)/libexpect.man $(man3dir)/libexpect.3
|
451 |
|
|
# install Expect's public include files
|
452 |
|
|
# $(INSTALL_DATA) expect_cf.h $(includedir)
|
453 |
|
|
$(INSTALL_DATA) $(srcdir)/expect.h $(includedir)
|
454 |
|
|
$(INSTALL_DATA) $(srcdir)/expect_tcl.h $(includedir)
|
455 |
|
|
$(INSTALL_DATA) $(srcdir)/expect_comm.h $(includedir)
|
456 |
|
|
# force installation of Tcl's private regexp definition - we simply have to
|
457 |
|
|
# make it public in order for people to use Expect's C lib.
|
458 |
|
|
$(INSTALL_DATA) $(TCLHDIR)/tclRegexp.h $(includedir)
|
459 |
|
|
# install Debugger's public include file (just in case it's not there)
|
460 |
|
|
$(INSTALL_DATA) $(srcdir)/Dbg.h $(includedir)
|
461 |
|
|
|
462 |
|
|
install-scripts: $(SCRIPTS)
|
463 |
|
|
# some people don't install Tcl, sigh
|
464 |
|
|
TCL_LIBRARY=$(TCL_LIBRARY) ; \
|
465 |
|
|
export TCL_LIBRARY ; \
|
466 |
|
|
if $(LOCAL_EXPECT) $(srcdir)/fixcat ; then \
|
467 |
|
|
$(INSTALL_DATA) $(srcdir)/fixcat $(EXECSCRIPTDIR)/cat-buffers ; \
|
468 |
|
|
else true; fi
|
469 |
|
|
# install standalone scripts and their man pages, if requested
|
470 |
|
|
${srcdir}/mkinstalldirs $(bindir_arch_indep) $(man1dir) $(SCRIPTDIR) $(EXECSCRIPTDIR)
|
471 |
|
|
-for i in $(SCRIPT_LIST) ; do \
|
472 |
|
|
if [ -f $$i ] ; then \
|
473 |
|
|
$(INSTALL_PROGRAM) $$i $(bindir_arch_indep)/$$i ; \
|
474 |
|
|
rm -f $$i ; \
|
475 |
|
|
else true; fi ; \
|
476 |
|
|
done
|
477 |
|
|
-for i in $(SCRIPT_MANPAGE_LIST) ; do \
|
478 |
|
|
if [ -f $(srcdir)/example/$$i.man ] ; then \
|
479 |
|
|
$(INSTALL_DATA) $(srcdir)/example/$$i.man $(man1dir)/$$i.1 ; \
|
480 |
|
|
else true; fi ; \
|
481 |
|
|
done
|
482 |
|
|
$(INSTALL_DATA) pkgIndex.tcl $(SCRIPTDIR)
|
483 |
|
|
|
484 |
|
|
$(SCRIPT_LIST):
|
485 |
|
|
TCL_LIBRARY=$(TCL_LIBRARY) ; \
|
486 |
|
|
export TCL_LIBRARY ; \
|
487 |
|
|
$(LOCAL_EXPECT) $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@
|
488 |
|
|
|
489 |
|
|
# Delete all the installed files that the `install' target creates
|
490 |
|
|
# (but not the noninstalled files such as `make all' creates)
|
491 |
|
|
uninstall:
|
492 |
|
|
-rm -f $(bindir)/expectk \
|
493 |
|
|
$(man1dir)/expect.1 \
|
494 |
|
|
$(man1dir)/expectk.1 \
|
495 |
|
|
$(libdir)/$(EXP_SHARED_LIB_FILE) \
|
496 |
|
|
$(tcl_libdir)/$(EXP_SHARED_LIB_FILE) \
|
497 |
|
|
$(libdir)/$(EXP_UNSHARED_LIB_FILE) \
|
498 |
|
|
$(tcl_libdir)/$(EXP_UNSHARED_LIB_FILE) \
|
499 |
|
|
$(man3dir)/libexpect.3 \
|
500 |
|
|
$(includedir)/expect_cf.h \
|
501 |
|
|
$(includedir)/expect.h \
|
502 |
|
|
$(includedir)/expect_tcl.h \
|
503 |
|
|
$(includedir)/expect_comm.h \
|
504 |
|
|
$(EXECSCRIPTDIR)/cat-buffers
|
505 |
|
|
# debugger is not removed, since other things could depend on it
|
506 |
|
|
# remove standalone scripts and man pages
|
507 |
|
|
-for i in $(SCRIPT_LIST) ; do \
|
508 |
|
|
rm -f $(bindir_arch_indep)/$$i ; \
|
509 |
|
|
done
|
510 |
|
|
-for i in $(SCRIPT_MANPAGE_LIST) ; do \
|
511 |
|
|
rm -f $(man1dir)/$$i.1 ; \
|
512 |
|
|
done
|
513 |
|
|
|
514 |
|
|
###################################
|
515 |
|
|
# Targets for Makefile and configure
|
516 |
|
|
###################################
|
517 |
|
|
|
518 |
|
|
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) config.status
|
519 |
|
|
@echo "Rebuilding the Makefile..."
|
520 |
|
|
$(SHELL) ./config.status
|
521 |
|
|
|
522 |
|
|
# CYGNUS LOCAL: Don't have dependancies, cause people get upset
|
523 |
|
|
# when autoconf gets run automatically.
|
524 |
|
|
#configure: $(srcdir)/configure.in $(srcdir)/Makefile.in \
|
525 |
|
|
# $(srcdir)/expect_cf.h.in $(srcdir)/aclocal.m4
|
526 |
|
|
# Let "make -f Makefile.in" produce a configure file
|
527 |
|
|
configure:
|
528 |
|
|
@echo "Rebuilding configure..."
|
529 |
|
|
if [ x"${srcdir}" = x"@srcdir@" ] ; then \
|
530 |
|
|
srcdir=. ; export srcdir ; \
|
531 |
|
|
else true ; fi ; \
|
532 |
|
|
(cd $${srcdir}; autoconf)
|
533 |
|
|
|
534 |
|
|
config.status: $(srcdir)/configure
|
535 |
|
|
@echo "Rebuilding config.status..."
|
536 |
|
|
$(SHELL) ./config.status --recheck
|
537 |
|
|
|
538 |
|
|
check:
|
539 |
|
|
@if [ -f testsuite/Makefile ]; then \
|
540 |
|
|
cd testsuite && $(MAKE) $(FLAGS_TO_PASS) check; \
|
541 |
|
|
else true; fi
|
542 |
|
|
|
543 |
|
|
# Original Dbgconfig.in comes from the NIST Tcl debugger distribution.
|
544 |
|
|
# CYGNUS LOCAL: Don't have dependancies, cause people get upset
|
545 |
|
|
# when autoconf gets run automatically.
|
546 |
|
|
#Dbgconfigure: $(srcdir)/Dbgconfig.in $(srcdir)/Makefile.in \
|
547 |
|
|
# $(srcdir)/Dbg_cf.h.in $(srcdir)/aclocal.m4
|
548 |
|
|
Dbgconfigure:
|
549 |
|
|
@echo "Rebuilding Dbgconfigure..."
|
550 |
|
|
@if [ x"${srcdir}" = x"@srcdir@" ] ; then \
|
551 |
|
|
srcdir=. ; export srcdir ; \
|
552 |
|
|
else true ; fi ; \
|
553 |
|
|
(cd $${srcdir}; rm -fr Dbgconfigure ; \
|
554 |
|
|
autoconf Dbgconfig.in > Dbgconfigure ; \
|
555 |
|
|
chmod a+x Dbgconfigure)
|
556 |
|
|
|
557 |
|
|
################################################
|
558 |
|
|
# Various "clean" targets follow GNU conventions
|
559 |
|
|
################################################
|
560 |
|
|
|
561 |
|
|
# delete all files from current directory that are created by "make"
|
562 |
|
|
clean:
|
563 |
|
|
-rm -rf *~ *.o shared core \
|
564 |
|
|
expect$(EXEEXT) expect_installed$(EXEEXT) \
|
565 |
|
|
expecti$(EXEEXT) expecti_installed$(EXEEXT) \
|
566 |
|
|
expectk$(EXEEXT) expectk_installed$(EXEEXT) \
|
567 |
|
|
dumb exho devtty \
|
568 |
|
|
$(EXP_UNSHARED_LIB_FILE) $(EXP_SHARED_LIB_FILE) \
|
569 |
|
|
$(SCRIPT_LIST)
|
570 |
|
|
@$(MAKE) subdir_do DO=$@ $(FLAGS_TO_PASS)
|
571 |
|
|
|
572 |
|
|
# like "clean", but also delete files created by "configure"
|
573 |
|
|
distclean: clean
|
574 |
|
|
@$(MAKE) subdir_do DO=$@ $(FLAGS_TO_PASS)
|
575 |
|
|
-rm -f Makefile config.status config.cache config.log expect_cf.h
|
576 |
|
|
-rm -f Dbg_cf.h
|
577 |
|
|
|
578 |
|
|
# like "clean", but doesn't delete test utilities or massaged scripts
|
579 |
|
|
# because most people don't have to worry about them
|
580 |
|
|
mostlyclean:
|
581 |
|
|
-rm -f *~ *.o shared core \
|
582 |
|
|
expect$(EXEEXT) expect_installed$(EXEEXT) \
|
583 |
|
|
expecti$(EXEEXT) expecti_installed$(EXEEXT) \
|
584 |
|
|
expectk$(EXEEXT) expectk_installed$(EXEEXT) \
|
585 |
|
|
$(EXP_UNSHARED_LIB_FILE) $(EXP_SHARED_LIB_FILE)
|
586 |
|
|
@$(MAKE) subdir_do DO=$@ $(FLAGS_TO_PASS)
|
587 |
|
|
|
588 |
|
|
# delete everything from current directory that can be reconstructed
|
589 |
|
|
# except for configure
|
590 |
|
|
realclean: distclean
|
591 |
|
|
|
592 |
|
|
##################################
|
593 |
|
|
# Targets for development at NIST
|
594 |
|
|
##################################
|
595 |
|
|
|
596 |
|
|
# the unsets allow calling this via Makefile.in
|
597 |
|
|
|
598 |
|
|
nist:
|
599 |
|
|
unset CC ; \
|
600 |
|
|
configure --verbose --prefix=/depot/tcl --exec-prefix=/depot/tcl/arch
|
601 |
|
|
|
602 |
|
|
epg:
|
603 |
|
|
unset CC ; \
|
604 |
|
|
echo configure --verbose --prefix=/home/libes --exec-prefix=/home/libes/arch
|
605 |
|
|
|
606 |
|
|
mink:
|
607 |
|
|
unset CC ; \
|
608 |
|
|
configure --verbose --prefix=/usr/tmp --exec-prefix=/usr/tmp/arch
|
609 |
|
|
|
610 |
|
|
cam:
|
611 |
|
|
unset CC ; \
|
612 |
|
|
configure --verbose --prefix=/tmp_mnt/home/fs1a/libes \
|
613 |
|
|
--exec-prefix=/tmp_mnt/home/fs1a/libes/arch
|
614 |
|
|
|
615 |
|
|
granta:
|
616 |
|
|
unset CC ; \
|
617 |
|
|
configure --verbose --prefix=/home/nist/libes/cray --exec-prefix=/home/nist/libes/cray/arch
|
618 |
|
|
|
619 |
|
|
|
620 |
|
|
hudson:
|
621 |
|
|
unset CC ; \
|
622 |
|
|
configure --verbose --prefix=/granta/home/nist/libes/ibm --exec-prefix=/granta /home/nist/libes/ibm/arch
|
623 |
|
|
|
624 |
|
|
# report globals that shouldn't be public but are
|
625 |
|
|
bad_globals:
|
626 |
|
|
nm $(EXP_UNSHARED_LIB_FILE) | egrep -v " [a-zU] | _exp| _Exp| _Dbg"
|
627 |
|
|
|
628 |
|
|
LINTFLAGS = -h -q -x
|
629 |
|
|
|
630 |
|
|
lint:
|
631 |
|
|
lint $(LINTFLAGS) $(CPPFLAGS) $(STTY) $(CFILES) exp_main_exp.c $(TCLLINTLIB) | tee expect.lint
|
632 |
|
|
|
633 |
|
|
# after copying source directory, reestablish all links
|
634 |
|
|
symlink:
|
635 |
|
|
rm -rf Dbg* e ek testsuite/aclocal.m4
|
636 |
|
|
ln -s ../tcl-debug/configure.in Dbgconfig.in
|
637 |
|
|
ln -s ../tcl-debug/Makefile.in DbgMkfl.in
|
638 |
|
|
ln -s ../tcl-debug/Dbg_cf.h.in
|
639 |
|
|
ln -s ../tcl-debug/Dbg.h
|
640 |
|
|
ln -s ../tcl-debug/Dbg.c
|
641 |
|
|
ln -s ../aclocal.m4 testsuite
|
642 |
|
|
|
643 |
|
|
#########################################
|
644 |
|
|
# Targets for building with CodeCenter
|
645 |
|
|
#########################################
|
646 |
|
|
|
647 |
|
|
GCCROOT = /depot/gnu/arch/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3
|
648 |
|
|
GCCLIB = $(GCCROOT)/libgcc.a
|
649 |
|
|
GCCINC = -I$(GCCROOT)/include
|
650 |
|
|
# following only on Sparcs
|
651 |
|
|
SABERDEFINE = -D__sparc__
|
652 |
|
|
|
653 |
|
|
# Following target builds expect under CodeCenter.
|
654 |
|
|
# If using ObjectCenter, before loading, type: setopt primary_language C
|
655 |
|
|
exp: $(CFILES) exp_main_exp.c
|
656 |
|
|
#load $(CPPFLAGS) $(STTY) $(CFILES) exp_main_exp.c $(TCLLIB) $(GCCLIB) $(EXP_AND_TCL_LIBS)
|
657 |
|
|
|
658 |
|
|
# Following target builds expectk under CodeCenter. Notes:
|
659 |
|
|
# Because of explicit #includes of in tk.h, you need to create
|
660 |
|
|
# a symlink from your X11 include directory to this directory
|
661 |
|
|
tk: $(CFILES) exp_main_tk.c
|
662 |
|
|
#load $(CPPFLAGS) $(STTY) $(CFILES) exp_main_tk.c $(TKLIB) $(TCLLIB) $(EXP_AND_TK_LIBS)
|
663 |
|
|
|
664 |
|
|
# Follow definitions are for building expect and expectk under ObjectCenter
|
665 |
|
|
oexp: $(CFILES) exp_main_exp.c
|
666 |
|
|
#load $(CPPFLAGS) $(STTY) -C $(CFILES) exp_main_exp.c $(TCLLIB)
|
667 |
|
|
|
668 |
|
|
otk: $(CFILES) exp_main_tk.c
|
669 |
|
|
#load $(CPPFLAGS) $(STTY) -C $(CFILES) exp_main_tk.c $(TKLIB) $(TCLLIB) $(EXP_AND_TK_LIBS)
|
670 |
|
|
######################################
|
671 |
|
|
# Targets for pushing out releases
|
672 |
|
|
######################################
|
673 |
|
|
|
674 |
|
|
# until we are completely switched over, keep updating old ftp site too
|
675 |
|
|
OLDFTPDIR = /proj/elib/online/pub/expect
|
676 |
|
|
FTPDIR = /proj/itl/www/div826/subject/expect
|
677 |
|
|
|
678 |
|
|
# make a private tar file for myself
|
679 |
|
|
tar: expect-$(VERSION).tar
|
680 |
|
|
mv expect-$(VERSION).tar expect.tar
|
681 |
|
|
|
682 |
|
|
# make a release and install it on ftp server
|
683 |
|
|
ftp: expect-$(VERSION).tar.Z expect-$(VERSION).tar.gz
|
684 |
|
|
cp expect-$(VERSION).tar.Z $(FTPDIR)/expect.tar.Z
|
685 |
|
|
cp expect-$(VERSION).tar.gz $(FTPDIR)/expect.tar.gz
|
686 |
|
|
cp HISTORY $(FTPDIR)
|
687 |
|
|
cp README $(FTPDIR)/README.distribution
|
688 |
|
|
cp example/README $(FTPDIR)/example
|
689 |
|
|
cp `pubfile example` $(FTPDIR)/example
|
690 |
|
|
rm expect-$(SHORT_VERSION).tar*
|
691 |
|
|
ls -l $(FTPDIR)/expect.tar*
|
692 |
|
|
# update old ftp site too
|
693 |
|
|
cp expect-$(VERSION).tar.Z $(OLDFTPDIR)/expect.tar.Z
|
694 |
|
|
cp expect-$(VERSION).tar.gz $(OLDFTPDIR)/expect.tar.gz
|
695 |
|
|
cp HISTORY $(OLDFTPDIR)
|
696 |
|
|
cp README $(OLDFTPDIR)/README.distribution
|
697 |
|
|
cp example/README $(OLDFTPDIR)/example
|
698 |
|
|
cp `pubfile example` $(OLDFTPDIR)/example
|
699 |
|
|
# delete temp files
|
700 |
|
|
rm expect-$(VERSION).tar*
|
701 |
|
|
ls -l $(OLDFTPDIR)/expect.tar*
|
702 |
|
|
|
703 |
|
|
# make an alpha relase and install it on ftp server
|
704 |
|
|
alpha: expect-$(VERSION).tar.Z expect-$(VERSION).tar.gz
|
705 |
|
|
cp expect-$(VERSION).tar.Z $(FTPDIR)/alpha.tar.Z
|
706 |
|
|
cp expect-$(VERSION).tar.gz $(FTPDIR)/alpha.tar.gz
|
707 |
|
|
cp HISTORY $(FTPDIR)
|
708 |
|
|
rm expect-$(VERSION).tar*
|
709 |
|
|
ls -l $(FTPDIR)/alpha.tar*
|
710 |
|
|
|
711 |
|
|
# make a beta relase and install it on ftp server
|
712 |
|
|
beta: expect-$(VERSION).tar.Z expect-$(VERSION).tar.gz
|
713 |
|
|
rm -rf $(FTPDIR)/alpha.tar*
|
714 |
|
|
cp expect-$(VERSION).tar.Z $(FTPDIR)/beta.tar.Z
|
715 |
|
|
cp expect-$(VERSION).tar.gz $(FTPDIR)/beta.tar.gz
|
716 |
|
|
cp HISTORY $(FTPDIR)
|
717 |
|
|
rm expect-$(VERSION).tar*
|
718 |
|
|
ls -l $(FTPDIR)/beta.tar*
|
719 |
|
|
|
720 |
|
|
expect-$(VERSION).tar: configure
|
721 |
|
|
rm -f ../expect-$(VERSION)
|
722 |
|
|
ln -s `pwd` ../expect-$(VERSION)
|
723 |
|
|
rm -f ../pubfile
|
724 |
|
|
ln pubfile ..
|
725 |
|
|
cd ..;tar cvfh $@ `pubfile expect-$(VERSION)`
|
726 |
|
|
mv ../$@ .
|
727 |
|
|
|
728 |
|
|
expect-$(VERSION).tar.Z: expect-$(VERSION).tar
|
729 |
|
|
compress -fc expect-$(VERSION).tar > $@
|
730 |
|
|
|
731 |
|
|
expect-$(VERSION).tar.gz: expect-$(VERSION).tar
|
732 |
|
|
gzip -fc expect-$(VERSION).tar > $@
|
733 |
|
|
|
734 |
|
|
test: expect
|
735 |
|
|
rm -f .tmp
|
736 |
|
|
echo "set objdir" `pwd` > .tmp
|
737 |
|
|
if [ "$(srcdir)" = "." ] ; then \
|
738 |
|
|
echo "set srcdir" `pwd` >> .tmp ; \
|
739 |
|
|
else echo "set srcdir" $(srcdir) >> .tmp ; fi
|
740 |
|
|
echo "cd \$${srcdir}/tests" >> .tmp
|
741 |
|
|
echo "source all" >> .tmp
|
742 |
|
|
rootme=`pwd`; export rootme; \
|
743 |
|
|
srcdir=${srcdir} ; export srcdir ; \
|
744 |
|
|
if [ -f ./expect ] ; then \
|
745 |
|
|
TCL_LIBRARY=$(TCL_LIBRARY) ; \
|
746 |
|
|
export TCL_LIBRARY ; fi ; \
|
747 |
|
|
$(LOCAL_EXPECT) -f .tmp
|
748 |
|
|
rm -f .tmp
|
749 |
|
|
|
750 |
|
|
###########################
|
751 |
|
|
# Targets for producing FAQ and homepage
|
752 |
|
|
###########################
|
753 |
|
|
|
754 |
|
|
#WEBDIR = /proj/elib/online/pub/expect
|
755 |
|
|
WEBDIR = /proj/itl/www/div826/subject/expect
|
756 |
|
|
|
757 |
|
|
# create the FAQ in html form
|
758 |
|
|
FAQ.html: FAQ.src FAQ.tcl
|
759 |
|
|
FAQ.src html > FAQ.html
|
760 |
|
|
|
761 |
|
|
# create the FAQ in text form
|
762 |
|
|
FAQ: FAQ.src FAQ.tcl
|
763 |
|
|
FAQ.src text > FAQ
|
764 |
|
|
|
765 |
|
|
# generate Expect home page
|
766 |
|
|
homepage.html: homepage.src homepage.tcl
|
767 |
|
|
homepage.src > homepage.html
|
768 |
|
|
|
769 |
|
|
# install various html docs on our web server
|
770 |
|
|
install-html: FAQ.html homepage.html
|
771 |
|
|
cp homepage.html $(WEBDIR)/index.html
|
772 |
|
|
cp FAQ.html $(WEBDIR)
|
773 |
|
|
# cp FAQ.src $(WEBDIR)
|
774 |
|
|
# cp FAQ.tcl $(WEBDIR)
|
775 |
|
|
|
776 |
|
|
# add recursive support to the build process.
|
777 |
|
|
subdir_do: force
|
778 |
|
|
@for i in $(SUBDIRS); do \
|
779 |
|
|
echo "Making $(DO) in $${i}..." ; \
|
780 |
|
|
if [ -d ./$$i ] ; then \
|
781 |
|
|
if (rootme=`pwd`/ ; export rootme ; \
|
782 |
|
|
rootsrc=`cd $(srcdir); pwd`/ ; export rootsrc ; \
|
783 |
|
|
cd ./$$i; \
|
784 |
|
|
$(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \
|
785 |
|
|
else exit 1 ; fi ; \
|
786 |
|
|
else true ; fi ; \
|
787 |
|
|
done
|
788 |
|
|
force:
|
789 |
|
|
|
790 |
|
|
## dependencies will be put after this line... ##
|
791 |
|
|
Dbg.o: $(srcdir)/Dbg.c Dbg.h
|
792 |
|
|
exp_$(EVENT_ABLE).o: $(srcdir)/exp_$(EVENT_ABLE).c expect_cf.h expect.h \
|
793 |
|
|
exp_command.h exp_event.h
|
794 |
|
|
exp_$(EVENT_TYPE).o: $(srcdir)/exp_$(EVENT_TYPE).c expect_cf.h expect.h \
|
795 |
|
|
exp_command.h exp_event.h
|
796 |
|
|
exp_command.o: $(srcdir)/exp_command.c expect_cf.h exp_tty.h \
|
797 |
|
|
exp_rename.h expect.h exp_command.h \
|
798 |
|
|
exp_log.h exp_printify.h exp_event.h exp_pty.h
|
799 |
|
|
exp_inter.o: $(srcdir)/exp_inter.c expect_cf.h \
|
800 |
|
|
exp_tty_in.h exp_tty.h exp_rename.h expect.h exp_command.h \
|
801 |
|
|
exp_log.h exp_printify.h exp_regexp.h exp_tstamp.h
|
802 |
|
|
exp_log.o: $(srcdir)/exp_log.c expect_cf.h expect.h \
|
803 |
|
|
exp_rename.h exp_log.h exp_printify.h
|
804 |
|
|
exp_main_exp.o: $(srcdir)/exp_main_exp.c expect_cf.h \
|
805 |
|
|
expect.h exp_rename.h exp_command.h exp_log.h exp_printify.h
|
806 |
|
|
exp_main_sub.o: $(srcdir)/exp_main_sub.c expect_cf.h \
|
807 |
|
|
exp_rename.h \
|
808 |
|
|
expect.h exp_command.h exp_tty_in.h exp_tty.h exp_log.h \
|
809 |
|
|
exp_printify.h exp_event.h
|
810 |
|
|
#exp_main_tk.o: $(srcdir)/exp_main_tk.c expect_cf.h Dbg.h
|
811 |
|
|
|
812 |
|
|
exp_main_tk.o: $(srcdir)/exp_main_tk.c expect_cf.h Dbg.h
|
813 |
|
|
$(CC) -c @TK_DEFS@ $(CFLAGS_INT) $(HDEFS) $<
|
814 |
|
|
shared/exp_main_tk.o: $(srcdir)/exp_main_tk.c expect_cf.h Dbg.h
|
815 |
|
|
$(CC) -c @TK_DEFS@ $(CFLAGS_INT) $(HDEFS) $<
|
816 |
|
|
exp_noevent.o: $(srcdir)/exp_noevent.c expect_cf.h exp_prog.h exp_command.h \
|
817 |
|
|
exp_event.h
|
818 |
|
|
exp_poll.o: $(srcdir)/exp_poll.c expect_cf.h expect.h \
|
819 |
|
|
exp_command.h exp_event.h
|
820 |
|
|
$(CC) -c $(CFLAGS_INT) @TCL_DEFS@ $(HDEFS) $<
|
821 |
|
|
shared/exp_poll.o: $(srcdir)/exp_poll.c expect_cf.h expect.h \
|
822 |
|
|
exp_command.h exp_event.h
|
823 |
|
|
$(CC) -c $(CFLAGS_INT) @EXP_SHLIB_CFLAGS@ @TCL_DEFS@ $(HDEFS) $< -o shared/$@
|
824 |
|
|
exp_printify.o: $(srcdir)/exp_printify.c expect_cf.h
|
825 |
|
|
exp_pty.o: $(srcdir)/exp_pty.c expect_cf.h exp_rename.h exp_pty.h
|
826 |
|
|
exp_regexp.o: $(srcdir)/exp_regexp.c expect_cf.h \
|
827 |
|
|
expect.h exp_regexp.h
|
828 |
|
|
exp_select.o: $(srcdir)/exp_select.c expect_cf.h \
|
829 |
|
|
expect.h exp_command.h exp_event.h
|
830 |
|
|
exp_simple.o: $(srcdir)/exp_simple.c expect_cf.h \
|
831 |
|
|
expect.h exp_command.h exp_event.h
|
832 |
|
|
exp_strf.o: $(srcdir)/exp_strf.c
|
833 |
|
|
exp_trap.o: $(srcdir)/exp_trap.c expect_cf.h expect.h \
|
834 |
|
|
exp_command.h exp_log.h exp_printify.h
|
835 |
|
|
exp_tty.o: $(srcdir)/exp_tty.c expect_cf.h \
|
836 |
|
|
expect.h exp_rename.h exp_tty_in.h exp_tty.h exp_log.h \
|
837 |
|
|
exp_printify.h exp_command.h
|
838 |
|
|
exp_win.o: $(srcdir)/exp_win.c exp_win.h
|
839 |
|
|
expect.o: $(srcdir)/expect.c expect_cf.h \
|
840 |
|
|
exp_rename.h expect.h exp_command.h \
|
841 |
|
|
exp_log.h exp_printify.h exp_event.h exp_tty.h exp_tstamp.h
|
842 |
|
|
lib_exp.o: $(srcdir)/lib_exp.c expect_cf.h exp_rename.h expect.h \
|
843 |
|
|
exp_printify.h
|
844 |
|
|
pty_sgttyb.o: $(srcdir)/pty_sgttyb.c expect_cf.h exp_rename.h exp_tty_in.h \
|
845 |
|
|
exp_tty.h exp_pty.h
|
846 |
|
|
pty_termios.o: $(srcdir)/pty_termios.c expect_cf.h exp_win.h \
|
847 |
|
|
exp_tty_in.h exp_tty.h exp_rename.h exp_pty.h
|
848 |
|
|
pty_unicos.o: $(srcdir)/pty_unicos.c expect_cf.h exp_rename.h
|