c05c8803a682124780c50acfabb27f1deecd9d12
[platform/upstream/expect.git] / Makefile.in
1 # Makefile.in --
2 #
3 #       This file is a Makefile for Expect TEA Extension.  If it has the name
4 #       "Makefile.in" then it is a template for a Makefile;  to generate the
5 #       actual Makefile, run "./configure", which is a configuration script
6 #       generated by the "autoconf" program (constructs like "@foo@" will get
7 #       replaced in the actual Makefile.
8 #
9 # Copyright (c) 1999 Scriptics Corporation.
10 # Copyright (c) 2002-2005 ActiveState Corporation.
11 #
12 # See the file "license.terms" for information on usage and redistribution
13 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
14 #
15 # RCS: @(#) $Id: Makefile.in,v 5.51 2010/09/30 17:14:07 andreas_kupries Exp $
16
17 #========================================================================
18 #========================================================================
19
20 # expect must be setuid on crays in order to open ptys (and accordingly,
21 # you must run this Makefile as root).
22 # See the FAQ for more info on why this is necessary on Crays.
23 SETUID = @SETUID@
24 # SETUID = chmod u+s
25
26 LIB_RUNTIME_DIR = $(DESTDIR)@libdir@
27
28 # The following Expect scripts are not necessary to have installed as
29 # commands, but are very useful. Edit out what you don't want
30 # installed. The INSTALL file describes these and others in more
31 # detail. Some Make's screw up if you delete all of them because
32 # SCRIPTS is a target. If this is a problem, just comment out the
33 # SCRIPTS target itself.
34
35 SCRIPTS = timed-run timed-read ftp-rfc autopasswd lpunlock weather \
36         passmass rftp kibitz rlogin-cwd xpstat tkpasswd dislocate xkibitz \
37         tknewsbiff unbuffer mkpasswd cryptdir decryptdir autoexpect \
38         multixterm
39
40 # A couple of the scripts have man pages of their own.
41 # You can delete these too if you don't want'em.
42
43 SCRIPTS_MANPAGES = kibitz dislocate xkibitz tknewsbiff unbuffer mkpasswd \
44         passmass cryptdir decryptdir autoexpect multixterm
45
46
47 # allow us to handle null list gracefully, "end_of_list" should not exist
48
49 SCRIPT_LIST         = $(SCRIPTS) end_of_list
50 SCRIPT_MANPAGE_LIST = $(SCRIPTS_MANPAGES) end_of_list
51
52 # Short directory path where binaries can be found to support #! hack.
53 # This directory path can be the same as the directory in which the
54 # binary actually sits except when the path is so long that the #!
55 # mechanism breaks (usually at 32 characters). The solution is to
56 # create a directory with a very short name, which consists only of
57 # symbolic links back to the true binaries. Subtracting two for "#!"
58 # and a couple more for arguments (typically " -f" or " --") gives you
59 # 27 characters. Pathnames over this length won't be able to use the
60 # #! magic. For more info on this, see the execve(2) man page.
61
62 SHORT_BINDIR = $(exec_prefix)/bin
63
64 #========================================================================
65 # Nothing of the variables below this line should need to be changed.
66 # Please check the TARGETS section below to make sure the make targets
67 # are correct.
68 #========================================================================
69
70 #========================================================================
71 # The names of the source files is defined in the configure script.
72 # The object files are used for linking into the final library.
73 # This will be used when a dist target is added to the Makefile.
74 # It is not important to specify the directory, as long as it is the
75 # $(srcdir) or in the generic, win or unix subdirectory.
76 #========================================================================
77
78 PKG_SOURCES     = @PKG_SOURCES@
79 PKG_OBJECTS     = @PKG_OBJECTS@
80
81 PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
82 PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
83
84 #========================================================================
85 # PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
86 # this package that need to be installed, if any.
87 #========================================================================
88
89 PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
90
91 #========================================================================
92 # This is a list of public header files to be installed, if any.
93 #========================================================================
94
95 PKG_HEADERS     = @PKG_HEADERS@
96
97 #========================================================================
98 # "PKG_LIB_FILE" refers to the library (dynamic or static as per
99 # configuration options) composed of the named objects.
100 #========================================================================
101
102 PKG_LIB_FILE    = @PKG_LIB_FILE@
103 PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
104
105 lib_BINARIES    = $(PKG_LIB_FILE)
106 bin_BINARIES    = expect
107 BINARIES        = $(lib_BINARIES) $(bin_BINARIES)
108
109 SHELL           = @SHELL@
110
111 srcdir          = @srcdir@
112 prefix          = @prefix@
113 exec_prefix     = @exec_prefix@
114
115 bindir          = @bindir@
116 libdir          = @libdir@
117 datadir         = @datadir@
118 mandir          = @mandir@
119 includedir      = @includedir@
120
121 DESTDIR         =
122
123 PKG_DIR         = $(PACKAGE_NAME)$(PACKAGE_VERSION)
124 pkgdatadir      = $(datadir)/$(PKG_DIR)
125 pkglibdir       = $(libdir)/$(PKG_DIR)
126 pkgincludedir   = $(includedir)/$(PKG_DIR)
127
128 top_builddir    = .
129
130 INSTALL         = @INSTALL@
131 INSTALL_PROGRAM = @INSTALL_PROGRAM@
132 INSTALL_DATA    = @INSTALL_DATA@
133 INSTALL_SCRIPT  = @INSTALL_SCRIPT@
134
135 PACKAGE_NAME    = @PACKAGE_NAME@
136 PACKAGE_VERSION = @PACKAGE_VERSION@
137 CC              = @CC@
138 CFLAGS_DEFAULT  = @CFLAGS_DEFAULT@
139 CFLAGS_WARNING  = @CFLAGS_WARNING@
140 CLEANFILES      = @CLEANFILES@
141 EXEEXT          = @EXEEXT@
142 LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
143 MAKE_LIB        = @MAKE_LIB@
144 MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
145 MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
146 MAKE_STUB_LIB   = @MAKE_STUB_LIB@
147 OBJEXT          = @OBJEXT@
148 RANLIB          = @RANLIB@
149 RANLIB_STUB     = @RANLIB_STUB@
150 SHLIB_CFLAGS    = @SHLIB_CFLAGS@
151 SHLIB_LD        = @SHLIB_LD@
152 SHLIB_LD_LIBS   = @SHLIB_LD_LIBS@
153 STLIB_LD        = @STLIB_LD@
154 TCL_DEFS        = @TCL_DEFS@
155 TCL_BIN_DIR     = @TCL_BIN_DIR@
156 TCL_SRC_DIR     = @TCL_SRC_DIR@
157 # Not used, but retained for reference of what libs Tcl required
158 TCL_LIBS        = @TCL_LIBS@
159
160 #========================================================================
161 # TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
162 # package without installing.  The other environment variables allow us
163 # to test against an uninstalled Tcl.  Add special env vars that you
164 # require for testing here (like TCLX_LIBRARY).
165 #========================================================================
166
167 EXTRA_PATH      = $(top_builddir):$(TCL_BIN_DIR)
168 TCLSH_ENV       = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
169                   @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
170                   PATH="$(EXTRA_PATH):$(PATH)" \
171                   TCLLIBPATH="$(top_builddir)"
172 TCLSH_PROG      = @TCLSH_PROG@
173 TCLSH           = $(TCLSH_ENV) $(TCLSH_PROG)
174 SHARED_BUILD    = @SHARED_BUILD@
175
176 INCLUDES        = @PKG_INCLUDES@ @TCL_INCLUDES@
177
178 PKG_CFLAGS      = @PKG_CFLAGS@
179
180 # TCL_DEFS is not strictly need here, but if you remove it, then you
181 # must make sure that configure.in checks for the necessary components
182 # that your library may use.  TCL_DEFS can actually be a problem if
183 # you do not compile with a similar machine setup as the Tcl core was
184 # compiled with.
185 #DEFS           = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
186 DEFS            = @DEFS@ $(PKG_CFLAGS)
187
188 CONFIG_CLEAN_FILES = Makefile
189
190 CPPFLAGS        = @CPPFLAGS@
191 LIBS            = @PKG_LIBS@ @LIBS@
192 AR              = @AR@
193 CFLAGS          = @CFLAGS@
194 COMPILE         = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
195
196 #========================================================================
197 # Start of user-definable TARGETS section
198 #========================================================================
199
200 #========================================================================
201 # TEA TARGETS.  Please note that the "libraries:" target refers to platform
202 # independent files, and the "binaries:" target inclues executable programs and
203 # platform-dependent libraries.  Modify these targets so that they install
204 # the various pieces of your package.  The make and install rules
205 # for the BINARIES that you specified above have already been done.
206 #========================================================================
207
208 all: binaries libraries doc
209
210 #========================================================================
211 # The binaries target builds executable programs, Windows .dll's, unix
212 # shared/static libraries, and any other platform-dependent files.
213 # The list of targets to build for "binaries:" is specified at the top
214 # of the Makefile, in the "BINARIES" variable.
215 #========================================================================
216
217 binaries: $(BINARIES) pkgIndex.tcl-hand
218
219 libraries:
220
221 doc:
222
223 install: all install-binaries install-libraries install-doc
224
225 install-binaries: binaries install-lib-binaries install-bin-binaries
226
227 #========================================================================
228 # This rule installs platform-independent files, such as header files.
229 #========================================================================
230
231 install-libraries: libraries $(SCRIPTS)
232         @mkdir -p $(DESTDIR)$(includedir)
233         @echo "Installing header files in $(DESTDIR)$(includedir)"
234         @list='$(PKG_HEADERS)'; for i in $$list; do \
235             echo "Installing $(srcdir)/$$i" ; \
236             $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \
237         done;
238 # install standalone scripts and their man pages, if requested
239         @mkdir -p $(DESTDIR)$(prefix)/bin
240         -for i in $(SCRIPT_LIST) ; do \
241           if [ -f $$i ] ; then \
242             $(INSTALL_PROGRAM) $$i $(DESTDIR)$(prefix)/bin/$$i ; \
243             rm -f $$i ; \
244           else true; fi ; \
245         done
246
247 #========================================================================
248 # Install documentation.  Unix manpages should go in the $(mandir)
249 # directory.
250 #========================================================================
251
252 install-doc: doc
253         @mkdir -p $(DESTDIR)$(mandir)/man1
254         @mkdir -p $(DESTDIR)$(mandir)/man3
255         @echo "Installing documentation in $(DESTDIR)$(mandir)"
256 # install Expect man page
257         $(INSTALL_DATA) $(srcdir)/expect.man $(DESTDIR)$(mandir)/man1/expect.1
258 # install man page for Expect library
259         $(INSTALL_DATA) $(srcdir)/libexpect.man $(DESTDIR)$(mandir)/man3/libexpect.3
260         -for i in $(SCRIPT_MANPAGE_LIST) ; do \
261           if [ -f $(srcdir)/example/$$i.man ] ; then \
262             $(INSTALL_DATA) $(srcdir)/example/$$i.man $(DESTDIR)$(mandir)/man1/$$i.1 ; \
263           else true; fi ; \
264         done
265
266 test: binaries libraries
267         $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
268
269 shell: binaries libraries
270         @$(TCLSH) $(SCRIPT)
271
272 expectshell: binaries libraries
273         @$(TCLSH_ENV) expect $(SCRIPT)
274
275 gdb:
276         $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT)
277
278 depend:
279
280 #========================================================================
281 # $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
282 # mentioned above.  That will ensure that this target is built when you
283 # run "make binaries".
284 #
285 # The $(PKG_OBJECTS) objects are created and linked into the final
286 # library.  In most cases these object files will correspond to the
287 # source files above.
288 #========================================================================
289
290 $(PKG_LIB_FILE): $(PKG_OBJECTS)
291         -rm -f $(PKG_LIB_FILE)
292         ${MAKE_LIB}
293         $(RANLIB) $(PKG_LIB_FILE)
294
295 $(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
296         -rm -f $(PKG_STUB_LIB_FILE)
297         ${MAKE_STUB_LIB}
298         $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
299
300 #========================================================================
301 # We need to enumerate the list of .c to .o lines here.
302 #
303 # In the following lines, $(srcdir) refers to the toplevel directory
304 # containing your extension.  If your sources are in a subdirectory,
305 # you will have to modify the paths to reflect this:
306 #
307 # Expect.$(OBJEXT): $(srcdir)/generic/Expect.c
308 #       $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/Expect.c` -o $@
309 #
310 # Setting the VPATH variable to a list of paths will cause the makefile
311 # to look into these paths when resolving .c to .obj dependencies.
312 # As necessary, add $(srcdir):$(srcdir)/compat:....
313 #========================================================================
314
315 VPATH = $(srcdir)
316
317 .c.@OBJEXT@:
318         $(COMPILE) -c `@CYGPATH@ $<` -o $@
319
320 #========================================================================
321 # Create the pkgIndex.tcl file.
322 # It is usually easiest to let Tcl do this for you with pkg_mkIndex, but
323 # you may find that you need to customize the package.  If so, either
324 # modify the -hand version, or create a pkgIndex.tcl.in file and have
325 # the configure script output the pkgIndex.tcl by editing configure.in.
326 #========================================================================
327
328 pkgIndex.tcl:
329         ( echo pkg_mkIndex . $(PKG_LIB_FILE) \; exit; ) | $(TCLSH)
330
331 pkgIndex.tcl-hand:
332         (echo 'if {![package vsatisfies [package provide Tcl] @TCL_VERSION@]} {return}' ; \
333          echo 'package ifneeded Expect $(PACKAGE_VERSION) \
334             [list load [file join $$dir $(PKG_LIB_FILE)]]'\
335         ) > pkgIndex.tcl
336
337 #========================================================================
338 # Distribution creation
339 # You may need to tweak this target to make it work correctly.
340 #========================================================================
341
342 TAR             = tar
343 #COMPRESS       = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
344 COMPRESS        = $(TAR) zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
345 DIST_ROOT       = /tmp/dist
346 DIST_DIR        = $(DIST_ROOT)/$(PKG_DIR)
347
348 dist-clean:
349         rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
350
351 dist: dist-clean doc
352         mkdir -p $(DIST_DIR)
353         cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
354                 $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
355                 $(srcdir)/fixline1 \
356                 $(DIST_DIR)/
357         chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
358         chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
359
360         mkdir $(DIST_DIR)/tclconfig
361         cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \
362            $(srcdir)/tclconfig/config.guess $(srcdir)/tclconfig/config.sub \
363                 $(DIST_DIR)/tclconfig/
364         chmod 664 $(DIST_DIR)/tclconfig/tcl.m4
365         chmod +x $(DIST_DIR)/tclconfig/install-sh
366
367         cp -p $(srcdir)/*.{c,h,man} $(srcdir)/vgrindefs $(srcdir)/NEWS \
368                 $(srcdir)/INSTALL $(srcdir)/FAQ $(srcdir)/HISTORY \
369                 $(DIST_DIR)/
370         chmod 664 $(DIST_DIR)/*.{c,h,man}
371
372         -list='demos example generic library tests unix win tests testsuite'; \
373         for p in $$list; do \
374             if test -d $(srcdir)/$$p ; then \
375                 mkdir -p $(DIST_DIR)/$$p; \
376                 cp -p $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
377             fi; \
378         done
379         (cd $(DIST_ROOT); $(COMPRESS);)
380         cp $(DIST_ROOT)/$(PKG_DIR).tar.gz $(top_builddir)
381
382 $(SCRIPTS):
383         $(TCLSH) $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@
384
385 ## We cannot use TCL_LIBS below (after TCL_LIB_SPEC) because its
386 ## expansion references the contents of LIBS, which contains linker
387 ## options we cannot use here (and which is what we are replacing in
388 ## the first place).
389
390 expect: exp_main_exp.o $(PKG_LIB_FILE)
391         $(CC) \
392                 @CFLAGS@ \
393                 @LDFLAGS_DEFAULT@ \
394                 -o expect exp_main_exp.o \
395                 @EXP_BUILD_LIB_SPEC@ \
396                 @TCL_LIB_SPEC@ \
397                 @TCL_DL_LIBS@ @PKG_LIBS@ @MATH_LIBS@ \
398                 @TCL_CC_SEARCH_FLAGS@ \
399                 @EXP_CC_SEARCH_FLAGS@
400         $(SETUID) expect
401
402 expectk:
403         @echo "expectk remove from distribution"
404         @echo "use tclsh with package require Tk and Expect"
405
406 #========================================================================
407 # Produce FAQ and homepage
408 #========================================================================
409
410 WEBDIR = /proj/itl/www/div826/subject/expect
411 VERSION = $(PACKAGE_VERSION)
412
413 # create the FAQ in html form
414 FAQ.html:       FAQ.src FAQ.tcl
415         FAQ.src html > FAQ.html
416
417 # create the FAQ in text form
418 FAQ:    FAQ.src FAQ.tcl
419         FAQ.src text > FAQ
420
421 # generate Expect home page
422 homepage.html:  homepage.src homepage.tcl expect.tar.gz.md5
423         homepage.src > homepage.html
424
425 expect.tar.gz.md5:      expect-$(VERSION).tar.gz
426         md5 expect-$(VERSION).tar.gz > expect.tar.gz.md5
427
428 # install various html docs on our web server
429 install-html:   FAQ.html homepage.html
430         cp homepage.html $(WEBDIR)/index.html
431         cp FAQ.html $(WEBDIR)
432
433 # HTMLize man pages for examples and push them out to the web server
434 example-man-pages:
435         -for i in $(SCRIPT_MANPAGE_LIST) ; do \
436           if [ -f $(srcdir)/example/$$i.man ] ; then \
437             rman -f HTML $(srcdir)/example/$$i.man > $(srcdir)/example/$$i.man.html ; \
438             cp $(srcdir)/example/$$i.man.html $(FTPDIR)/example ; \
439           else true; fi ; \
440         done
441
442 #========================================================================
443 # Push out releases
444 #========================================================================
445
446 FTPDIR = /proj/itl/www/div826/subject/expect
447
448 # make a private tar file for myself
449 tar:    expect-$(VERSION).tar
450         mv expect-$(VERSION).tar expect.tar
451
452 # make a release and install it on ftp server
453 # update web page to reflect new version
454 ftp:    expect-$(VERSION).tar.Z expect-$(VERSION).tar.gz install-html homepage.html
455         cp expect-$(VERSION).tar.Z $(FTPDIR)/expect.tar.Z
456         cp expect-$(VERSION).tar.gz $(FTPDIR)/expect.tar.gz
457         cp expect-$(VERSION).tar.gz $(FTPDIR)/old/expect-$(VERSION).tar.gz
458         md5 $(FTPDIR)/expect.tar.gz > expect.tar.gz.md5
459         cp HISTORY $(FTPDIR)
460         cp README $(FTPDIR)/README.distribution
461         cp example/README $(FTPDIR)/example
462         cp `pubfile example` $(FTPDIR)/example
463         ls -l $(FTPDIR)/expect.tar*
464 #       delete .Z temp file, still need .gz though for md5 later
465         rm expect-$(VERSION).tar*
466
467 # make an alpha release and install it on ftp server
468 alpha:  expect-$(VERSION).tar.Z expect-$(VERSION).tar.gz
469         cp expect-$(VERSION).tar.Z $(FTPDIR)/alpha.tar.Z
470         cp expect-$(VERSION).tar.gz $(FTPDIR)/alpha.tar.gz
471         cp HISTORY $(FTPDIR)
472         rm expect-$(VERSION).tar*
473         ls -l $(FTPDIR)/alpha.tar*
474
475 # make a beta release and install it on ftp server
476 beta:   expect-$(VERSION).tar.Z expect-$(VERSION).tar.gz
477         rm -rf $(FTPDIR)/alpha.tar*
478         cp expect-$(VERSION).tar.Z $(FTPDIR)/beta.tar.Z
479         cp expect-$(VERSION).tar.gz $(FTPDIR)/beta.tar.gz
480         cp HISTORY $(FTPDIR)
481         rm expect-$(VERSION).tar*
482         ls -l $(FTPDIR)/beta.tar*
483
484 expect-$(VERSION).tar: configure
485         rm -f ../expect-$(VERSION)
486         ln -s `pwd` ../expect-$(VERSION)
487         cd ..;tar cvfh $@ `pubfile expect-$(VERSION)`
488         mv ../$@ .
489
490 expect-$(VERSION).tar.Z:        expect-$(VERSION).tar
491         compress -fc expect-$(VERSION).tar > $@
492
493 expect-$(VERSION).tar.gz:       expect-$(VERSION).tar
494         gzip -fc expect-$(VERSION).tar > $@
495
496 #========================================================================
497 # End of user-definable section
498 #========================================================================
499
500 #========================================================================
501 # Don't modify the file to clean here.  Instead, set the "CLEANFILES"
502 # variable in configure.in
503 #========================================================================
504
505 clean:  
506         -test -z "$(BINARIES)" || rm -f $(BINARIES)
507         -rm -f *.$(OBJEXT) core *.core
508         -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
509
510 distclean: clean
511         -rm -f *.tab.c
512         -rm -f $(CONFIG_CLEAN_FILES)
513         -rm -f config.cache config.log config.status
514
515 #========================================================================
516 # Install binary object libraries.  On Windows this includes both .dll and
517 # .lib files.  Because the .lib files are not explicitly listed anywhere,
518 # we need to deduce their existence from the .dll file of the same name.
519 # Library files go into the lib directory.
520 # In addition, this will generate the pkgIndex.tcl
521 # file in the install location (assuming it can find a usable tclsh shell)
522 #
523 # You should not have to modify this target.
524 #========================================================================
525
526 install-lib-binaries:
527         @mkdir -p $(DESTDIR)$(pkglibdir)
528         @list='$(lib_BINARIES)'; for p in $$list; do \
529           if test -f $$p; then \
530             echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
531             $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
532             stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
533             if test "x$$stub" = "xstub"; then \
534                 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
535                 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \
536             else \
537                 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
538                 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
539             fi; \
540             ext=`echo $$p|sed -e "s/.*\.//"`; \
541             if test "x$$ext" = "xdll"; then \
542                 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
543                 if test -f $$lib; then \
544                     echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
545                     $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
546                 fi; \
547             fi; \
548           fi; \
549         done
550         @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
551           if test -f $(srcdir)/$$p; then \
552             destp=`basename $$p`; \
553             echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
554             $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
555           fi; \
556         done
557         @if test "x$(SHARED_BUILD)" = "x1"; then \
558             echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
559             $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \
560         fi
561
562 #========================================================================
563 # Install binary executables (e.g. .exe files and dependent .dll files)
564 # This is for files that must go in the bin directory (located next to
565 # wish and tclsh), like dependent .dll files on Windows.
566 #
567 # You should not have to modify this target, except to define bin_BINARIES
568 # above if necessary.
569 #========================================================================
570
571 install-bin-binaries:
572         @mkdir -p $(DESTDIR)$(bindir)
573         @list='$(bin_BINARIES)'; for p in $$list; do \
574           if test -f $$p; then \
575             echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
576             $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
577           fi; \
578         done
579
580 .SUFFIXES: .c .$(OBJEXT) .man .n .html
581
582 Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
583         cd $(top_builddir) \
584           && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
585
586 uninstall-binaries:
587         list='$(lib_BINARIES)'; for p in $$list; do \
588           rm -f $(DESTDIR)$(pkglibdir)/$$p; \
589         done
590         list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
591           p=`basename $$p`; \
592           rm -f $(DESTDIR)$(pkglibdir)/$$p; \
593         done
594         list='$(bin_BINARIES)'; for p in $$list; do \
595           rm -f $(DESTDIR)$(bindir)/$$p; \
596         done
597
598 #========================================================================
599 #
600 # Target to regenerate header files and stub files from the *.decls tables.
601 #
602 #========================================================================
603
604 genstubs:
605         $(TCLSH_PROG)   \
606                 $(srcdir)/tools/genStubs.tcl $(srcdir)/generic  \
607                 $(srcdir)/Expect.decls
608
609 #========================================================================
610 #
611 # Target to check that all exported functions have an entry in the stubs
612 # tables.
613 #
614 #========================================================================
615
616 Expect_DECLS = \
617         $(srcdir)/expect.decls
618
619 checkstubs:
620         -@for i in `nm -p $(Expect_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \
621                 | sort -n`; do \
622                 match=0; \
623                 for j in $(Expect_DECLS); do \
624                     if [ `grep -c $$i $$j` -gt 0 ]; then \
625                         match=1; \
626                     fi; \
627                 done; \
628                 if [ $$match -eq 0 ]; then echo $$i; fi \
629         done
630
631
632 .PHONY: all binaries clean depend distclean doc install libraries test chantest
633
634 # Tell versions [3.59,3.63) of GNU make to not export all variables.
635 # Otherwise a system limit (for SysV at least) may be exceeded.
636 .NOEXPORT: