1# Makefile.in -- 2# 3# This file is a Makefile for the Thread 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 1.26 2007/08/07 06:59:05 das Exp $ 16 17#======================================================================== 18# Add additional lines to handle any additional AC_SUBST cases that 19# have been added in a customized configure script. 20#======================================================================== 21 22#======================================================================== 23# Nothing of the variables below this line should need to be changed. 24# Please check the TARGETS section below to make sure the make targets 25# are correct. 26#======================================================================== 27 28#======================================================================== 29# The names of the source files is defined in the configure script. 30# The object files are used for linking into the final library. 31# This will be used when a dist target is added to the Makefile. 32# It is not important to specify the directory, as long as it is the 33# $(srcdir) or in the generic, win or unix subdirectory. 34#======================================================================== 35 36PKG_SOURCES = @PKG_SOURCES@ 37PKG_OBJECTS = @PKG_OBJECTS@ 38 39PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ 40PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ 41 42#======================================================================== 43# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with 44# this package that need to be installed, if any. 45#======================================================================== 46 47PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ 48 49#======================================================================== 50# This is a list of public header files to be installed, if any. 51#======================================================================== 52 53PKG_HEADERS = @PKG_HEADERS@ 54 55#======================================================================== 56# "PKG_LIB_FILE" refers to the library (dynamic or static as per 57# configuration options) composed of the named objects. 58#======================================================================== 59 60PKG_LIB_FILE = @PKG_LIB_FILE@ 61PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ 62 63lib_BINARIES = $(PKG_LIB_FILE) 64BINARIES = $(lib_BINARIES) 65 66SHELL = @SHELL@ 67 68srcdir = @srcdir@ 69prefix = @prefix@ 70exec_prefix = @exec_prefix@ 71 72bindir = @bindir@ 73libdir = @libdir@ 74includedir = @includedir@ 75datarootdir = @datarootdir@ 76datadir = @datadir@ 77mandir = @mandir@ 78 79DESTDIR = 80 81PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 82pkgdatadir = $(datadir)/$(PKG_DIR) 83pkglibdir = $(libdir)/$(PKG_DIR) 84pkgincludedir = $(includedir)/$(PKG_DIR) 85 86top_builddir = . 87 88INSTALL = @INSTALL@ 89INSTALL_PROGRAM = @INSTALL_PROGRAM@ 90INSTALL_DATA = @INSTALL_DATA@ 91INSTALL_SCRIPT = @INSTALL_SCRIPT@ 92 93PACKAGE_NAME = @PACKAGE_NAME@ 94PACKAGE_VERSION = @PACKAGE_VERSION@ 95CC = @CC@ 96CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 97CFLAGS_WARNING = @CFLAGS_WARNING@ 98EXEEXT = @EXEEXT@ 99LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ 100MAKE_LIB = @MAKE_LIB@ 101MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ 102MAKE_STATIC_LIB = @MAKE_STATIC_LIB@ 103MAKE_STUB_LIB = @MAKE_STUB_LIB@ 104OBJEXT = @OBJEXT@ 105RANLIB = @RANLIB@ 106RANLIB_STUB = @RANLIB_STUB@ 107SHLIB_CFLAGS = @SHLIB_CFLAGS@ 108SHLIB_LD = @SHLIB_LD@ 109SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ 110STLIB_LD = @STLIB_LD@ 111#TCL_DEFS = @TCL_DEFS@ 112TCL_BIN_DIR = @TCL_BIN_DIR@ 113TCL_SRC_DIR = @TCL_SRC_DIR@ 114 115# Not used, but retained for reference of what libs Tcl required 116#TCL_LIBS = @TCL_LIBS@ 117 118#======================================================================== 119# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our 120# package without installing. The other environment variables allow us 121# to test against an uninstalled Tcl. Add special env vars that you 122# require for testing here (like TCLX_LIBRARY). 123#======================================================================== 124 125EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR) 126TCLLIBPATH = $(top_builddir) 127TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ 128 TCL_THREAD_LIBRARY=`@CYGPATH@ $(srcdir)/lib` \ 129 @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 130 PATH="$(EXTRA_PATH):$(PATH)" \ 131 TCLLIBPATH="$(TCLLIBPATH) $(top_builddir)/../lib" 132 133TCLSH_PROG = @TCLSH_PROG@ 134TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) 135 136SHARED_BUILD = @SHARED_BUILD@ 137 138INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ 139 140PKG_CFLAGS = @PKG_CFLAGS@ 141 142# TCL_DEFS is not strictly need here, but if you remove it, then you 143# must make sure that configure.in checks for the necessary components 144# that your library may use. TCL_DEFS can actually be a problem if 145# you do not compile with a similar machine setup as the Tcl core was 146# compiled with. 147#DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS) 148DEFS = @DEFS@ $(PKG_CFLAGS) 149 150CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl 151CLEANFILES = @CLEANFILES@ 152 153CPPFLAGS = @CPPFLAGS@ 154LIBS = @PKG_LIBS@ @LIBS@ 155AR = @AR@ 156CFLAGS = @CFLAGS@ 157COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 158 159#======================================================================== 160# Start of user-definable TARGETS section 161#======================================================================== 162 163#======================================================================== 164# TEA TARGETS. Please note that the "libraries:" target refers to platform 165# independent files, and the "binaries:" target inclues executable programs and 166# platform-dependent libraries. Modify these targets so that they install 167# the various pieces of your package. The make and install rules 168# for the BINARIES that you specified above have already been done. 169#======================================================================== 170 171all: binaries libraries doc 172 173#======================================================================== 174# The binaries target builds executable programs, Windows .dll's, unix 175# shared/static libraries, and any other platform-dependent files. 176# The list of targets to build for "binaries:" is specified at the top 177# of the Makefile, in the "BINARIES" variable. 178#======================================================================== 179 180binaries: $(BINARIES) 181 182libraries: 183 184doc: 185 186install: all install-binaries install-libraries install-doc 187 188install-binaries: binaries install-lib-binaries install-bin-binaries 189 190#======================================================================== 191# This rule installs platform-independent files, such as header files. 192# The list=...; for p in $$list handles the empty list case x-platform. 193#======================================================================== 194 195install-libraries: libraries 196 @mkdir -p $(DESTDIR)$(includedir) 197 @echo "Installing header files in $(DESTDIR)$(includedir)" 198 @list='$(PKG_HEADERS)'; for i in $$list; do \ 199 echo "Installing $(srcdir)/$$i" ; \ 200 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 201 done; 202 203#======================================================================== 204# Install documentation. Unix manpages should go in the $(mandir) 205# directory. 206#======================================================================== 207 208install-doc: doc 209 @mkdir -p $(DESTDIR)$(mandir)/mann 210 @echo "Installing documentation in $(DESTDIR)$(mandir)" 211 @list='$(srcdir)/doc/man/*.n'; for i in $$list; do \ 212 echo "Installing $$i"; \ 213 rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \ 214 $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \ 215 done 216 217test: binaries libraries 218 $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) 219 220shell: binaries libraries 221 @$(TCLSH) $(SCRIPT) 222 223gdb: 224 $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) 225 226depend: 227 228#======================================================================== 229# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 230# mentioned above. That will ensure that this target is built when you 231# run "make binaries". 232# 233# The $(PKG_OBJECTS) objects are created and linked into the final 234# library. In most cases these object files will correspond to the 235# source files above. 236#======================================================================== 237 238$(PKG_LIB_FILE): $(PKG_OBJECTS) 239 -rm -f $(PKG_LIB_FILE) 240 ${MAKE_LIB} 241 $(RANLIB) $(PKG_LIB_FILE) 242 243$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) 244 -rm -f $(PKG_STUB_LIB_FILE) 245 ${MAKE_STUB_LIB} 246 $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) 247 248#======================================================================== 249# We need to enumerate the list of .c to .o lines here. 250# 251# In the following lines, $(srcdir) refers to the toplevel directory 252# containing your extension. If your sources are in a subdirectory, 253# you will have to modify the paths to reflect this: 254# 255# sample.$(OBJEXT): $(srcdir)/generic/sample.c 256# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@ 257# 258# Setting the VPATH variable to a list of paths will cause the makefile 259# to look into these paths when resolving .c to .obj dependencies. 260# As necessary, add $(srcdir):$(srcdir)/compat:.... 261#======================================================================== 262 263VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win 264 265.c.@OBJEXT@: 266 $(COMPILE) -c `@CYGPATH@ $<` -o $@ 267 268#======================================================================== 269# Distribution creation 270# You may need to tweak this target to make it work correctly. 271#======================================================================== 272 273#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar 274COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR) 275DIST_ROOT = /tmp/dist 276DIST_DIR = $(DIST_ROOT)/$(PKG_DIR) 277 278dist-clean: 279 rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 280 281dist: dist-clean 282 mkdir -p $(DIST_DIR) 283 cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license.terms \ 284 $(srcdir)/aclocal.m4 $(srcdir)/aolserver.m4 $(srcdir)/configure \ 285 $(srcdir)/*.in \ 286 $(DIST_DIR)/ 287 chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 288 chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in 289 290 mkdir $(DIST_DIR)/tclconfig 291 cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ 292 $(DIST_DIR)/tclconfig/ 293 chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 294 chmod +x $(DIST_DIR)/tclconfig/install-sh 295 296 mkdir $(DIST_DIR)/unix 297 cp $(srcdir)/unix/README $(srcdir)/unix/CONFIG \ 298 $(srcdir)/unix/threadUnix.c $(DIST_DIR)/unix/ 299 300 mkdir $(DIST_DIR)/win 301 cp $(srcdir)/win/README.txt $(srcdir)/win/CONFIG $(srcdir)/win/thread.rc \ 302 $(srcdir)/win/threadWin.c $(DIST_DIR)/win/ 303 304 mkdir $(DIST_DIR)/win/vc 305 cp $(srcdir)/win/vc/README.txt $(srcdir)/win/vc/makefile.vc \ 306 $(srcdir)/win/vc/nmakehlp.c $(srcdir)/win/vc/pkg.vc \ 307 $(srcdir)/win/vc/rules.vc $(srcdir)/win/vc/thread_win.dsw \ 308 $(srcdir)/win/vc/thread_win.dsp $(DIST_DIR)/win/vc/ 309 310 mkdir $(DIST_DIR)/tcl 311 cp $(srcdir)/tcl/README $(DIST_DIR)/tcl/ 312 313 list='tests doc doc/man doc/html generic lib tcl/cmdsrv tcl/phttpd tcl/tpool';\ 314 for p in $$list; do \ 315 if test -d $(srcdir)/$$p ; then \ 316 mkdir -p $(DIST_DIR)/$$p; \ 317 cp -p $(srcdir)/$$p/*.* $(DIST_DIR)/$$p/; \ 318 fi; \ 319 done 320 321 (cd $(DIST_ROOT); $(COMPRESS);) 322 323#======================================================================== 324# End of user-definable section 325#======================================================================== 326 327#======================================================================== 328# Don't modify the file to clean here. Instead, set the "CLEANFILES" 329# variable in configure.in 330#======================================================================== 331 332clean: 333 -test -z "$(BINARIES)" || rm -f $(BINARIES) 334 -rm -f *.$(OBJEXT) core *.core 335 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 336 337distclean: clean 338 -rm -f *.tab.c 339 -rm -f $(CONFIG_CLEAN_FILES) 340 -rm -f config.cache config.log config.status 341 342#======================================================================== 343# Install binary object libraries. On Windows this includes both .dll and 344# .lib files. Because the .lib files are not explicitly listed anywhere, 345# we need to deduce their existence from the .dll file of the same name. 346# Library files go into the lib directory. 347# In addition, this will generate the pkgIndex.tcl 348# file in the install location (assuming it can find a usable tclsh shell) 349# 350# You should not have to modify this target. 351#======================================================================== 352 353install-lib-binaries: binaries 354 @mkdir -p $(DESTDIR)$(pkglibdir) 355 @list='$(lib_BINARIES)'; for p in $$list; do \ 356 if test -f $$p; then \ 357 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 358 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 359 stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ 360 if test "x$$stub" = "xstub"; then \ 361 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ 362 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ 363 else \ 364 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 365 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ 366 fi; \ 367 ext=`echo $$p|sed -e "s/.*\.//"`; \ 368 if test "x$$ext" = "xdll"; then \ 369 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ 370 if test -f $$lib; then \ 371 echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ 372 $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ 373 fi; \ 374 fi; \ 375 fi; \ 376 done 377 @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 378 if test -f $(srcdir)/$$p; then \ 379 destp=`basename $$p`; \ 380 echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ 381 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ 382 fi; \ 383 done 384 @if test "x$(SHARED_BUILD)" = "x1"; then \ 385 echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \ 386 $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir); \ 387 fi 388 389#======================================================================== 390# Install binary executables (e.g. .exe files and dependent .dll files) 391# This is for files that must go in the bin directory (located next to 392# wish and tclsh), like dependent .dll files on Windows. 393# 394# You should not have to modify this target, except to define bin_BINARIES 395# above if necessary. 396#======================================================================== 397 398install-bin-binaries: binaries 399 @mkdir -p $(DESTDIR)$(bindir) 400 @list='$(bin_BINARIES)'; for p in $$list; do \ 401 if test -f $$p; then \ 402 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 403 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 404 fi; \ 405 done 406 407.SUFFIXES: .c .$(OBJEXT) 408 409Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 410 cd $(top_builddir) \ 411 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 412 413uninstall-binaries: 414 list='$(lib_BINARIES)'; for p in $$list; do \ 415 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 416 done 417 list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 418 p=`basename $$p`; \ 419 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 420 done 421 list='$(bin_BINARIES)'; for p in $$list; do \ 422 rm -f $(DESTDIR)$(bindir)/$$p; \ 423 done 424 425.PHONY: all binaries clean depend distclean doc install libraries test 426 427# Tell versions [3.59,3.63) of GNU make to not export all variables. 428# Otherwise a system limit (for SysV at least) may be exceeded. 429.NOEXPORT: 430