|
|
all: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CC = @CC@ |
|
|
INSTALL = @BIN_INSTALL@ |
|
|
INSTALL.noexec = $(INSTALL) -m 0644 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
tx.tm = @TEAISH_TM_TCL@ |
|
|
|
|
|
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.makefile = Makefile |
|
|
teaish.makefile.in = $(teaish.dir)/Makefile.in |
|
|
teaish__auto.def = $(teaish.dir)/auto.def |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 = @SH_CFLAGS@ @TEAISH_CFLAGS@ @CFLAGS@ @CPPFLAGS@ $(TCL_INCLUDE_SPEC) |
|
|
CFLAGS.configure += -DUSE_TCL_STUBS=@TEAISH_USE_STUBS@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDFLAGS.configure = @TEAISH_LDFLAGS@ @LDFLAGS@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LDFLAGS.shlib = @SH_LDFLAGS@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tx.src = @TEAISH_EXT_SRC@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tx.CFLAGS = |
|
|
tx.CPPFLAGS = |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tx.LDFLAGS = |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tx.dist.files = @TEAISH_DIST_FILES@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tx.dist.basename = $(tx.name.dist)-$(tx.version) |
|
|
|
|
|
|
|
|
|
|
|
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@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config.log: $(teaish__autogen.deps) |
|
|
$(teaish.autoreconfig) |
|
|
|
|
|
|
|
|
.PHONY: reconfigure |
|
|
reconfigure: |
|
|
$(teaish.autoreconfig) |
|
|
|
|
|
$(teaish.makefile): $(teaish__auto.def) $(teaish.makefile.in) \ |
|
|
@AUTODEPS@ |
|
|
|
|
|
@if TEAISH_TESTER_TCL_IN |
|
|
@TEAISH_TESTER_TCL_IN@: $(teaish__autogen.deps) |
|
|
config.log: @TEAISH_TESTER_TCL_IN@ |
|
|
@TEAISH_TESTER_TCL@: @TEAISH_TESTER_TCL_IN@ |
|
|
@endif |
|
|
@if TEAISH_TEST_TCL_IN |
|
|
@TEAISH_TEST_TCL_IN@: $(teaish__autogen.deps) |
|
|
config.log: @TEAISH_TEST_TCL_IN@ |
|
|
@TEAISH_TEST_TCL@: @TEAISH_TEST_TCL_IN@ |
|
|
@endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CC.tcl = \ |
|
|
$(CC) -o $@ $(CFLAGS.configure) $(CFLAGS) $(tx.CFLAGS) $(tx.CPPFLAGS) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CC.dll = \ |
|
|
$(CC.tcl) $(tx.src) $(LDFLAGS.shlib) \ |
|
|
$(tx.LDFLAGS) $(LDFLAGS.configure) $(LDFLAGS) $(TCL_STUB_LIB_SPEC) |
|
|
|
|
|
@if TEAISH_ENABLE_DLL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(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 |
|
|
|
|
|
tclsh: $(teaish.makefile) config.log |
|
|
@{ echo "#!/bin/sh"; echo 'exec $(TCLSH) "$$@"'; } > $@ |
|
|
@chmod +x $@ |
|
|
@echo "Created $@" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: test-pre test-prepre test-core test test-post test-extension |
|
|
test-extension: |
|
|
@if TEAISH_ENABLE_DLL |
|
|
test-prepre: $(tx.dll) |
|
|
@endif |
|
|
@if TEAISH_TESTER_TCL |
|
|
teaish.tester.tcl = @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.args ?= |
|
|
test-core: test-pre |
|
|
$(TCLSH) $(test-core.args) $(test.args) |
|
|
test-gdb: $(teaish.tester.tcl) |
|
|
gdb --args $(TCLSH) $(test-core.args) $(test.args) |
|
|
test-vg.flags ?= --leak-check=full -v --show-reachable=yes --track-origins=yes |
|
|
test-vg: $(teaish.tester.tcl) |
|
|
valgrind $(test-vg.flags) $(TCLSH) $(test-core.args) $(test.args) |
|
|
@else |
|
|
test-prepre: |
|
|
@endif |
|
|
test-pre: test-prepre |
|
|
test-core: test-pre |
|
|
test-post: test-core |
|
|
test: test-post |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
distclean-extension: |
|
|
clean-extension: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@if TEAISH_ENABLE_INSTALL |
|
|
.PHONY: install-pre install-core install-post install-test install-prepre install-extension |
|
|
install-extension: |
|
|
|
|
|
@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 |
|
|
|
|
|
@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)]..."; \ |
|
|
set xtra=""; \ |
|
|
if [ x != "x$(DESTDIR)" ]; then \ |
|
|
xtra='set ::auto_path [linsert $$::auto_path 0 [file normalize $(DESTDIR)$(TCLLIBDIR)/..]];'; \ |
|
|
fi; \ |
|
|
if echo \ |
|
|
'set c 0; ' $$xtra \ |
|
|
'@TEAISH_POSTINST_PREREQUIRE@' \ |
|
|
'if {[catch {package require $(tx.name.pkg) $(tx.version)} xc]} {incr c};' \ |
|
|
'if {$$c && "" ne $$xc} {puts $$xc; puts "auto_path=$$::auto_path"};' \ |
|
|
'exit $$c' \ |
|
|
| $(TCLSH) ; then \ |
|
|
echo "passed"; \ |
|
|
else \ |
|
|
echo "FAILED"; \ |
|
|
exit 1; \ |
|
|
fi |
|
|
install-post: install-test |
|
|
install: install-post |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: uninstall uninstall-pre uninstall-core uninstall-post uninstall-extension |
|
|
uninstall-extension: |
|
|
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 |
|
|
|
|
|
@if TEAISH_MAKEFILE_IN |
|
|
Makefile: $(tx.makefile.in) |
|
|
config.log: $(teaish.makefile.in) |
|
|
@endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@if TEAISH_ENABLE_DIST |
|
|
@if BIN_TAR |
|
|
@if BIN_ZIP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dist.flags = --with-tclsh=$(TCLSH) |
|
|
dist.reconfig = $(teaish.dir)/configure $(tx.dist.reconfig-flags) $(dist.flags) |
|
|
|
|
|
|
|
|
|
|
|
teaish__dist.tmp.zip = teaish__dist_zip |
|
|
|
|
|
|
|
|
|
|
|
dist.zip = $(tx.dist.basename).zip |
|
|
.PHONY: dist.zip dist.zip-core dist.zip-post |
|
|
|
|
|
|
|
|
|
|
|
$(dist.zip): $(tx.dist.files) |
|
|
@rm -fr $(teaish__dist.tmp.zip) |
|
|
@mkdir -p $(teaish__dist.tmp.zip)/$(tx.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)/$(tx.dist.basename) |
|
|
@if TEAISH_DIST_FULL |
|
|
@$(dist.reconfig) \ |
|
|
--teaish-install=$(teaish__dist.tmp.zip)/$(tx.dist.basename) \ |
|
|
--t-e-d=$(teaish__dist.tmp.zip)/$(tx.dist.basename) >/dev/null |
|
|
@endif |
|
|
@rm -f $(tx.dist.basename)/tmp.tar $(dist.zip) |
|
|
@cd $(teaish__dist.tmp.zip) && zip -q -r ../$(dist.zip) $(tx.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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
teaish__dist.tmp.tgz = teaish__dist_tgz |
|
|
dist.tgz = $(tx.dist.basename).tar.gz |
|
|
.PHONY: dist.tgz dist.tgz-core dist.tgz-post |
|
|
|
|
|
|
|
|
$(dist.tgz): $(tx.dist.files) |
|
|
@rm -fr $(teaish__dist.tmp.tgz) |
|
|
@mkdir -p $(teaish__dist.tmp.tgz)/$(tx.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)/$(tx.dist.basename) |
|
|
@if TEAISH_DIST_FULL |
|
|
@rm -f $(teaish__dist.tmp.tgz)/$(tx.dist.basename)/pkgIndex.tcl.in; |
|
|
@$(dist.reconfig) \ |
|
|
--teaish-install=$(teaish__dist.tmp.tgz)/$(tx.dist.basename) \ |
|
|
--t-e-d=$(teaish__dist.tmp.zip)/$(tx.dist.basename) >/dev/null |
|
|
@endif |
|
|
@rm -f $(tx.dist.basename)/tmp.tar $(dist.tgz) |
|
|
@cd $(teaish__dist.tmp.tgz) && tar czf ../$(dist.tgz) $(tx.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 |
|
|
dist: |
|
|
@echo "The dist rules require tar, which configure did not find." 1>&2; exit 1 |
|
|
@endif |
|
|
@else |
|
|
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 |
|
|
|
|
|
Makefile: @TEAISH_TCL@ |
|
|
|
|
|
@if TEAISH_MAKEFILE_CODE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@TEAISH_MAKEFILE_CODE@ |
|
|
|
|
|
@endif |
|
|
|
|
|
@if TEAISH_MAKEFILE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Makefile: @TEAISH_MAKEFILE@ |
|
|
@include @TEAISH_MAKEFILE@ |
|
|
|
|
|
@endif |
|
|
|