aboutsummaryrefslogtreecommitdiff
path: root/contrib/sqlite3/tea/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/sqlite3/tea/Makefile.in')
-rw-r--r--contrib/sqlite3/tea/Makefile.in1006
1 files changed, 533 insertions, 473 deletions
diff --git a/contrib/sqlite3/tea/Makefile.in b/contrib/sqlite3/tea/Makefile.in
index 5264f89f3c55..5b2ad4c69992 100644
--- a/contrib/sqlite3/tea/Makefile.in
+++ b/contrib/sqlite3/tea/Makefile.in
@@ -1,475 +1,535 @@
-# Makefile.in --
-#
-# This file is a Makefile for Sample TEA Extension. If it has the name
-# "Makefile.in" then it is a template for a Makefile; to generate the
-# actual Makefile, run "./configure", which is a configuration script
-# generated by the "autoconf" program (constructs like "@foo@" will get
-# replaced in the actual Makefile.
-#
-# Copyright (c) 1999 Scriptics Corporation.
-# Copyright (c) 2002-2005 ActiveState Corporation.
-#
-# See the file "license.terms" for information on usage and redistribution
-# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-
-#========================================================================
-# Add additional lines to handle any additional AC_SUBST cases that
-# have been added in a customized configure script.
-#========================================================================
-
-#SAMPLE_NEW_VAR = @SAMPLE_NEW_VAR@
-
-#========================================================================
-# Nothing of the variables below this line should need to be changed.
-# Please check the TARGETS section below to make sure the make targets
-# are correct.
-#========================================================================
-
-#========================================================================
-# The names of the source files is defined in the configure script.
-# The object files are used for linking into the final library.
-# This will be used when a dist target is added to the Makefile.
-# It is not important to specify the directory, as long as it is the
-# $(srcdir) or in the generic, win or unix subdirectory.
-#========================================================================
-
-PKG_SOURCES = @PKG_SOURCES@
-PKG_OBJECTS = @PKG_OBJECTS@
-
-PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
-PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
-
-#========================================================================
-# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
-# this package that need to be installed, if any.
-#========================================================================
-
-PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
-
-#========================================================================
-# This is a list of public header files to be installed, if any.
-#========================================================================
-
-PKG_HEADERS = @PKG_HEADERS@
-
-#========================================================================
-# "PKG_LIB_FILE" refers to the library (dynamic or static as per
-# configuration options) composed of the named objects.
-#========================================================================
-
-PKG_LIB_FILE = @PKG_LIB_FILE@
-PKG_LIB_FILE8 = @PKG_LIB_FILE8@
-PKG_LIB_FILE9 = @PKG_LIB_FILE9@
-PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
-
-lib_BINARIES = $(PKG_LIB_FILE)
-BINARIES = $(lib_BINARIES)
-
-SHELL = @SHELL@
-
-srcdir = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-libdir = @libdir@
-includedir = @includedir@
-datarootdir = @datarootdir@
-runstatedir = @runstatedir@
-datadir = @datadir@
-mandir = @mandir@
-
-DESTDIR =
-
-PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
-pkgdatadir = $(datadir)/$(PKG_DIR)
-pkglibdir = $(libdir)/$(PKG_DIR)
-pkgincludedir = $(includedir)/$(PKG_DIR)
-
-top_builddir = @abs_top_builddir@
-
-INSTALL_OPTIONS =
-INSTALL = @INSTALL@ $(INSTALL_OPTIONS)
-INSTALL_DATA_DIR = @INSTALL_DATA_DIR@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_LIBRARY = @INSTALL_LIBRARY@
-
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-CC = @CC@
-CCLD = @CCLD@
-CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
-CFLAGS_WARNING = @CFLAGS_WARNING@
-EXEEXT = @EXEEXT@
-LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
-MAKE_LIB = @MAKE_LIB@
-MAKE_STUB_LIB = @MAKE_STUB_LIB@
-OBJEXT = @OBJEXT@
-RANLIB = @RANLIB@
-RANLIB_STUB = @RANLIB_STUB@
-SHLIB_CFLAGS = @SHLIB_CFLAGS@
-SHLIB_LD = @SHLIB_LD@
-SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
-STLIB_LD = @STLIB_LD@
-#TCL_DEFS = @TCL_DEFS@
-TCL_BIN_DIR = @TCL_BIN_DIR@
-TCL_SRC_DIR = @TCL_SRC_DIR@
-#TK_BIN_DIR = @TK_BIN_DIR@
-#TK_SRC_DIR = @TK_SRC_DIR@
-
-# Not used, but retained for reference of what libs Tcl required
-#TCL_LIBS = @TCL_LIBS@
-
-#========================================================================
-# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
-# package without installing. The other environment variables allow us
-# to test against an uninstalled Tcl. Add special env vars that you
-# require for testing here (like TCLX_LIBRARY).
-#========================================================================
-
-EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR)
-#EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLLIBPATH = $(top_builddir)
-TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library`
-PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
- PATH="$(EXTRA_PATH):$(PATH)" \
- TCLLIBPATH="$(TCLLIBPATH)"
-
-TCLSH_PROG = @TCLSH_PROG@
-TCLSH = $(TCLSH_ENV) $(PKG_ENV) $(TCLSH_PROG)
-
-#WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
-#WISH_PROG = @WISH_PROG@
-#WISH = $(TCLSH_ENV) $(WISH_ENV) $(PKG_ENV) $(WISH_PROG)
-
-SHARED_BUILD = @SHARED_BUILD@
-
-INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ -I. -I$(srcdir)/..
-#INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
-
-PKG_CFLAGS = @PKG_CFLAGS@
-
-# TCL_DEFS is not strictly need here, but if you remove it, then you
-# must make sure that configure.ac checks for the necessary components
-# that your library may use. TCL_DEFS can actually be a problem if
-# you do not compile with a similar machine setup as the Tcl core was
-# compiled with.
-#DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
-DEFS = @DEFS@ $(PKG_CFLAGS)
-
-# Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
-CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
-CLEANFILES = @CLEANFILES@
-
-CPPFLAGS = @CPPFLAGS@
-LIBS = @PKG_LIBS@ @LIBS@
-AR = @AR@
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) \
- $(CFLAGS_DEFAULT) $(CFLAGS_WARNING) $(SHLIB_CFLAGS) $(CFLAGS)
-
-GDB = gdb
-VALGRIND = valgrind
-VALGRINDARGS = --tool=memcheck --num-callers=8 --leak-resolution=high \
- --leak-check=yes --show-reachable=yes -v
-
-.SUFFIXES: .c .$(OBJEXT)
-
-#========================================================================
-# Start of user-definable TARGETS section
-#========================================================================
-
-#========================================================================
-# TEA TARGETS. Please note that the "libraries:" target refers to platform
-# independent files, and the "binaries:" target includes executable programs and
-# platform-dependent libraries. Modify these targets so that they install
-# the various pieces of your package. The make and install rules
-# for the BINARIES that you specified above have already been done.
-#========================================================================
-
-all: binaries libraries doc
-
-#========================================================================
-# The binaries target builds executable programs, Windows .dll's, unix
-# shared/static libraries, and any other platform-dependent files.
-# The list of targets to build for "binaries:" is specified at the top
-# of the Makefile, in the "BINARIES" variable.
-#========================================================================
-
-binaries: $(BINARIES)
-
-libraries:
-
-#========================================================================
-# Your doc target should differentiate from doc builds (by the developer)
-# and doc installs (see install-doc), which just install the docs on the
-# end user machine when building from source.
-#========================================================================
-
-doc:
- @echo "If you have documentation to create, place the commands to"
- @echo "build the docs in the 'doc:' target. For example:"
- @echo " xml2nroff sample.xml > sample.n"
- @echo " xml2html sample.xml > sample.html"
-
-install: all install-binaries install-libraries install-doc
-
-install-binaries: binaries install-lib-binaries install-bin-binaries
-
-#========================================================================
-# This rule installs platform-independent files, such as header files.
-# The list=...; for p in $$list handles the empty list case x-platform.
-#========================================================================
-
-install-libraries: libraries
- @$(INSTALL_DATA_DIR) "$(DESTDIR)$(includedir)"
- @echo "Installing header files in $(DESTDIR)$(includedir)"
- @list='$(PKG_HEADERS)'; for i in $$list; do \
- echo "Installing $(srcdir)/$$i" ; \
- $(INSTALL_DATA) $(srcdir)/$$i "$(DESTDIR)$(includedir)" ; \
- done;
-
-#========================================================================
-# Install documentation. Unix manpages should go in the $(mandir)
-# directory.
-#========================================================================
-
-install-doc: doc
- @$(INSTALL_DATA_DIR) "$(DESTDIR)$(mandir)/mann"
- @echo "Installing documentation in $(DESTDIR)$(mandir)"
- @list='$(srcdir)/doc/*.n'; for i in $$list; do \
- echo "Installing $$i"; \
- $(INSTALL_DATA) $$i "$(DESTDIR)$(mandir)/mann" ; \
- done
-
-test: binaries libraries
- @echo "SQLite TEA distribution does not include tests"
-
-shell: binaries libraries
- @$(TCLSH) $(SCRIPT)
-
-gdb:
- $(TCLSH_ENV) $(PKG_ENV) $(GDB) $(TCLSH_PROG) $(SCRIPT)
-
-gdb-test: binaries libraries
- $(TCLSH_ENV) $(PKG_ENV) $(GDB) \
- --args $(TCLSH_PROG) `@CYGPATH@ $(srcdir)/tests/all.tcl` \
- $(TESTFLAGS) -singleproc 1 \
- -load "package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
- [list load `@CYGPATH@ $(PKG_LIB_FILE)` [string totitle $(PACKAGE_NAME)]]"
-
-valgrind: binaries libraries
- $(TCLSH_ENV) $(PKG_ENV) $(VALGRIND) $(VALGRINDARGS) $(TCLSH_PROG) \
- `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
-
-valgrindshell: binaries libraries
- $(TCLSH_ENV) $(PKG_ENV) $(VALGRIND) $(VALGRINDARGS) $(TCLSH_PROG) $(SCRIPT)
-
-depend:
-
-#========================================================================
-# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
-# mentioned above. That will ensure that this target is built when you
-# run "make binaries".
-#
-# The $(PKG_OBJECTS) objects are created and linked into the final
-# library. In most cases these object files will correspond to the
-# source files above.
-#========================================================================
-
-$(PKG_LIB_FILE): $(PKG_OBJECTS)
- -rm -f $(PKG_LIB_FILE)
- ${MAKE_LIB}
- $(RANLIB) $(PKG_LIB_FILE)
-
-$(PKG_STUB_LIB_FILE): $(PKG_STUB_OBJECTS)
- -rm -f $(PKG_STUB_LIB_FILE)
- ${MAKE_STUB_LIB}
- $(RANLIB_STUB) $(PKG_STUB_LIB_FILE)
-
-#========================================================================
-# We need to enumerate the list of .c to .o lines here.
-#
-# In the following lines, $(srcdir) refers to the toplevel directory
-# containing your extension. If your sources are in a subdirectory,
-# you will have to modify the paths to reflect this:
-#
-# sample.$(OBJEXT): $(srcdir)/generic/sample.c
-# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/sample.c` -o $@
-#
-# Setting the VPATH variable to a list of paths will cause the makefile
-# to look into these paths when resolving .c to .obj dependencies.
-# As necessary, add $(srcdir):$(srcdir)/compat:....
-#========================================================================
-
-VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win:$(srcdir)/macosx
-
-.c.@OBJEXT@:
- $(COMPILE) -c `@CYGPATH@ $<` -o $@
-
-tclsample.@OBJEXT@: sampleUuid.h
-
-$(srcdir)/manifest.uuid:
- printf "git-" >$(srcdir)/manifest.uuid
- (cd $(srcdir); git rev-parse HEAD >>$(srcdir)/manifest.uuid || \
- (printf "svn-r" >$(srcdir)/manifest.uuid ; \
- svn info --show-item last-changed-revision >>$(srcdir)/manifest.uuid) || \
- printf "unknown" >$(srcdir)/manifest.uuid)
-
-sampleUuid.h: $(srcdir)/manifest.uuid
- echo "#define SAMPLE_VERSION_UUID \\" >$@
- cat $(srcdir)/manifest.uuid >>$@
- echo "" >>$@
-
-#========================================================================
-# Distribution creation
-# You may need to tweak this target to make it work correctly.
-#========================================================================
-
-#COMPRESS = tar cvf $(PKG_DIR).tar $(PKG_DIR); compress $(PKG_DIR).tar
-COMPRESS = tar zcvf $(PKG_DIR).tar.gz $(PKG_DIR)
-DIST_ROOT = /tmp/dist
-DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
-
-DIST_INSTALL_DATA = CPPROG='cp -p' $(INSTALL) -m 644
-DIST_INSTALL_SCRIPT = CPPROG='cp -p' $(INSTALL) -m 755
-
-dist-clean:
- rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR).tar.*
-
-dist: dist-clean $(srcdir)/manifest.uuid
- $(INSTALL_DATA_DIR) $(DIST_DIR)
-
- # TEA files
- $(DIST_INSTALL_DATA) $(srcdir)/Makefile.in \
- $(srcdir)/aclocal.m4 $(srcdir)/configure.ac \
- $(DIST_DIR)/
- $(DIST_INSTALL_SCRIPT) $(srcdir)/configure $(DIST_DIR)/
-
- $(INSTALL_DATA_DIR) $(DIST_DIR)/tclconfig
- $(DIST_INSTALL_DATA) $(srcdir)/tclconfig/README.txt \
- $(srcdir)/manifest.uuid \
- $(srcdir)/tclconfig/tcl.m4 $(srcdir)/tclconfig/install-sh \
- $(DIST_DIR)/tclconfig/
-
- # Extension files
- $(DIST_INSTALL_DATA) \
- $(srcdir)/ChangeLog \
- $(srcdir)/README.sha \
- $(srcdir)/license.terms \
- $(srcdir)/README \
- $(srcdir)/pkgIndex.tcl.in \
- $(DIST_DIR)/
-
- list='demos doc generic library macosx tests unix win'; \
- for p in $$list; do \
- if test -d $(srcdir)/$$p ; then \
- $(INSTALL_DATA_DIR) $(DIST_DIR)/$$p; \
- $(DIST_INSTALL_DATA) $(srcdir)/$$p/* $(DIST_DIR)/$$p/; \
- fi; \
- done
-
- (cd $(DIST_ROOT); $(COMPRESS);)
-
-#========================================================================
-# End of user-definable section
-#========================================================================
-
-#========================================================================
-# Don't modify the file to clean here. Instead, set the "CLEANFILES"
-# variable in configure.ac
-#========================================================================
-
-clean:
- -test -z "$(BINARIES)" || rm -f $(BINARIES)
- -rm -f *.$(OBJEXT) core *.core
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean: clean
- -rm -f *.tab.c
- -rm -f $(CONFIG_CLEAN_FILES)
- -rm -f config.cache config.log config.status
-
-#========================================================================
-# Install binary object libraries. On Windows this includes both .dll and
-# .lib files. Because the .lib files are not explicitly listed anywhere,
-# we need to deduce their existence from the .dll file of the same name.
-# Library files go into the lib directory.
-# In addition, this will generate the pkgIndex.tcl
-# file in the install location (assuming it can find a usable tclsh shell)
-#
-# You should not have to modify this target.
-#========================================================================
-
-install-lib-binaries: binaries
- @$(INSTALL_DATA_DIR) "$(DESTDIR)$(pkglibdir)"
- @list='$(lib_BINARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
- $(INSTALL_LIBRARY) $$p "$(DESTDIR)$(pkglibdir)/$$p"; \
- ext=`echo $$p|sed -e "s/.*\.//"`; \
- if test "x$$ext" = "xdll"; then \
- lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
- if test -f $$lib; then \
- echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
- $(INSTALL_DATA) $$lib "$(DESTDIR)$(pkglibdir)/$$lib"; \
- fi; \
- fi; \
- fi; \
- done
- @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
- if test -f $(srcdir)/$$p; then \
- destp=`basename $$p`; \
- echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
- $(INSTALL_DATA) $(srcdir)/$$p "$(DESTDIR)$(pkglibdir)/$$destp"; \
- fi; \
- done
- @if test "x$(SHARED_BUILD)" = "x1"; then \
- echo " Install pkgIndex.tcl $(DESTDIR)$(pkglibdir)"; \
- $(INSTALL_DATA) pkgIndex.tcl "$(DESTDIR)$(pkglibdir)"; \
+all:
+#
+# Unless this file is named Makefile.in, you are probably looking
+# at an automatically generated/filtered copy and should probably not
+# edit it.
+#
+# This makefile is part of the teaish framework, a tool for building
+# Tcl extensions, conceptually related to TEA/tclconfig but using the
+# Autosetup configuration system instead of the GNU Autotools.
+#
+# A copy of this makefile gets processed for each extension separately
+# and populated with info about how to build, test, and install the
+# extension.
+#
+# Maintenance reminder: this file needs to stay portable with POSIX
+# Make, not just GNU Make. Yes, that's unfortunate because it makes
+# some things impossible (like skipping over swathes of rules when
+# 'make distclean' is invoked).
+#
+
+CC = @CC@
+INSTALL = @BIN_INSTALL@
+INSTALL.noexec = $(INSTALL) -m 0644
+
+#
+# Var name prefixes:
+#
+# teaish. => teaish core
+# tx. => teaish extension
+#
+# Vars with a "tx." or "teaish." prefix are all "public" for purposes
+# of the extension makefile, but the extension must not any "teaish."
+# vars and must only modify "tx." vars where that allowance is
+# specifically noted.
+#
+# Vars with a "teaish__" prefix are "private" and must not be used by
+# the extension makefile. They may change semantics or be removed in
+# any given teaish build.
+#
+tx.name = @TEAISH_NAME@
+tx.version = @TEAISH_VERSION@
+tx.name.pkg = @TEAISH_PKGNAME@
+tx.libdir = @TEAISH_LIBDIR_NAME@
+tx.loadPrefix = @TEAISH_LOAD_PREFIX@
+tx.tcl = @TEAISH_TCL@
+tx.makefile = @TEAISH_MAKEFILE@
+tx.makefile.in = @TEAISH_MAKEFILE_IN@
+tx.dll8.basename = @TEAISH_DLL8_BASENAME@
+tx.dll9.basename = @TEAISH_DLL9_BASENAME@
+tx.dll8 = @TEAISH_DLL8@
+tx.dll9 = @TEAISH_DLL9@
+tx.dll = $(tx.dll$(TCL_MAJOR_VERSION))
+tx.dir = @TEAISH_EXT_DIR@
+@if TEAISH_TM_TCL
+# Input filename for tcl::tm-style module
+tx.tm = @TEAISH_TM_TCL@
+# Target filename for tcl::tm-style installation
+tx.tm.tgt = $(tx.name.pkg)-$(tx.version).tm
+@endif
+
+@if TEAISH_DIST_NAME
+tx.name.dist = @TEAISH_DIST_NAME@
+@else
+tx.name.dist = $(teaish.name)
+@endif
+
+teaish.dir = @abs_top_srcdir@
+#teaish.dir.autosetup = @TEAISH_AUTOSETUP_DIR@
+teaish.makefile = Makefile
+teaish.makefile.in = $(teaish.dir)/Makefile.in
+teaish__auto.def = $(teaish.dir)/auto.def
+
+#
+# Autotools-conventional vars. We don't actually use these in this
+# makefile but some may be referenced by vars imported via
+# tclConfig.sh. They are part of the public API and may be reliably
+# depended on from teaish.make.in.
+#
+bindir = @bindir@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+includedir = @includedir@
+infodir = @infodir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+prefix = @prefix@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+
+
+#
+# Vars derived (mostly) from tclConfig.sh. These may be reliably
+# used from the extension makefile.
+#
+TCLSH = @TCLSH_CMD@
+TCL_CONFIG_SH = @TCL_CONFIG_SH@
+TCL_EXEC_PREFIX = @TCL_EXEC_PREFIX@
+TCL_INCLUDE_SPEC = @TCL_INCLUDE_SPEC@
+TCL_LIBS = @TCL_LIBS@
+TCL_LIB_SPEC = @TCL_LIB_SPEC@
+TCL_MAJOR_VERSION = @TCL_MAJOR_VERSION@
+TCL_MINOR_VERSION = @TCL_MINOR_VERSION@
+TCL_PATCH_LEVEL = @TCL_PATCH_LEVEL@
+TCL_PREFIX = @TCL_PREFIX@
+TCL_SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
+TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
+TCL_VERSION = @TCL_VERSION@
+TCLLIBDIR = @TCLLIBDIR@
+
+#
+# CFLAGS.configure = CFLAGS as known at configure-time.
+#
+# This ordering is deliberate: flags populated via tcl's
+# [teaish-cflags-add] should preceed CFLAGS and CPPFLAGS (which
+# typically come from the ./configure command-line invocation).
+#
+CFLAGS.configure = @SH_CFLAGS@ @TEAISH_CFLAGS@ @CFLAGS@ @CPPFLAGS@ $(TCL_INCLUDE_SPEC)
+#CFLAGS.configure += -DUSE_TCL_STUBS=1
+
+#
+# LDFLAGS.configure = LDFLAGS as known at configure-time.
+#
+# This ordering is deliberate: flags populated via tcl's
+# [teaish-ldflags-add] should precede LDFLAGS (which typically
+# comes from the ./configure command-line invocation).
+#
+LDFLAGS.configure = @TEAISH_LDFLAGS@ @LDFLAGS@
+
+#
+# Linker flags for linkhing a shared library.
+#
+LDFLAGS.shlib = @SH_LDFLAGS@
+
+#
+# The following tx.XYZ vars may be populated/modified by teaish.tcl
+# and/or teaish.make.
+#
+
+#
+# tx.src is the list of source or object files to include in the
+# (single) compiler/linker invocation. This will initially contain any
+# sources passed to [teaish-src-add], but may also be appended to by
+# teaish.make.
+#
+tx.src =@TEAISH_EXT_SRC@
+
+#
+# tx.CFLAGS is typically set by teaish.make, whereas TEAISH_CFLAGS
+# gets set up via the configure script.
+#
+tx.CFLAGS =
+
+#
+# tx.LDFLAGS is typically set by teaish.make, whereas TEAISH_LDFLAGS
+# gets set up via the configure script.
+#
+tx.LDFLAGS =
+
+#
+# The list of 'dist' files may be appended to from teaish.make.in.
+# It can also be set up from teaish.tcl using [teaish-dist-add]
+# and/or [teaish-src-add -dist ...].
+#
+tx.dist.files = @TEAISH_DIST_FILES@
+
+# List of deps which may trigger an auto-reconfigure.
+#
+teaish__autogen.deps = \
+ $(tx.makefile.in) $(teaish.makefile.in) \
+ $(tx.tcl) \
+ @TEAISH_PKGINDEX_TCL_IN@ @TEAISH_TM_TCL_IN@ \
+ @AUTODEPS@
+
+@if TEAISH_MAKEFILE_IN
+$(tx.makefile): $(tx.makefile.in)
+@endif
+
+teaish.autoreconfig = \
+ @TEAISH_AUTORECONFIG@
+
+#
+# Problem: when more than one target can invoke TEAISH_AUTORECONFIG,
+# we can get parallel reconfigures running. Thus, targets which
+# may require reconfigure should depend on...
+#
+config.log: $(teaish__autogen.deps)
+ $(teaish.autoreconfig)
+# ^^^ We would love to skip this when running [dist]clean, but there's
+# no POSIX Make-portable way to do that. GNU Make can.
+.PHONY: reconfigure
+reconfigure:
+ $(teaish.autoreconfig)
+
+$(teaish.makefile): $(teaish__auto.def) $(teaish.makefile.in) \
+ @AUTODEPS@
+
+@if TEAISH_TESTER_TCL_IN
+@TEAISH_TESTER_TCL_IN@:
+@TEAISH_TESTER_TCL@: @TEAISH_TESTER_TCL_IN@
+config.log: @TEAISH_TESTER_TCL@
+@endif
+
+#
+# CC variant for compiling Tcl-using sources.
+#
+CC.tcl = \
+ $(CC) -o $@ $(CFLAGS.configure) $(CFLAGS) $(tx.CFLAGS)
+
+#
+# CC variant for linking $(tx.src) into an extension DLL. Note that
+# $(tx.src) must come before $(LDFLAGS...) for linking to third-party
+# libs to work.
+#
+CC.dll = \
+ $(CC.tcl) $(tx.src) $(LDFLAGS.shlib) \
+ $(LDFLAGS.configure) $(LDFLAGS) $(tx.LDFLAGS) $(TCL_STUB_LIB_SPEC)
+
+@if TEAISH_ENABLE_DLL
+#
+# The rest of this makefile exists solely to support this brief
+# target: the extension shared lib.
+#
+$(tx.dll): $(tx.src) config.log
+ @if [ "x" = "x$(tx.src)" ]; then \
+ echo "Makefile var tx.src (source/object files) is empty" 1>&2; \
+ exit 1; \
fi
+ $(CC.dll)
+
+all: $(tx.dll)
+@endif # TEAISH_ENABLE_DLL
+
+tclsh: $(teaish.makefile) config.log
+ @{ echo "#!/bin/sh"; echo 'exec $(TCLSH) "$$@"'; } > $@
+ @chmod +x $@
+ @echo "Created $@"
+
+#
+# Run the generated test script.
+#
+.PHONY: test-pre test-prepre test-core test test-post test-extension
+test-extension: # this name is reserved for use by teaish.make[.in]
+@if TEAISH_ENABLE_DLL
+test-prepre: $(tx.dll)
+@endif
+@if TEAISH_TESTER_TCL
+test-core.args = @TEAISH_TESTER_TCL@
+@if TEAISH_ENABLE_DLL
+test-core.args += '$(tx.dll)' '$(tx.loadPrefix)'
+@else
+test-core.args += '' ''
+@endif
+test-core.args += @TEAISH_TESTUTIL_TCL@
+test-core: test-pre
+ $(TCLSH) $(test-core.args)
+test-prepre: @TEAISH_TESTER_TCL@
+@else # !TEAISH_TESTER_TCL
+test-prepre:
+@endif # TEAISH_TESTER_TCL
+test-pre: test-prepre
+test-core: test-pre
+test-post: test-core
+test: test-post
-#========================================================================
-# Install binary executables (e.g. .exe files and dependent .dll files)
-# This is for files that must go in the bin directory (located next to
-# wish and tclsh), like dependent .dll files on Windows.
-#
-# You should not have to modify this target, except to define bin_BINARIES
-# above if necessary.
-#========================================================================
-
-install-bin-binaries: binaries
- @$(INSTALL_DATA_DIR) "$(DESTDIR)$(bindir)"
- @list='$(bin_BINARIES)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
- $(INSTALL_PROGRAM) $$p "$(DESTDIR)$(bindir)/$$p"; \
- fi; \
- done
-
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- cd $(top_builddir) \
- && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-uninstall-binaries:
- list='$(lib_BINARIES)'; for p in $$list; do \
- rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
- done
- list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
- p=`basename $$p`; \
- rm -f "$(DESTDIR)$(pkglibdir)/$$p"; \
- done
- list='$(bin_BINARIES)'; for p in $$list; do \
- rm -f "$(DESTDIR)$(bindir)/$$p"; \
- done
-
-.PHONY: all binaries clean depend distclean doc install libraries test
-.PHONY: gdb gdb-test valgrind valgrindshell
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
+#
+# Cleanup rules...
+#
+#.PHONY: clean-pre clean-core clean-post clean-extension
+#
+clean-pre:
+clean-core: clean-pre
+ rm -f $(tx.dll8) $(tx.dll9) tclsh
+clean-post: clean-core
+clean: clean-post
+
+.PHONY: distclean-pre distclean-core distclean-post clean-extension
+distclean-pre: clean
+distclean-core: distclean-pre
+ rm -f Makefile
+ rm -f config.log config.defines.txt
+@if TEAISH_MAKEFILE_IN
+@if TEAISH_MAKEFILE
+ rm -f @TEAISH_MAKEFILE@
+@endif
+@endif
+@if TEAISH_TESTER_TCL_IN
+ rm -f @TEAISH_TESTER_TCL@
+@endif
+@if TEAISH_PKGINDEX_TCL_IN
+ rm -f @TEAISH_PKGINDEX_TCL@
+@endif
+@if TEAISH_PKGINIT_TCL_IN
+ rm -f @TEAISH_PKGINIT_TCL@
+@endif
+@if TEAISH_TEST_TCL_IN
+ rm -f @TEAISH_TEST_TCL@
+@endif
+distclean-post: distclean-core
+distclean: distclean-post
+#
+# The (dist)clean-extension targets are reserved for use by
+# client-side teaish.make.
+#
+# Client code which wants to clean up extra stuff should do so by
+# adding their cleanup target (e.g. clean-extension) as a dependency
+# to the 'clean' target, like so:
+#
+# clean: distclean-extension
+# distclean: distclean-extension
+#
+distclean-extension:
+clean-extension:
+
+#
+# Installation rules...
+#
+@if TEAISH_ENABLE_INSTALL
+.PHONY: install-pre install-core install-post install-test install-prepre install-extension
+install-extension: # this name is reserved for use by teaish.make
+
+@if TEAISH_ENABLE_DLL
+install-prepre: $(tx.dll)
+@else
+install-prepre:
+@endif
+
+@if TEAISH_TM_TCL
+install-core.tmdir = $(DESTDIR)@TEAISH_TCL_TM_DIR@
+@endif
+
+install-pre: install-prepre
+install-core: install-pre
+ @if [ ! -d "$(DESTDIR)$(TCLLIBDIR)" ]; then \
+ set -x; $(INSTALL) -d "$(DESTDIR)$(TCLLIBDIR)"; \
+ fi
+# ^^^^ on some platforms, install -d fails if the target already exists.
+@if TEAISH_ENABLE_DLL
+ $(INSTALL) $(tx.dll) "$(DESTDIR)$(TCLLIBDIR)"
+@endif
+@if TEAISH_PKGINDEX_TCL
+ $(INSTALL.noexec) "@TEAISH_PKGINDEX_TCL@" "$(DESTDIR)$(TCLLIBDIR)"
+@endif
+@if TEAISH_PKGINIT_TCL
+ $(INSTALL.noexec) "@TEAISH_PKGINIT_TCL@" "$(DESTDIR)$(TCLLIBDIR)"
+@endif
+@if TEAISH_TM_TCL
+ @if [ ! -d "$(install-core.tmdir)" ]; then \
+ set -x; $(INSTALL) -d "$(install-core.tmdir)"; \
+ fi
+ $(INSTALL.noexec) "@TEAISH_TM_TCL@" "$(install-core.tmdir)/$(tx.tm.tgt)"
+@endif
+install-test: install-core
+ @echo "Post-install test of [package require $(tx.name.pkg) $(tx.version)]..."; \
+ if echo \
+ 'set c 0; ' \
+ '@TEAISH_POSTINST_PREREQUIRE@' \
+ 'if {[catch {package require $(tx.name.pkg) $(tx.version)}]} {incr c};' \
+ 'exit $$c' \
+ | $(TCLSH) ; then \
+ echo "passed"; \
+ else \
+ echo "FAILED"; \
+ exit 1; \
+ fi
+install-post: install-test
+install: install-post
+
+#
+# Uninstall rules...
+#
+.PHONY: uninstall uninstall-pre uninstall-core uninstall-post uninstall-extension
+uninstall-extension: # this name is reserved for use by teaish.make
+uninstall-pre:
+uninstall-core: uninstall-pre
+@if TEAISH_ENABLE_DLL
+ rm -fr "$(DESTDIR)$(TCLLIBDIR)"
+@endif
+@if TEAISH_TM_TCL
+ rm -f "$(DESTDIR)$(install-core.tmdir)/$(tx.tm.tgt)"
+@endif
+
+uninstall-post: uninstall-core
+ @echo "Uninstalled Tcl extension $(tx.name) $(tx.version)"
+uninstall: uninstall-post
+@endif # TEAISH_ENABLE_INSTALL
+
+@if TEAISH_MAKEFILE_IN
+Makefile: $(tx.makefile.in)
+config.log: $(teaish.makefile.in)
+@endif
+
+#
+# Package archive generation ("dist") rules...
+#
+@if TEAISH_ENABLE_DIST
+@if BIN_TAR
+@if BIN_ZIP
+
+# When installing teaish as part of "make dist", we need to run
+# configure with similar flags to what we last configured with but we
+# must not pass on any extension-specific flags, as those won't be
+# recognized when running in --teaish-install mode, causing
+# the sub-configure to fail.
+dist.flags = --with-tclsh=$(TCLSH)
+dist.reconfig = $(teaish.dir)/configure $(dist.flags)
+
+# Temp dir for dist.zip. Must be different than dist.tgz or else
+# parallel builds may hose the dist.
+teaish__dist.tmp.zip = teaish__dist_zip
+#
+# Make a distribution zip file...
+#
+dist.basename = $(tx.name.dist)-$(tx.version)
+dist.zip = $(dist.basename).zip
+.PHONY: dist.zip dist.zip-core dist.zip-post
+#dist.zip-pre:
+# We apparently can't add a pre-hook here, else "make dist" rebuilds
+# the archive each time it's run.
+$(dist.zip): $(tx.dist.files)
+ @rm -fr $(teaish__dist.tmp.zip)
+ @mkdir -p $(teaish__dist.tmp.zip)/$(dist.basename)
+ @tar cf $(teaish__dist.tmp.zip)/tmp.tar $(tx.dist.files)
+ @tar xf $(teaish__dist.tmp.zip)/tmp.tar -C $(teaish__dist.tmp.zip)/$(dist.basename)
+@if TEAISH_DIST_FULL
+ @$(dist.reconfig) \
+ --teaish-install=$(teaish__dist.tmp.zip)/$(dist.basename) \
+ --t-e-d=$(teaish__dist.tmp.zip)/$(dist.basename) >/dev/null
+@endif
+ @rm -f $(dist.basename)/tmp.tar $(dist.zip)
+ @cd $(teaish__dist.tmp.zip) && zip -q -r ../$(dist.zip) $(dist.basename)
+ @rm -fr $(teaish__dist.tmp.zip)
+ @ls -la $(dist.zip)
+dist.zip-core: $(dist.zip)
+dist.zip-post: dist.zip-core
+dist.zip: dist.zip-post
+dist: dist.zip
+undist-zip:
+ rm -f $(dist.zip)
+undist: undist-zip
+@endif #BIN_ZIP
+
+#
+# Make a distribution tarball...
+#
+teaish__dist.tmp.tgz = teaish__dist_tgz
+dist.tgz = $(dist.basename).tar.gz
+.PHONY: dist.tgz dist.tgz-core dist.tgz-post
+# dist.tgz-pre:
+# see notes in dist.zip
+$(dist.tgz): $(tx.dist.files)
+ @rm -fr $(teaish__dist.tmp.tgz)
+ @mkdir -p $(teaish__dist.tmp.tgz)/$(dist.basename)
+ @tar cf $(teaish__dist.tmp.tgz)/tmp.tar $(tx.dist.files)
+ @tar xf $(teaish__dist.tmp.tgz)/tmp.tar -C $(teaish__dist.tmp.tgz)/$(dist.basename)
+@if TEAISH_DIST_FULL
+ @rm -f $(teaish__dist.tmp.tgz)/$(dist.basename)/pkgIndex.tcl.in; # kludge
+ @$(dist.reconfig) \
+ --teaish-install=$(teaish__dist.tmp.tgz)/$(dist.basename) \
+ --t-e-d=$(teaish__dist.tmp.zip)/$(dist.basename) >/dev/null
+@endif
+ @rm -f $(dist.basename)/tmp.tar $(dist.tgz)
+ @cd $(teaish__dist.tmp.tgz) && tar czf ../$(dist.tgz) $(dist.basename)
+ @rm -fr $(teaish__dist.tmp.tgz)
+ @ls -la $(dist.tgz)
+dist.tgz-core: $(dist.tgz)
+dist.tgz-post: dist.tgz-core
+dist.tgz: dist.tgz-post
+dist: dist.tgz
+undist-tgz:
+ rm -f $(dist.tgz)
+undist: undist-tgz
+@else #!BIN_TAR
+dist:
+ @echo "The dist rules require tar, which configure did not find." 1>&2; exit 1
+@endif #BIN_TAR
+@else #!TEAISH_ENABLE_DIST
+undist:
+dist:
+@if TEAISH_OUT_OF_EXT_TREE
+ @echo "'dist' can only be used from an extension's home dir" 1>&2; \
+ echo "In this case: @TEAISH_EXT_DIR@" 1>&2; exit 1
+@endif
+@endif #TEAISH_ENABLE_DIST
+
+Makefile: @TEAISH_TCL@
+
+@if TEAISH_MAKEFILE_CODE
+#
+# TEAISH_MAKEFILE_CODE may contain literal makefile code, which
+# gets pasted verbatim here. Either [define TEAISH_MAKEFILE_CODE
+# ...] or use [teaish-make-add] to incrementally build up this
+# content.
+#
+# <TEAISH_MAKEFILE_CODE>
+@TEAISH_MAKEFILE_CODE@
+# </TEAISH_MAKEFILE_CODE>
+@endif
+
+@if TEAISH_MAKEFILE
+#
+# TEAISH_MAKEFILE[_IN] defines any extension-specific state this file
+# needs.
+#
+# It must set the following vars if they're not already accounted for
+# via teaish.tcl.
+#
+# - tx.src = list of the extension's source files, being sure to
+# prefix each with $(tx.dir) (if it's in the same dir as the
+# extension) so that out-of-tree builds can find them. Optionally,
+# [define] TEAISH_EXT_SRC or pass them to [teaish-src-add].
+#
+# It may optionally set the following vars:
+#
+# - tx.CFLAGS = CFLAGS/CPPFLAGS. Optionally, [define] TEAISH_CFLAGS
+# or pass them to [teaish-cflags-add].
+#
+# - tx.LDFLAGS = LDFLAGS. Optionally, [define] TEAISH_LDFLAGS or
+# pass them to [teaish-ldflags-add].
+#
+# It may optionally hook into various targets as documented in
+# /doc/extensions.md in the canonical teaish source tree.
+#
+# Interestingly, we don't have to pre-filter teaish.makefile.in - we
+# can just @include it here. That skips its teaish-specific validation
+# though. Hmm.
+#
+# <TEAISH_MAKEFILE>
+Makefile: @TEAISH_MAKEFILE@
+@include @TEAISH_MAKEFILE@
+# </TEAISH_MAKEFILE>
+@endif