1# Makefile.in -- 2# 3# This file is a Makefile for Sample 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-2004 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#======================================================================== 16# The names of the source files is defined in the configure script. 17# The object files are used for linking into the final library. 18# This will be used when a dist target is added to the Makefile. 19# It is not important to specify the directory, as long as it is the 20# $(srcdir) or in the generic, win or unix subdirectory. 21#======================================================================== 22 23PKG_SOURCES = @PKG_SOURCES@ 24PKG_OBJECTS = @PKG_OBJECTS@ 25 26PKG_STUB_SOURCES = @PKG_STUB_SOURCES@ 27PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@ 28 29#======================================================================== 30# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with 31# this package that need to be installed, if any. 32#======================================================================== 33 34PKG_TCL_SOURCES = @PKG_TCL_SOURCES@ 35 36#======================================================================== 37# This is a list of header files to be installed 38# itk.h includes itclInt.h, which needs itclIntDecls.h, 39# so we must install them. 40#======================================================================== 41 42PKG_HEADERS = @PKG_HEADERS@ 43 44#======================================================================== 45# Nothing of the variables below this line need to be changed. Please 46# check the TARGETS section below to make sure the make targets are 47# correct. 48#======================================================================== 49 50#======================================================================== 51# Change the name of the variable "exampleA_LIB_FILE" to match the one 52# used in the configure script. This is the parameterized name of the 53# library that we are building. 54#======================================================================== 55 56PKG_LIB_FILE = @PKG_LIB_FILE@ 57PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ 58 59lib_BINARIES = $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE) 60BINARIES = $(lib_BINARIES) 61 62SHELL = @SHELL@ 63 64srcdir = @srcdir@ 65prefix = @prefix@ 66exec_prefix = @exec_prefix@ 67 68bindir = @bindir@ 69libdir = @libdir@ 70datadir = @datadir@ 71mandir = @mandir@ 72includedir = @includedir@ 73 74DESTDIR = 75 76PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) 77pkgdatadir = $(datadir)/$(PKG_DIR) 78pkglibdir = $(libdir)/$(PKG_DIR) 79pkgincludedir = $(includedir)/$(PKG_DIR) 80 81top_builddir = . 82 83INSTALL_OPTIONS = 84INSTALL = $(SHELL) $(srcdir)/tclconfig/install-sh -c ${INSTALL_OPTIONS} 85INSTALL_DATA_DIR = ${INSTALL} -d -m 755 86INSTALL_PROGRAM = ${INSTALL} -m 755 87INSTALL_DATA = ${INSTALL} -m 444 88INSTALL_SCRIPT = ${INSTALL_PROGRAM} 89INSTALL_LIBRARY = ${INSTALL_DATA} 90 91PACKAGE_NAME = @PACKAGE_NAME@ 92PACKAGE_VERSION = @PACKAGE_VERSION@ 93PACKAGE_PATCH_LEVEL = @itcl_PATCH_LEVEL@ 94CC = @CC@ 95CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ 96CFLAGS_WARNING = @CFLAGS_WARNING@ 97CLEANFILES = @CLEANFILES@ 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@ 111TCL_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 116TCL_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) 126PKG_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ 127 ITCL_LIBRARY=`@CYGPATH@ $(srcdir)/library` \ 128 @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ 129 PATH="$(EXTRA_PATH):$(PATH)" \ 130 TCLLIBPATH="$(top_builddir)" 131TCLSH_PROG = @TCLSH_PROG@ 132TCLSH = $(PKG_ENV) $(TCLSH_PROG) 133SHARED_BUILD = @SHARED_BUILD@ 134 135INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ 136 137PKG_CFLAGS = @PKG_CFLAGS@ 138 139DEFS = @DEFS@ $(PKG_CFLAGS) \ 140 -DITCL_LIBRARY=\"$(pkglibdir)\" 141 142CONFIG_CLEAN_FILES = @CONFIG_CLEAN_FILES@ Makefile itclConfig.sh pkgIndex.tcl 143 144CPPFLAGS = @CPPFLAGS@ 145LIBS = @PKG_LIBS@ @LIBS@ 146AR = @AR@ 147CFLAGS = @CFLAGS@ 148COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 149 150#======================================================================== 151# Start of user-definable TARGETS section 152#======================================================================== 153 154#======================================================================== 155# TEA TARGETS. Please note that the "libraries:" target refers to platform 156# independent files, and the "binaries:" target inclues executable programs and 157# platform-dependent libraries. Modify these targets so that they install 158# the various pieces of your package. The make and install rules 159# for the BINARIES that you specified above have already been done. 160#======================================================================== 161 162all: binaries libraries doc 163 164#======================================================================== 165# The binaries target builds executable programs, Windows .dll's, unix 166# shared/static libraries, and any other platform-dependent files. 167# The list of targets to build for "binaries:" is specified at the top 168# of the Makefile, in the "BINARIES" variable. 169#======================================================================== 170 171binaries: $(BINARIES) 172 173libraries: 174 175doc: 176 177install: all install-binaries install-libraries install-doc 178 179install-binaries: binaries install-lib-binaries install-bin-binaries 180 181#======================================================================== 182# This rule installs platform-independent files, such as header files. 183#======================================================================== 184 185install-libraries: libraries 186 @$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir) 187 @echo "Installing header files in $(DESTDIR)$(includedir)" 188 @list='$(PKG_HEADERS)'; for i in $$list; do \ 189 echo "Installing $(srcdir)/$$i" ; \ 190 $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ 191 done; 192 193#======================================================================== 194# Install documentation. Unix manpages should go in the $(mandir) 195# directory. 196#======================================================================== 197 198install-doc: doc 199 @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/mann 200 @echo "Installing man pages in $(DESTDIR)$(mandir)" 201 @cd $(srcdir)/doc; for i in *.n; do \ 202 sfxname=`basename $$i | sed -e 's|.n$$|.itcl|'`; \ 203 echo "Installing $$i as $(DESTDIR)$(mandir)/mann/$$sfxname"; \ 204 rm -f $(DESTDIR)$(mandir)/mann/$$sfxname; \ 205 sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ 206 $$i > $(DESTDIR)$(mandir)/mann/$$sfxname; \ 207 chmod 444 $(DESTDIR)$(mandir)/mann/$$sfxname; \ 208 done 209 210test: binaries libraries 211 $(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` -load "package require Itcl $(PACKAGE_VERSION)" $(TESTFLAGS) 212 213shell: binaries libraries 214 @$(TCLSH) $(SCRIPT) 215 216gdb: 217 $(PKG_ENV) gdb $(TCLSH_PROG) $(SCRIPT) 218 219VALGRINDARGS=--tool=memcheck --num-callers=8 --leak-resolution=high --leak-check=yes --show-reachable=yes -v 220 221valgrind: binaries libraries 222 $(PKG_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` -load "package require Itcl $(PACKAGE_VERSION)" $(TESTFLAGS) 223 224valgrindshell: binaries libraries 225 $(PKG_ENV) valgrind $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT) 226 227depend: 228 229#======================================================================== 230# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable 231# mentioned above. That will ensure that this target is built when you 232# run "make binaries". 233# 234# The $(PKG_OBJECTS) objects are created and linked into the final 235# library. In most cases these object files will correspond to the 236# source files above. 237#======================================================================== 238 239$(PKG_LIB_FILE): $(PKG_OBJECTS) 240 -rm -f $(PKG_LIB_FILE) 241 ${MAKE_LIB} 242 $(RANLIB) $(PKG_LIB_FILE) 243 244$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS) 245 -rm -f $(PKG_STUB_LIB_FILE) 246 ${MAKE_STUB_LIB} 247 $(RANLIB_STUB) $(PKG_STUB_LIB_FILE) 248 249#======================================================================== 250# We need to enumerate the list of .c to .o lines here. 251# 252# In the following lines, $(srcdir) refers to the toplevel directory 253# containing your extension. If your sources are in a subdirectory, 254# you will have to modify the paths to reflect this: 255# 256# exampleA.$(OBJEXT): $(srcdir)/generic/exampleA.c 257# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/exampleA.c` -o $@ 258# 259# Setting the VPATH variable to a list of paths will cause the makefile 260# to look into these paths when resolving .c to .obj dependencies. 261# As necessary, add $(srcdir):$(srcdir)/compat:.... 262#======================================================================== 263 264VPATH = $(srcdir)/unix:$(srcdir)/generic:$(srcdir)/win 265 266.c.$(OBJEXT): 267 $(COMPILE) -c `@CYGPATH@ $<` -o $@ 268 269#======================================================================== 270# Distribution creation 271# You may need to tweak this target to make it work correctly. 272#======================================================================== 273 274TAR = tar 275RELEASE_DIR = $(PKG_DIR)$(PACKAGE_PATCH_LEVEL) 276#COMPRESS = tar cvf $(RELEASE_DIR).tar $(RELEASE_DIR); compress $(RELEASE_DIR).tar 277COMPRESS = $(TAR) zcvf $(RELEASE_DIR).tar.gz $(RELEASE_DIR) 278DIST_ROOT = /tmp/dist 279DIST_DIR = $(DIST_ROOT)/$(RELEASE_DIR) 280 281dist-clean: 282 rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.* 283 284dist: dist-clean doc 285 mkdir -p $(DIST_DIR) 286 cp -p $(srcdir)/license* $(srcdir)/aclocal.m4 $(srcdir)/configure \ 287 $(srcdir)/*.in $(DIST_DIR)/ 288 chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4 289 chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in 290 291 mkdir $(DIST_DIR)/tclconfig 292 cp $(srcdir)/tclconfig/install-sh $(srcdir)/tclconfig/tcl.m4 \ 293 $(DIST_DIR)/tclconfig/ 294 chmod 664 $(DIST_DIR)/tclconfig/tcl.m4 295 chmod +x $(DIST_DIR)/tclconfig/install-sh 296 297 list='doc generic library tests win win/rc'; \ 298 for p in $$list; do \ 299 if test -d $(srcdir)/$$p ; then \ 300 mkdir $(DIST_DIR)/$$p; \ 301 for q in $(srcdir)/$$p/*; do \ 302 if test -f $$q ; then \ 303 cp -p $$q $(DIST_DIR)/$$p/; \ 304 fi; \ 305 done; \ 306 fi; \ 307 done 308 309 list='CHANGES ChangeLog INCOMPATIBLE README TODO'; \ 310 for p in $$list; do \ 311 if test -f $(srcdir)/../$$p ; then \ 312 cp -p $(srcdir)/../$$p $(DIST_DIR)/; \ 313 fi; \ 314 done 315 316 (cd $(DIST_ROOT); $(COMPRESS);) 317 318#======================================================================== 319# End of user-definable section 320#======================================================================== 321 322#======================================================================== 323# Don't modify the file to clean here. Instead, set the "CLEANFILES" 324# variable in configure.in 325#======================================================================== 326 327clean: 328 -test -z "$(BINARIES)" || rm -f $(BINARIES) 329 -rm -f *.o core *.core 330 -rm -f *.$(OBJEXT) 331 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) 332 333distclean: clean 334 -rm -f *.tab.c 335 -rm -f $(CONFIG_CLEAN_FILES) 336 -rm -f config.cache config.log config.status 337 338#======================================================================== 339# Install binary object libraries. On Windows this includes both .dll and 340# .lib files. Because the .lib files are not explicitly listed anywhere, 341# we need to deduce their existence from the .dll file of the same name. 342# Additionally, the .dll files go into the bin directory, but the .lib 343# files go into the lib directory. On Unix platforms, all library files 344# go into the lib directory. In addition, this will generate the pkgIndex.tcl 345# file in the install location (assuming it can find a usable tclsh8.2 shell) 346# 347# You should not have to modify this target. 348#======================================================================== 349 350install-lib-binaries: 351 @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) 352 @list='$(lib_BINARIES)'; for p in $$list; do \ 353 if test -f $$p; then \ 354 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ 355 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ 356 stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ 357 if test "x$$stub" = "xstub"; then \ 358 echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ 359 $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ 360 else \ 361 echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ 362 $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ 363 fi; \ 364 ext=`echo $$p|sed -e "s/.*\.//"`; \ 365 if test "x$$ext" = "xdll"; then \ 366 lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \ 367 if test -f $$lib; then \ 368 echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \ 369 $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \ 370 fi; \ 371 fi; \ 372 fi; \ 373 done 374 @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 375 if test -f $(srcdir)/$$p; then \ 376 destp=`basename $$p`; \ 377 echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \ 378 $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \ 379 fi; \ 380 done 381 $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir) 382 $(INSTALL_DATA) itclConfig.sh $(DESTDIR)$(pkglibdir) 383 384#======================================================================== 385# Install binary executables (e.g. .exe files) 386# 387# You should not have to modify this target. 388#======================================================================== 389 390install-bin-binaries: 391 @$(INSTALL_DATA_DIR) $(DESTDIR)$(bindir) 392 @list='$(bin_BINARIES)'; for p in $$list; do \ 393 if test -f $$p; then \ 394 echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \ 395 $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \ 396 fi; \ 397 done 398 399.SUFFIXES: .c .$(OBJEXT) 400 401#Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 402# cd $(top_builddir) \ 403# && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status 404 405uninstall-binaries: 406 list='$(lib_BINARIES)'; for p in $$list; do \ 407 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 408 done 409 list='$(PKG_TCL_SOURCES)'; for p in $$list; do \ 410 p=`basename $$p`; \ 411 rm -f $(DESTDIR)$(pkglibdir)/$$p; \ 412 done 413 list='$(bin_BINARIES)'; for p in $$list; do \ 414 rm -f $(DESTDIR)$(bindir)/$$p; \ 415 done 416 417.PHONY: all binaries clean depend distclean doc install libraries test 418 419# Tell versions [3.59,3.63) of GNU make to not export all variables. 420# Otherwise a system limit (for SysV at least) may be exceeded. 421.NOEXPORT: 422