Index: Makefile.in =================================================================== diff -u -r57d74ca7442169f0317dbbbbac1b479aee30ec21 -re8dc26b2f6831f2a68d6040c5f6fb5380aa5feee --- Makefile.in (.../Makefile.in) (revision 57d74ca7442169f0317dbbbbac1b479aee30ec21) +++ Makefile.in (.../Makefile.in) (revision e8dc26b2f6831f2a68d6040c5f6fb5380aa5feee) @@ -1,961 +1,961 @@ -# 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-2003 ActiveState Corporation. -# Copyright (c) 2001-2007 Uwe Zdun -# Copyright (c) 2001-2016 Gustaf Neumann -# Copyright (c) 2016 Stefan Sobernig -# -# See the file "tcl-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. -#======================================================================== - -NX_VERSION = @PACKAGE_VERSION@ - -src_lib_dir = ${srcdir}/library -src_doc_dir = ${srcdir}/doc -src_test_dir = ${srcdir}/tests -src_app_dir = ${srcdir}/apps -src_generic_dir = ${srcdir}/generic -src_man_dir = ${srcdir}/man -TCL_LIB_SPEC = @TCL_LIB_SPEC@ -subdirs = @subdirs@ -aol_prefix = @aol_prefix@ -stubdir = stubs${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION} - -# Requires native paths -PLATFORM_DIR = `@CYGPATH@ $(srcdir)/@TEA_PLATFORM@` -target_doc_dir = ./doc - -src_lib_dir_native = `@CYGPATH@ ${src_lib_dir}` -src_doc_dir_native = `@CYGPATH@ ${src_doc_dir}` -src_test_dir_native = `@CYGPATH@ ${src_test_dir}` -src_app_dir_native = `@CYGPATH@ ${src_app_dir}` -src_generic_dir_native = `@CYGPATH@ ${src_generic_dir}` - -libdirs = lib nx serialize -libsrc = COPYRIGHT pkgIndex.tcl -appdirs = -appsrc = COPYRIGHT - -CPPCHECK = cppcheck - -# XOTcl subpackage -xotcl_srcdir = ${srcdir}/library/xotcl -xotcl_src_doc_dir = ${xotcl_srcdir}/doc -xotcl_src_app_dir = ${xotcl_srcdir}/apps -xotcl_src_lib_dir = ${xotcl_srcdir}/library -xotcl_src_test_dir = ${xotcl_srcdir}/tests -xotcl_target_doc_dir = ${xotcl_srcdir}/doc - -xotcl_libdirs = comm lib serialize @libdirs_actiweb@ -xotcl_libsrc = COPYRIGHT xotcl2.tcl pkgIndex.tcl -xotcl_appdirs = comm scripts utils @apps_actiweb@ -xotcl_appsrc = COPYRIGHT - -# Documentation source for xotcl-style documentation system -XODOC_SOURCE = \ - $(src_lib_dir)/serialize/serializer.tcl \ - $(xotcl_src_doc_dir)/langRef.xotcl \ - $(xotcl_src_lib_dir)/lib/*.xotcl \ - $(xotcl_src_test_dir)/*.xotcl \ - $(xotcl_src_app_dir)/comm/[flsw]*.xotcl \ - $(xotcl_src_app_dir)/utils/xo-*[a-z0-9] - -#export TCLLIBPATH=. ${srcdir} -mkinstalldirs= mkdir -p -#======================================================================== -# 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. -#======================================================================== - -DTRACE_OBJ = @DTRACE_OBJ@ -DTRACE_HDR = @DTRACE_HDR@ -DTRACE_SRC = @DTRACE_SRC@ - -#======================================================================== -# 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@ ${DTRACE_OBJ} - -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_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ - -lib_BINARIES = $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE) -BINARIES = $(lib_BINARIES) - -SHELL = @SHELL@ - -srcdir = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ - -bindir = @bindir@ -libdir = @libdir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -mandir = @mandir@ -includedir = @includedir@ - -DESTDIR = - -PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) -pkglibdir = $(libdir)/$(PKG_DIR) - -top_builddir = . - -INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_DATA_DIR = ${INSTALL} -d -m 755 - -# INSTALL_OPTIONS = -# INSTALL = $(SHELL) $(srcdir)/config/install-sh -c ${INSTALL_OPTIONS} -# INSTALL_DATA_DIR = ${INSTALL} -d -m 755 -# INSTALL_PROGRAM = ${INSTALL} -m 755 -# INSTALL_DATA = ${INSTALL} -m 644 -# INSTALL_SCRIPT = ${INSTALL_PROGRAM} -# INSTALL_LIBRARY = ${INSTALL_DATA} - -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -CC = @CC@ -CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ -# useful for debugging: -#CFLAGS_DEFAULT = -pedantic -g -std=c99 -DTCL_NO_DEPRECATED -Wconversion -Wsign-conversion -Wfloat-conversion -Wsign-compare -CFLAGS_CONVERSION= -Wconversion -Wsign-conversion -Wsign-compare -CFLAGS_DEFINITION= -Wwrite-strings -Wextra -Wdeclaration-after-statement -Wendif-labels -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wpacked -Wredundant-decls -CFLAGS_TIDY = -Wmissing-braces -Wmissing-declarations -Wundef -Wunreachable-code -Wswitch-enum -Wpointer-arith -Wold-style-definition -Wmissing-format-attribute -Wformat-security -#CFLAGS_DEFAULT = -pedantic -g -std=c99 -DTCL_NO_DEPRECATED $(CFLAGS_CONVERSION) $(CFLAGS_DEFINITION) $(CFLAGS_TIDY) -CFLAGS_WARNING = @CFLAGS_WARNING@ -CLEANFILES = @CLEANFILES@ -EXEEXT = @EXEEXT@ -LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ -MAKE_LIB = @MAKE_LIB@ -MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ -MAKE_STATIC_LIB = @MAKE_STATIC_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@ -# -DTRACE = dtrace - -ifeq ($(DTPLITE),) - DTPLITE=dtplite -else - # Do nothing, use the environment variable as is. -endif - -ifeq ($(ASCIIDOC),) - ASCIIDOC = PATH=$(src_app_dir_native)/utils:$(PATH) \ - asciidoc \ - -f $(src_app_dir_native)/utils/asciidoc.conf -else - # Do nothing, use the environment variable as is. -endif - - -# -# Not used, but retained for reference of what libs Tcl required -TCL_LIBS = @TCL_LIBS@ - -xotcl_pkglibdir = $(pkglibdir)/xotcl - -#======================================================================== -# 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) -TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ - @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ - PATH="$(EXTRA_PATH):$(PATH)" \ - TCLLIBPATH="$(top_builddir) ${srcdir} $(TCLLIBPATH)" \ - TCL_PKG_PREFER_LATEST=1 -TCLSH_PROG = @TCLSH_PROG@ -TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) -#TCLSH = $(TCLSH_ENV) LD_PRELOAD="$(srcdir)/$(PKG_LIB_FILE)" valgrind --log-fd=9 --leak-check=full --track-origins=yes --show-possibly-lost=no $(TCLSH_PROG) 9>>valgrind.out -SHARED_BUILD = @SHARED_BUILD@ - -INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @NSF_BUILD_INCLUDE_SPEC@ -EXTRA_CFLAGS = @PKG_CFLAGS@ - -# TCL_DEFS is not strictly needed here, but if you remove it, then you -# must make sure that configure.in 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@ $(EXTRA_CFLAGS) -DEFS = @DEFS@ $(EXTRA_CFLAGS) - -CONFIG_CLEAN_FILES = @CONFIG_CLEAN_FILES@ - -CPPFLAGS = @CPPFLAGS@ -LIBS = @PKG_LIBS@ @LIBS@ -AR = @AR@ -CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - -#======================================================================== -# Start of user-definable TARGETS section -#======================================================================== - -EXAMPLE_SCRIPTS = \ - $(src_doc_dir)/example-scripts/bagel.html \ - $(src_doc_dir)/example-scripts/container.html \ - $(src_doc_dir)/example-scripts/per-object-mixins.html \ - $(src_doc_dir)/example-scripts/tutorial-properties.html \ - $(src_doc_dir)/example-scripts/rosetta-abstract-type.html \ - $(src_doc_dir)/example-scripts/rosetta-classes.html \ - $(src_doc_dir)/example-scripts/rosetta-constraint-genericity.html \ - $(src_doc_dir)/example-scripts/rosetta-delegates.html \ - $(src_doc_dir)/example-scripts/rosetta-polymorphism.html \ - $(src_doc_dir)/example-scripts/rosetta-serialization.html \ - $(src_doc_dir)/example-scripts/rosetta-singleton.html \ - $(src_doc_dir)/example-scripts/rosetta-sudoku.html \ - $(src_doc_dir)/example-scripts/rosetta-unknown-method.html \ - $(src_doc_dir)/example-scripts/ruby-mixins.html \ - $(src_doc_dir)/example-scripts/starmethod.html \ - $(src_doc_dir)/example-scripts/tk-horse-race.html \ - $(src_doc_dir)/example-scripts/tk-locomotive.html \ - $(src_doc_dir)/example-scripts/tk-ludo.html \ - $(src_doc_dir)/example-scripts/tk-geo.html \ - $(src_doc_dir)/example-scripts/tk-mini.html \ - $(src_doc_dir)/example-scripts/tk-spread.html \ - $(src_doc_dir)/example-scripts/traits-composite.html \ - $(src_doc_dir)/example-scripts/traits-simple.html \ - $(src_doc_dir)/example-scripts/rosetta-tokenizer.html \ - $(src_doc_dir)/example-scripts/rosetta-tree.html \ - $(src_doc_dir)/example-scripts/rosetta-multiple-distinct.html \ - $(src_doc_dir)/example-scripts/rosetta-add-variable.html \ - $(src_doc_dir)/example-scripts/rosetta-clone.html \ - $(src_doc_dir)/example-scripts/rosetta-multiple-inheritance.html \ - $(src_doc_dir)/example-scripts/rosetta-single-inheritance.html - -%.html : %.tcl - $(TCLSH) $(src_app_dir_native)/utils/source-doc-beautifier.tcl $< - $(ASCIIDOC) $*.txt - -#======================================================================== -# 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 end - -#======================================================================== -# 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) pkgIndex.tcl - @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ - for dir in $$dirs ; do \ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - done; fi; - -libraries: libraries-pkgindex - @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ - for dir in $$dirs ; do \ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - done; fi; - -cppcheck: - $(CPPCHECK) --enable=all generic/*.c $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) \ - -DNDEBUG=1 -I/usr/include -D__x86_64__ - -etags: - etags --language=none \ - --regex='/[ \t]*\(proc\)[ \t]+\([^ \t]+\)/\2/' \ - --regex='/[ \t]*[:]?\(public \|protected \|private \|\)[ \t]*\(method\|object method\)[ \t]+\([^ \t]+\)/\3/' \ - --regex='/[ \t]*[a-zA-Z:0-9]+[^ \t]\(public \|protected \|private \|\)[ \t]*\(method\)[ \t]+\([^ \t]+\)/\3/' \ - --regex='/[ \t]*[a-zA-Z:0-9]+[^ \t]+\(proc\|instproc\)[ \t]+\([^ \t]+\)/\3/' \ - `find . -name \*.tcl -or -name \*.test` - -libraries-pkgindex: pkgIndex.tcl - $(TCLSH) $(src_lib_dir_native)/lib/mkIndex.tcl -dir $(src_lib_dir_native) - - -full-doc: doc pdfdoc example-doc - -# use language reference as sample file to trigger generation of documentation files -#doc: $(xotcl_target_doc_dir)/langRef-xotcl.html - -# for now, just the two doc files -doc: - $(ASCIIDOC) $(src_doc_dir)/next-migration.txt - $(ASCIIDOC) $(src_doc_dir)/next-tutorial/next-tutorial.txt - -pdfdoc: - (cd $(src_doc_dir); prince --javascript --style=nx-small.css next-migration.html -o next-migration.pdf) - (cd $(src_doc_dir)/next-tutorial; prince --javascript --style=../nx.css next-tutorial.html -o next-tutorial.pdf) - -example-doc: $(EXAMPLE_SCRIPTS) - -$(xotcl_target_doc_dir)/langRef-xotcl.html: pkgIndex.tcl $(xotcl_src_doc_dir)/langRef.xotcl $(XODOC_SOURCE) - @docs=""; \ - for i in $(XODOC_SOURCE); do docs="$$docs `@CYGPATH@ $$i`"; done; \ - $(TCLSH) $(xotcl_src_lib_dir)/lib/makeDoc.xotcl \ - $(xotcl_target_doc_dir) $$docs - -pdf: - -(cd $(src_doc_dir); htmldoc --webpage --format pdf14 --title \ - -f tutorial.pdf tutorial.html ) - -(cd $(src_doc_dir); htmldoc --webpage --format pdf14 \ - -f langRef-xotcl.pdf langRef-xotcl.html ) - -NX_MAN3 = \ - $(src_doc_dir)/Object.man \ - $(src_doc_dir)/Class.man \ - $(src_doc_dir)/configure.man \ - $(src_doc_dir)/current.man \ - $(src_doc_dir)/next.man - -NX_MAN1 = \ - $(src_doc_dir)/nxsh.man \ - $(src_doc_dir)/xotclsh.man \ - $(src_doc_dir)/nxwish.man \ - $(src_doc_dir)/xowish.man - -man: man-html man-nroff man-pdf - -man-html: $(NX_MAN3:%.man=%.html) -$(src_doc_dir)/%.html: $(src_doc_dir)/%.man - @for m in $(?F) ; do \ - echo " Generating html manpage from $$m" ; \ - (cd $(src_doc_dir); $(DTPLITE) -style man.css -o . html $$m) ; \ - done; - -man-nroff : man1 man3 -man1 : $(NX_MAN1:%.man=%.1) -$(src_doc_dir)/%.1 : $(src_doc_dir)/%.man - @for m in $(?F) ; do \ - echo " Generating nroff manpage (Section 1) from $$m" ; \ - (cd $(src_doc_dir); $(DTPLITE) -ext 1 -o . nroff $$m) ; \ - done; - -man3: $(NX_MAN3:%.man=%.3) -$(src_doc_dir)/%.3 : $(src_doc_dir)/%.man - @for m in $(?F) ; do \ - echo " Generating nroff manpage (Section 3) from $$m" ; \ - (cd $(src_doc_dir); $(DTPLITE) -ext 3 -o . nroff $$m) ; \ - done; - -man-pdf: $(NX_MAN3:%.man=%.pdf) -$(src_doc_dir)/%.pdf : $(src_doc_dir)/%.html - @for m in $(?F) ; do \ - echo " Generating pdf manpage for $$m" ; \ - (cd $(src_doc_dir); prince -s man-princexml.css $$m) ; \ - done; - -install: install-binaries install-shells install-libraries install-doc install-xotcl-shells install-xotcl-libraries - @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ - for dir in $$dirs ; do \ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - done; fi; - -install-binaries: binaries install-lib-binaries install-bin-binaries install-pkgIndex - -install-aol: install-binaries install-libraries install-xotcl-libraries - @if test -d $(DESTDIR)/$(aol_prefix)/modules/tcl/; then \ - $(INSTALL) $(src_generic_dir)/aol-xotcl.tcl \ - $(DESTDIR)/$(aol_prefix)/modules/tcl/xotcl.tcl ; \ - else \ - $(INSTALL) $(src_generic_dir)/aol-xotcl.tcl \ - $(DESTDIR)/$(aol_prefix)/tcl/xotcl.tcl ; \ - fi; - -#======================================================================== -# This rule installs platform-independent files, such as header files. -#======================================================================== -install-libraries: libraries - @$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir) - @echo "Installing header files in $(DESTDIR)$(includedir)" - @for i in $(PKG_HEADERS) ; do \ - echo " Installing $$i" ; \ - $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ - done; - @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) - @echo "Installing Libraries to $(DESTDIR)$(pkglibdir)/" - @for i in $(libdirs) ; do \ - echo " Installing $$i/" ; \ - rm -rf $(DESTDIR)$(pkglibdir)/$$i ; \ - mkdir -p $(DESTDIR)$(pkglibdir)/$$i; \ - chmod 755 $(DESTDIR)$(pkglibdir)/$$i; \ - for j in $(src_lib_dir)/$$i/*.*tcl ; do \ - $(INSTALL_DATA) $$j $(DESTDIR)$(pkglibdir)/$$i/; \ - done; \ - done; - @for i in $(libsrc) ; do \ - echo " Installing $$i" ; \ - rm -rf $(DESTDIR)$(pkglibdir)/$$i ; \ - $(INSTALL_DATA) $(src_lib_dir)/$$i $(DESTDIR)$(pkglibdir)/$$i ; \ - done; - @mkdir -p $(DESTDIR)$(libdir)/tcl8/site-tcl - @for i in $(srcdir)/tcl8/site-tcl/*.tm ; do \ - if test -f $$i; then \ - echo " Installing module $$i in $(DESTDIR)$(libdir)/tcl8/site-tcl" ; \ - $(INSTALL_DATA) $$i $(DESTDIR)$(libdir)/tcl8/site-tcl/; \ - fi; \ - done; - @echo " Installing pkgIndex.tcl for nsf in $(DESTDIR)$(pkglibdir)/pkgIndex.tcl" - @echo "" >> $(DESTDIR)$(pkglibdir)/pkgIndex.tcl - @cat $(srcdir)/unix/pkgIndex.unix >> $(DESTDIR)$(pkglibdir)/pkgIndex.tcl - @$(INSTALL_DATA) $(srcdir)/nsfConfig.sh $(DESTDIR)$(libdir)/ - -install-xotcl-libraries: install-libraries - @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) - @echo "Installing XOTcl Libraries to $(DESTDIR)$(xotcl_pkglibdir)/" - @rm -rf $(DESTDIR)$(xotcl_pkglibdir) - @mkdir -p $(DESTDIR)$(xotcl_pkglibdir) - @chmod 755 $(DESTDIR)$(xotcl_pkglibdir) - @for i in $(xotcl_libdirs) ; do \ - echo " Installing library $$i/" ; \ - rm -rf $(DESTDIR)$(xotcl_pkglibdir)/$$i ; \ - mkdir -p $(DESTDIR)$(xotcl_pkglibdir)/$$i; \ - chmod 755 $(DESTDIR)$(xotcl_pkglibdir)/$$i; \ - for j in $(xotcl_src_lib_dir)/$$i/*.*tcl ; do \ - $(INSTALL_DATA) $$j $(DESTDIR)$(xotcl_pkglibdir)/$$i/; \ - done; \ - done; - @for i in $(xotcl_libsrc) ; do \ - echo " Installing $$i" ; \ - rm -rf $(DESTDIR)$(xotcl_pkglibdir)/$$i ; \ - $(INSTALL_DATA) $(xotcl_src_lib_dir)/$$i $(DESTDIR)$(xotcl_pkglibdir)/$$i ; \ - done; - -install-xotcl-shells: xotclsh xowish - $(INSTALL_PROGRAM) xotclsh $(DESTDIR)$(bindir) - $(INSTALL_PROGRAM) xowish $(DESTDIR)$(bindir) - -install-xotcl-apps: install-xotcl-libraries - @echo "Installing Applications to $(DESTDIR)$(xotcl_pkglibdir)/apps/" - @for i in $(xotcl_appdirs) ; do \ - echo " Installing apps $$i/" ; \ - rm -rf $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i ; \ - mkdir -p $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i; \ - chmod 755 $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i; \ - for j in $(src_app_dir)/$$i/* ; do \ - if test -d $$j; then \ - mkdir -p $(DESTDIR)$(xotcl_pkglibdir)/$$j; \ - chmod 755 $(DESTDIR)$(xotcl_pkglibdir)/$$j; \ - for k in $$j/* ; do \ - $(INSTALL) $$k $(DESTDIR)$(xotcl_pkglibdir)/$$j ; \ - done; \ - else \ - $(INSTALL) $$j $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i/; \ - fi; \ - done; \ - done; - @for i in $(xotcl_appsrc) ; do \ - echo " Installing $$i" ; \ - rm -rf $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i ; \ - $(INSTALL_DATA) $(src_app_dir)/$$i $(DESTDIR)$(xotcl_pkglibdir)/apps ; \ - done; - @rm -rf $(DESTDIR)$(xotcl_pkglibdir)/store/XOTclGdbm - @rm -rf $(DESTDIR)$(xotcl_pkglibdir)/store/XOTclSdbm - @rm -rf $(DESTDIR)$(xotcl_pkglibdir)/xml/TclExpat-1.1 - -#======================================================================== -# Install documentation. Unix manpages should go in the $(DESTDIR)$(mandir) -# directory. -#======================================================================== - -# install-doc: $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/mann -# @(cd $(src_man_dir)/ ; \ -# for i in *.1; do \ -# echo "Installing $$i"; \ -# rm -f $(DESTDIR)$(mandir)/man1/$$i; \ -# sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ -# $$i > $(DESTDIR)$(mandir)/man1/$$i; \ -# chmod 444 $(DESTDIR)$(mandir)/man1/$$i; \ -# done) - -install-doc: - @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/man1 - @echo "Installing documentation in $(DESTDIR)$(mandir)" - @list='$(srcdir)/doc/*.1'; for i in $$list; do \ - echo "Installing $$i"; \ - $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man1 ; \ - done - @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/man3 - @list='$(srcdir)/doc/*.3'; for i in $$list; do \ - echo "Installing $$i"; \ - $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man3 ; \ - done - -shell: binaries libraries - @$(TCLSH) $(SCRIPT) - -gdb: - $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) - -lldbtest: - $(MAKE) "TCLSH_PROG=lldb -b -o run -- $(TCLSH_PROG)" test - -test: binaries libraries test-core test-xotcl test-http @test_actiweb@ - @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ - for dir in $$dirs ; do \ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - done; fi - $(TCLSH) $(src_test_dir_native)/summary.tcl -title NX+XOTcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - -test-nohttp: binaries libraries test-core test-xotcl - -TESTLOG = ./__test.log -TESTFLAGS = -testlog $(TESTLOG) - -test-summary: - $(TCLSH) $(src_test_dir_native)/summary.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - -test-core: - rm -f $(TESTLOG) - $(TCLSH) $(src_test_dir_native)/object-system.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/destroy.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/methods.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/method-parameter.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/nsf-cmd.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/accessor.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/cget.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/properties.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/var-access.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/varresolution.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/info-method.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/submethods.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/info-variable.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/disposition.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/volatile.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/parameters.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/returns.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/method-require.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/interceptor-slot.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/alias.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/double-alias.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/protected.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/forward.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/mixinof.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/tcl86.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/contains.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/tcloo.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/interp.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/serialize.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/plain-object-method.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/class-method.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/linearization.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/traits.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/shells.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_test_dir_native)/msgcat.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/bagel.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/container.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-abstract-type.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-classes.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-constraint-genericity.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-delegates.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-polymorphism.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-serialization.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-singleton.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-unknown-method.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/ruby-mixins.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/traits-composite.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/traits-simple.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-tokenizer.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-tree.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-multiple-distinct.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-add-variable.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-clone.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-multiple-inheritance.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-single-inheritance.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - -test-xotcl: - $(TCLSH) $(xotcl_src_test_dir)/testo.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(xotcl_src_test_dir)/speedtest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(xotcl_src_test_dir)/testx.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(xotcl_src_test_dir)/slottest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) - -test-http: - $(TCLSH) $(xotcl_src_test_dir)/xocomm.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - -test-actiweb: - $(TCLSH) $(xotcl_src_test_dir)/actiweb.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(xotcl_src_test_dir)/persistence.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(xotcl_src_test_dir)/UNIVERSAL.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - $(TCLSH) $(xotcl_src_test_dir)/xoRDF.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) - @rm -rf receiver - -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 - -.c.@OBJEXT@: - $(COMPILE) -c `@CYGPATH@ $<` -o $@ - -#======================================================================== -# next shells -#======================================================================== - -pkgIndex.tcl: $(PKG_LIB_FILE) - @echo package ifneeded nsf $(PACKAGE_VERSION) \"load [list [file join \$$dir . $(PKG_LIB_FILE)] nsf]\; package provide nsf $(PACKAGE_VERSION)\" > pkgIndex.tcl - -install-pkgIndex: -# @echo package ifneeded nsf $(PACKAGE_VERSION) [list load [file join \$$dir .. "$(PKG_LIB_FILE)"] nsf] > "$(pkglibdir)/pkgIndex.tcl" - -nxsh nxwish xotclsh xowish: - $(TCLSH_PROG) $(top_builddir)/build.tcl $@ $@ - chmod +x $@ - - -#nxsh: tclAppInit.o $(PKG_OBJECTS) $(CONDITIONAL_STUB_OBJECTS) -# $(CC) -rdynamic -o $@ tclAppInit.o \ -# $(CFLAGS) $(TCL_LIB_SPEC) \ -# $(DMALLOC_LIB) $(CONDITIONAL_STUB_OBJECTS) - -#xowish: tkAppInit.o $(PKG_OBJECTS) $(CONDITIONAL_STUB_OBJECTS) -# $(CC) -rdynamic -o $@ tkAppInit.o \ -# $(PKG_OBJECTS) \ -# $(CFLAGS) $(TCL_LIB_SPEC) $(TK_LIB_SPEC) \ -# $(DMALLOC_LIB) $(CONDITIONAL_STUB_OBJECTS) - -install-shells: nxsh nxwish - $(INSTALL_PROGRAM) nxsh $(DESTDIR)$(bindir) - $(INSTALL_PROGRAM) nxwish $(DESTDIR)$(bindir) - -#======================================================================== -# We need to enumerate the list of .c to .o lines here. -# Unfortunately, there does not seem to be any other way to do this -# in a Makefile-independent way. We can't use VPATH because it picks up -# object files that may be located in the source directory. -# -# 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: -# -# exampleA.$(OBJEXT): $(srcdir)/src/win/exampleA.c -# $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/win/exampleA.c` -o $@ -#======================================================================== - -$(src_generic_dir)/predefined.h: $(src_generic_dir)/mk_predefined.tcl $(src_generic_dir)/predefined_part1.tcl $(src_generic_dir)/predefined_part2.tcl - (cd $(src_generic_dir); $(TCLSH) mk_predefined.tcl predefined_part1.tcl predefined_part2.tcl > predefined.h) - -$(src_generic_dir)/nsfAPI.h: $(src_generic_dir)/gentclAPI.tcl $(src_generic_dir)/nsfAPI.decls - $(TCLSH) $(src_generic_dir)/gentclAPI.tcl $(src_generic_dir)/nsfAPI.decls > $(src_generic_dir)/nsfAPI.h - -aolstub.$(OBJEXT): $(src_generic_dir)/aolstub.c $(PKG_HEADERS) -nsf.$(OBJEXT): $(src_generic_dir)/nsf.c $(src_generic_dir)/predefined.h $(src_generic_dir)/nsfAccessInt.h $(src_generic_dir)/nsfAPI.h $(PKG_HEADERS) $(src_generic_dir)/nsfStack.c $(src_generic_dir)/asm/nsfAssemble.c $(src_generic_dir)/asm/nsfAsmExecuteCallThreading.c $(src_generic_dir)/asm/nsfAsmExecuteLabelThreading.c $(src_generic_dir)/asm/nsfAsmAssemble.c $(DTRACE_HDR) -nsfDebug.$(OBJEXT): $(src_generic_dir)/nsfDebug.c $(PKG_HEADERS) -nsfError.$(OBJEXT): $(src_generic_dir)/nsfError.c $(PKG_HEADERS) -nsfMetaData.$(OBJEXT): $(src_generic_dir)/nsfMetaData.c $(PKG_HEADERS) -nsfObj.$(OBJEXT): $(src_generic_dir)/nsfObj.c $(PKG_HEADERS) -nsfObjectData.$(OBJEXT): $(src_generic_dir)/nsfObjectData.c $(PKG_HEADERS) -nsfPointer.$(OBJEXT): $(src_generic_dir)/nsfPointer.c $(PKG_HEADERS) -nsfEnumerationType.$(OBJEXT): $(src_generic_dir)/nsfEnumerationType.c $(PKG_HEADERS) -nsfProfile.$(OBJEXT): $(src_generic_dir)/nsfProfile.c $(PKG_HEADERS) -nsfShadow.$(OBJEXT): $(src_generic_dir)/nsfShadow.c $(PKG_HEADERS) -$(stubdir)/nsfStubInit.$(OBJEXT): $(PKG_HEADERS) -nsfStubLib.$(OBJEXT): $(src_generic_dir)/nsfStubLib.c $(PKG_HEADERS) -nsfUtil.$(OBJEXT): $(src_generic_dir)/nsfUtil.c $(PKG_HEADERS) - -# -# Target to regenerate header files and stub files from the *.decls tables. -# - -TCL_SRC_DIR_85=/usr/local/src/tcl8.5.19 -TCL_SRC_DIR_86=/usr/local/src/tcl8.6.8 -TCL_SRC_DIR_87=/usr/local/src/core-8-branch - -genstubs: $(src_generic_dir)/nsf.decls - mkdir -p $(src_generic_dir)/stubs8.5 - tclsh8.5 $(TCL_SRC_DIR_85)/tools/genStubs.tcl $(src_generic_dir)/stubs8.5 \ - $(src_generic_dir)/nsf.decls $(src_generic_dir)/nsfInt.decls - mkdir -p $(src_generic_dir)/stubs8.6 - tclsh8.6 $(TCL_SRC_DIR_86)/tools/genStubs.tcl $(src_generic_dir)/stubs8.6 \ - $(src_generic_dir)/nsf.decls $(src_generic_dir)/nsfInt.decls - mkdir -p $(src_generic_dir)/stubs8.7 - tclsh8.7 $(TCL_SRC_DIR_87)/tools/genStubs.tcl $(src_generic_dir)/stubs8.7 \ - $(src_generic_dir)/nsf.decls $(src_generic_dir)/nsfInt.decls - -getstubs: - $(TCLSH) $(src_app_dir_native)/utils/getstubs.tcl $(src_generic_dir) - -# -# Target to check that all exported functions have an entry in the stubs -# tables. -# - -checkstubs: - -@for i in `nm -p $(PKG_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \ - | sort -n`; do \ - match=0; \ - for j in $(TCL_DECLS); do \ - if [ `grep -c $$i $$j` -gt 0 ]; then \ - match=1; \ - fi; \ - done; \ - if [ $$match -eq 0 ]; then echo $$i; fi \ - done - -# DTrace support - -$(DTRACE_HDR): $(DTRACE_SRC) - $(DTRACE) -h $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC) - -$(DTRACE_OBJ): $(DTRACE_SRC) $(TCL_OBJS) $(DTRACE_HDR) - $(DTRACE) -G $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC) $(TCL_OBJS) - - -#======================================================================== -# End of user-definable section -#======================================================================== - -#======================================================================== -# Don't modify the file to clean here. Instead, set the "CLEANFILES" -# variable in configure.in -#======================================================================== - -cleandoc: - -rm -rf $(xotcl_target_doc_dir)/*-xotcl.html - -clean: cleandoc - -rm -rf $(BINARIES) $(CLEANFILES) generic/stub*/*.o ./receiver $(TESTLOG) - find ${srcdir} -type f -name \*~ -exec rm \{} \; - @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ - for dir in $$dirs ; do \ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - done; fi - -distclean: clean - -rm -rf $(CONFIG_CLEAN_FILES) - -rm -f config.cache config.log config.status - @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ - for dir in $$dirs ; do \ - if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ - done; fi - -#======================================================================== -# 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. -# -# A manual generation of the pkgIndex files via tclsh should look like -# pkg_mkIndex -direct -verbose library/lib *tcl -# -# 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: - @mkdir -p $(DESTDIR)$(pkglibdir) - @list='$(lib_BINARIES)'; for p in $$list; do \ - if test -f $$p; then \ - echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ - $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ - stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ - if test "x$$stub" = "xstub"; then \ - echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ - $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ - else \ - echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ - $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ - ln -s $(DESTDIR)$(pkglibdir)/$$p $(DESTDIR)$(libdir)/$$p; \ - fi; \ - 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 - - -#======================================================================== -# 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: - @$(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 - -.SUFFIXES: .c .$(OBJEXT) - -#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 - -end: - @echo "" - @echo "***************************************************************" - @echo " Make completed. In order to test the Next Scripting Framework," - @echo " invoke:" - @echo " make test" - @echo "" - @echo " To install, use:" - @echo " make install" - @echo "" - @echo " To install for AOLserver 4.x, use:" - @echo " make install-aol" - @echo "" - @echo " In order to invoke NX interactively (before install), use:" - @echo " export TCLLIBPATH=\"$(TCLLIBPATH)\" TCL8_5_TM_PATH=\"$(TCLLIBPATH)\"/tcl8/site-tcl" - @echo " and" - @echo " @TCLSH_PROG@" - @echo " package require nx" - @echo "***************************************************************" - -RPMSOURCES=/usr/src/redhat/SOURCES -RPMSPECS=/usr/src/redhat/SPECS - -rpm: - @if test ! -d $(RPMSOURCES); then mkdir -p $(RPMSOURCES); fi - @if test ! -d $(RPMSPECS); then mkdir -p $(RPMSPECS); fi - cp unix/xotcl.spec $(RPMSPECS)/xotcl-$(PACKAGE_VERSION).spec - make tar - cp ../xotcl-$(PACKAGE_VERSION).tar.gz $(RPMSOURCES) - rpmbuild -ba $(RPMSPECS)/xotcl-$(PACKAGE_VERSION).spec - -bin-tar: - (cd ..; tar zcvf xotcl-$(PACKAGE_VERSION)-bin-linux-i686-glibc.tar.gz \ - `find \ - $(prefix)/bin/nx*sh \ - $(prefix)/bin/xotcl*sh \ - $(prefix)/lib/nsf* \ - $(prefix)/lib/libnsf* \ - $(prefix)/include/nsf*.h \ - $(DESTDIR)$(pkglibdir) $(prefix)/man/man1/nsf* \ - -type f -o -type l | fgrep -v CVS | fgrep -v SCCS | fgrep -v .junk| fgrep -v .db | fgrep -v "~" | fgrep -v "#" | fgrep -v /receiver/` \ - ) - -tar: libraries-pkgindex - echo @NSF_COMMIT@ > COMMIT - sh $(srcdir)/tclconfig/mktar.sh - -.PHONY: all binaries clean depend distclean doc install libraries \ - test test-core test-actiweb - -# 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: +# 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-2003 ActiveState Corporation. +# Copyright (c) 2001-2007 Uwe Zdun +# Copyright (c) 2001-2016 Gustaf Neumann +# Copyright (c) 2016 Stefan Sobernig +# +# See the file "tcl-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. +#======================================================================== + +NX_VERSION = @PACKAGE_VERSION@ + +src_lib_dir = ${srcdir}/library +src_doc_dir = ${srcdir}/doc +src_test_dir = ${srcdir}/tests +src_app_dir = ${srcdir}/apps +src_generic_dir = ${srcdir}/generic +src_man_dir = ${srcdir}/man +TCL_LIB_SPEC = @TCL_LIB_SPEC@ +subdirs = @subdirs@ +aol_prefix = @aol_prefix@ +stubdir = stubs${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION} + +# Requires native paths +PLATFORM_DIR = `@CYGPATH@ $(srcdir)/@TEA_PLATFORM@` +target_doc_dir = ./doc + +src_lib_dir_native = `@CYGPATH@ ${src_lib_dir}` +src_doc_dir_native = `@CYGPATH@ ${src_doc_dir}` +src_test_dir_native = `@CYGPATH@ ${src_test_dir}` +src_app_dir_native = `@CYGPATH@ ${src_app_dir}` +src_generic_dir_native = `@CYGPATH@ ${src_generic_dir}` + +libdirs = lib nx serialize +libsrc = COPYRIGHT pkgIndex.tcl +appdirs = +appsrc = COPYRIGHT + +CPPCHECK = cppcheck + +# XOTcl subpackage +xotcl_srcdir = ${srcdir}/library/xotcl +xotcl_src_doc_dir = ${xotcl_srcdir}/doc +xotcl_src_app_dir = ${xotcl_srcdir}/apps +xotcl_src_lib_dir = ${xotcl_srcdir}/library +xotcl_src_test_dir = ${xotcl_srcdir}/tests +xotcl_target_doc_dir = ${xotcl_srcdir}/doc + +xotcl_libdirs = comm lib serialize @libdirs_actiweb@ +xotcl_libsrc = COPYRIGHT xotcl2.tcl pkgIndex.tcl +xotcl_appdirs = comm scripts utils @apps_actiweb@ +xotcl_appsrc = COPYRIGHT + +# Documentation source for xotcl-style documentation system +XODOC_SOURCE = \ + $(src_lib_dir)/serialize/serializer.tcl \ + $(xotcl_src_doc_dir)/langRef.xotcl \ + $(xotcl_src_lib_dir)/lib/*.xotcl \ + $(xotcl_src_test_dir)/*.xotcl \ + $(xotcl_src_app_dir)/comm/[flsw]*.xotcl \ + $(xotcl_src_app_dir)/utils/xo-*[a-z0-9] + +#export TCLLIBPATH=. ${srcdir} +mkinstalldirs= mkdir -p +#======================================================================== +# 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. +#======================================================================== + +DTRACE_OBJ = @DTRACE_OBJ@ +DTRACE_HDR = @DTRACE_HDR@ +DTRACE_SRC = @DTRACE_SRC@ + +#======================================================================== +# 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@ ${DTRACE_OBJ} + +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_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@ + +lib_BINARIES = $(PKG_LIB_FILE) $(PKG_STUB_LIB_FILE) +BINARIES = $(lib_BINARIES) + +SHELL = @SHELL@ + +srcdir = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +libdir = @libdir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +mandir = @mandir@ +includedir = @includedir@ + +DESTDIR = + +PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION) +pkglibdir = $(libdir)/$(PKG_DIR) + +top_builddir = . + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA_DIR = ${INSTALL} -d -m 755 + +# INSTALL_OPTIONS = +# INSTALL = $(SHELL) $(srcdir)/config/install-sh -c ${INSTALL_OPTIONS} +# INSTALL_DATA_DIR = ${INSTALL} -d -m 755 +# INSTALL_PROGRAM = ${INSTALL} -m 755 +# INSTALL_DATA = ${INSTALL} -m 644 +# INSTALL_SCRIPT = ${INSTALL_PROGRAM} +# INSTALL_LIBRARY = ${INSTALL_DATA} + +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +CC = @CC@ +CFLAGS_DEFAULT = @CFLAGS_DEFAULT@ +# useful for debugging: +#CFLAGS_DEFAULT = -pedantic -g -std=c99 -DTCL_NO_DEPRECATED -Wconversion -Wsign-conversion -Wfloat-conversion -Wsign-compare +CFLAGS_CONVERSION= -Wconversion -Wsign-conversion -Wsign-compare +CFLAGS_DEFINITION= -Wwrite-strings -Wextra -Wdeclaration-after-statement -Wendif-labels -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wpacked -Wredundant-decls +CFLAGS_TIDY = -Wmissing-braces -Wmissing-declarations -Wundef -Wunreachable-code -Wswitch-enum -Wpointer-arith -Wold-style-definition -Wmissing-format-attribute -Wformat-security +#CFLAGS_DEFAULT = -pedantic -g -std=c99 -DTCL_NO_DEPRECATED $(CFLAGS_CONVERSION) $(CFLAGS_DEFINITION) $(CFLAGS_TIDY) +CFLAGS_WARNING = @CFLAGS_WARNING@ +CLEANFILES = @CLEANFILES@ +EXEEXT = @EXEEXT@ +LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@ +MAKE_LIB = @MAKE_LIB@ +MAKE_SHARED_LIB = @MAKE_SHARED_LIB@ +MAKE_STATIC_LIB = @MAKE_STATIC_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@ +# +DTRACE = dtrace + +ifeq ($(DTPLITE),) + DTPLITE=dtplite +else + # Do nothing, use the environment variable as is. +endif + +ifeq ($(ASCIIDOC),) + ASCIIDOC = PATH=$(src_app_dir_native)/utils:$(PATH) \ + asciidoc \ + -f $(src_app_dir_native)/utils/asciidoc.conf +else + # Do nothing, use the environment variable as is. +endif + + +# +# Not used, but retained for reference of what libs Tcl required +TCL_LIBS = @TCL_LIBS@ + +xotcl_pkglibdir = $(pkglibdir)/xotcl + +#======================================================================== +# 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) +TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \ + @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \ + PATH="$(EXTRA_PATH):$(PATH)" \ + TCLLIBPATH="$(top_builddir) ${srcdir} $(TCLLIBPATH)" \ + TCL_PKG_PREFER_LATEST=1 +TCLSH_PROG = @TCLSH_PROG@ +TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) +#TCLSH = $(TCLSH_ENV) LD_PRELOAD="$(srcdir)/$(PKG_LIB_FILE)" valgrind --log-fd=9 --leak-check=full --track-origins=yes --show-possibly-lost=no $(TCLSH_PROG) 9>>valgrind.out +SHARED_BUILD = @SHARED_BUILD@ + +INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @NSF_BUILD_INCLUDE_SPEC@ +EXTRA_CFLAGS = @PKG_CFLAGS@ + +# TCL_DEFS is not strictly needed here, but if you remove it, then you +# must make sure that configure.in 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@ $(EXTRA_CFLAGS) +DEFS = @DEFS@ $(EXTRA_CFLAGS) + +CONFIG_CLEAN_FILES = @CONFIG_CLEAN_FILES@ + +CPPFLAGS = @CPPFLAGS@ +LIBS = @PKG_LIBS@ @LIBS@ +AR = @AR@ +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +#======================================================================== +# Start of user-definable TARGETS section +#======================================================================== + +EXAMPLE_SCRIPTS = \ + $(src_doc_dir)/example-scripts/bagel.html \ + $(src_doc_dir)/example-scripts/container.html \ + $(src_doc_dir)/example-scripts/per-object-mixins.html \ + $(src_doc_dir)/example-scripts/tutorial-properties.html \ + $(src_doc_dir)/example-scripts/rosetta-abstract-type.html \ + $(src_doc_dir)/example-scripts/rosetta-classes.html \ + $(src_doc_dir)/example-scripts/rosetta-constraint-genericity.html \ + $(src_doc_dir)/example-scripts/rosetta-delegates.html \ + $(src_doc_dir)/example-scripts/rosetta-polymorphism.html \ + $(src_doc_dir)/example-scripts/rosetta-serialization.html \ + $(src_doc_dir)/example-scripts/rosetta-singleton.html \ + $(src_doc_dir)/example-scripts/rosetta-sudoku.html \ + $(src_doc_dir)/example-scripts/rosetta-unknown-method.html \ + $(src_doc_dir)/example-scripts/ruby-mixins.html \ + $(src_doc_dir)/example-scripts/starmethod.html \ + $(src_doc_dir)/example-scripts/tk-horse-race.html \ + $(src_doc_dir)/example-scripts/tk-locomotive.html \ + $(src_doc_dir)/example-scripts/tk-ludo.html \ + $(src_doc_dir)/example-scripts/tk-geo.html \ + $(src_doc_dir)/example-scripts/tk-mini.html \ + $(src_doc_dir)/example-scripts/tk-spread.html \ + $(src_doc_dir)/example-scripts/traits-composite.html \ + $(src_doc_dir)/example-scripts/traits-simple.html \ + $(src_doc_dir)/example-scripts/rosetta-tokenizer.html \ + $(src_doc_dir)/example-scripts/rosetta-tree.html \ + $(src_doc_dir)/example-scripts/rosetta-multiple-distinct.html \ + $(src_doc_dir)/example-scripts/rosetta-add-variable.html \ + $(src_doc_dir)/example-scripts/rosetta-clone.html \ + $(src_doc_dir)/example-scripts/rosetta-multiple-inheritance.html \ + $(src_doc_dir)/example-scripts/rosetta-single-inheritance.html + +%.html : %.tcl + $(TCLSH) $(src_app_dir_native)/utils/source-doc-beautifier.tcl $< + $(ASCIIDOC) $*.txt + +#======================================================================== +# 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 end + +#======================================================================== +# 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) pkgIndex.tcl + @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ + for dir in $$dirs ; do \ + if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ + done; fi; + +libraries: libraries-pkgindex + @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ + for dir in $$dirs ; do \ + if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ + done; fi; + +cppcheck: + $(CPPCHECK) --enable=all generic/*.c $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) \ + -DNDEBUG=1 -I/usr/include -D__x86_64__ + +etags: + etags --language=none \ + --regex='/[ \t]*\(proc\)[ \t]+\([^ \t]+\)/\2/' \ + --regex='/[ \t]*[:]?\(public \|protected \|private \|\)[ \t]*\(method\|object method\)[ \t]+\([^ \t]+\)/\3/' \ + --regex='/[ \t]*[a-zA-Z:0-9]+[^ \t]\(public \|protected \|private \|\)[ \t]*\(method\)[ \t]+\([^ \t]+\)/\3/' \ + --regex='/[ \t]*[a-zA-Z:0-9]+[^ \t]+\(proc\|instproc\)[ \t]+\([^ \t]+\)/\3/' \ + `find . -name \*.tcl -or -name \*.test` + +libraries-pkgindex: pkgIndex.tcl + $(TCLSH) $(src_lib_dir_native)/lib/mkIndex.tcl -dir $(src_lib_dir_native) + + +full-doc: doc pdfdoc example-doc + +# use language reference as sample file to trigger generation of documentation files +#doc: $(xotcl_target_doc_dir)/langRef-xotcl.html + +# for now, just the two doc files +doc: + $(ASCIIDOC) $(src_doc_dir)/next-migration.txt + $(ASCIIDOC) $(src_doc_dir)/next-tutorial/next-tutorial.txt + +pdfdoc: + (cd $(src_doc_dir); prince --javascript --style=nx-small.css next-migration.html -o next-migration.pdf) + (cd $(src_doc_dir)/next-tutorial; prince --javascript --style=../nx.css next-tutorial.html -o next-tutorial.pdf) + +example-doc: $(EXAMPLE_SCRIPTS) + +$(xotcl_target_doc_dir)/langRef-xotcl.html: pkgIndex.tcl $(xotcl_src_doc_dir)/langRef.xotcl $(XODOC_SOURCE) + @docs=""; \ + for i in $(XODOC_SOURCE); do docs="$$docs `@CYGPATH@ $$i`"; done; \ + $(TCLSH) $(xotcl_src_lib_dir)/lib/makeDoc.xotcl \ + $(xotcl_target_doc_dir) $$docs + +pdf: + -(cd $(src_doc_dir); htmldoc --webpage --format pdf14 --title \ + -f tutorial.pdf tutorial.html ) + -(cd $(src_doc_dir); htmldoc --webpage --format pdf14 \ + -f langRef-xotcl.pdf langRef-xotcl.html ) + +NX_MAN3 = \ + $(src_doc_dir)/Object.man \ + $(src_doc_dir)/Class.man \ + $(src_doc_dir)/configure.man \ + $(src_doc_dir)/current.man \ + $(src_doc_dir)/next.man + +NX_MAN1 = \ + $(src_doc_dir)/nxsh.man \ + $(src_doc_dir)/xotclsh.man \ + $(src_doc_dir)/nxwish.man \ + $(src_doc_dir)/xowish.man + +man: man-html man-nroff man-pdf + +man-html: $(NX_MAN3:%.man=%.html) +$(src_doc_dir)/%.html: $(src_doc_dir)/%.man + @for m in $(?F) ; do \ + echo " Generating html manpage from $$m" ; \ + (cd $(src_doc_dir); $(DTPLITE) -style man.css -o . html $$m) ; \ + done; + +man-nroff : man1 man3 +man1 : $(NX_MAN1:%.man=%.1) +$(src_doc_dir)/%.1 : $(src_doc_dir)/%.man + @for m in $(?F) ; do \ + echo " Generating nroff manpage (Section 1) from $$m" ; \ + (cd $(src_doc_dir); $(DTPLITE) -ext 1 -o . nroff $$m) ; \ + done; + +man3: $(NX_MAN3:%.man=%.3) +$(src_doc_dir)/%.3 : $(src_doc_dir)/%.man + @for m in $(?F) ; do \ + echo " Generating nroff manpage (Section 3) from $$m" ; \ + (cd $(src_doc_dir); $(DTPLITE) -ext 3 -o . nroff $$m) ; \ + done; + +man-pdf: $(NX_MAN3:%.man=%.pdf) +$(src_doc_dir)/%.pdf : $(src_doc_dir)/%.html + @for m in $(?F) ; do \ + echo " Generating pdf manpage for $$m" ; \ + (cd $(src_doc_dir); prince -s man-princexml.css $$m) ; \ + done; + +install: install-binaries install-shells install-libraries install-doc install-xotcl-shells install-xotcl-libraries + @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ + for dir in $$dirs ; do \ + if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ + done; fi; + +install-binaries: binaries install-lib-binaries install-bin-binaries install-pkgIndex + +install-aol: install-binaries install-libraries install-xotcl-libraries + @if test -d $(DESTDIR)/$(aol_prefix)/modules/tcl/; then \ + $(INSTALL) $(src_generic_dir)/aol-xotcl.tcl \ + $(DESTDIR)/$(aol_prefix)/modules/tcl/xotcl.tcl ; \ + else \ + $(INSTALL) $(src_generic_dir)/aol-xotcl.tcl \ + $(DESTDIR)/$(aol_prefix)/tcl/xotcl.tcl ; \ + fi; + +#======================================================================== +# This rule installs platform-independent files, such as header files. +#======================================================================== +install-libraries: libraries + @$(INSTALL_DATA_DIR) $(DESTDIR)$(includedir) + @echo "Installing header files in $(DESTDIR)$(includedir)" + @for i in $(PKG_HEADERS) ; do \ + echo " Installing $$i" ; \ + $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(includedir) ; \ + done; + @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) + @echo "Installing Libraries to $(DESTDIR)$(pkglibdir)/" + @for i in $(libdirs) ; do \ + echo " Installing $$i/" ; \ + rm -rf $(DESTDIR)$(pkglibdir)/$$i ; \ + mkdir -p $(DESTDIR)$(pkglibdir)/$$i; \ + chmod 755 $(DESTDIR)$(pkglibdir)/$$i; \ + for j in $(src_lib_dir)/$$i/*.*tcl ; do \ + $(INSTALL_DATA) $$j $(DESTDIR)$(pkglibdir)/$$i/; \ + done; \ + done; + @for i in $(libsrc) ; do \ + echo " Installing $$i" ; \ + rm -rf $(DESTDIR)$(pkglibdir)/$$i ; \ + $(INSTALL_DATA) $(src_lib_dir)/$$i $(DESTDIR)$(pkglibdir)/$$i ; \ + done; + @mkdir -p $(DESTDIR)$(libdir)/tcl8/site-tcl + @for i in $(srcdir)/tcl8/site-tcl/*.tm ; do \ + if test -f $$i; then \ + echo " Installing module $$i in $(DESTDIR)$(libdir)/tcl8/site-tcl" ; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(libdir)/tcl8/site-tcl/; \ + fi; \ + done; + @echo " Installing pkgIndex.tcl for nsf in $(DESTDIR)$(pkglibdir)/pkgIndex.tcl" + @echo "" >> $(DESTDIR)$(pkglibdir)/pkgIndex.tcl + @cat $(srcdir)/unix/pkgIndex.unix >> $(DESTDIR)$(pkglibdir)/pkgIndex.tcl + @$(INSTALL_DATA) $(srcdir)/nsfConfig.sh $(DESTDIR)$(libdir)/ + +install-xotcl-libraries: install-libraries + @$(INSTALL_DATA_DIR) $(DESTDIR)$(pkglibdir) + @echo "Installing XOTcl Libraries to $(DESTDIR)$(xotcl_pkglibdir)/" + @rm -rf $(DESTDIR)$(xotcl_pkglibdir) + @mkdir -p $(DESTDIR)$(xotcl_pkglibdir) + @chmod 755 $(DESTDIR)$(xotcl_pkglibdir) + @for i in $(xotcl_libdirs) ; do \ + echo " Installing library $$i/" ; \ + rm -rf $(DESTDIR)$(xotcl_pkglibdir)/$$i ; \ + mkdir -p $(DESTDIR)$(xotcl_pkglibdir)/$$i; \ + chmod 755 $(DESTDIR)$(xotcl_pkglibdir)/$$i; \ + for j in $(xotcl_src_lib_dir)/$$i/*.*tcl ; do \ + $(INSTALL_DATA) $$j $(DESTDIR)$(xotcl_pkglibdir)/$$i/; \ + done; \ + done; + @for i in $(xotcl_libsrc) ; do \ + echo " Installing $$i" ; \ + rm -rf $(DESTDIR)$(xotcl_pkglibdir)/$$i ; \ + $(INSTALL_DATA) $(xotcl_src_lib_dir)/$$i $(DESTDIR)$(xotcl_pkglibdir)/$$i ; \ + done; + +install-xotcl-shells: xotclsh xowish + $(INSTALL_PROGRAM) xotclsh $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) xowish $(DESTDIR)$(bindir) + +install-xotcl-apps: install-xotcl-libraries + @echo "Installing Applications to $(DESTDIR)$(xotcl_pkglibdir)/apps/" + @for i in $(xotcl_appdirs) ; do \ + echo " Installing apps $$i/" ; \ + rm -rf $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i ; \ + mkdir -p $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i; \ + chmod 755 $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i; \ + for j in $(src_app_dir)/$$i/* ; do \ + if test -d $$j; then \ + mkdir -p $(DESTDIR)$(xotcl_pkglibdir)/$$j; \ + chmod 755 $(DESTDIR)$(xotcl_pkglibdir)/$$j; \ + for k in $$j/* ; do \ + $(INSTALL) $$k $(DESTDIR)$(xotcl_pkglibdir)/$$j ; \ + done; \ + else \ + $(INSTALL) $$j $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i/; \ + fi; \ + done; \ + done; + @for i in $(xotcl_appsrc) ; do \ + echo " Installing $$i" ; \ + rm -rf $(DESTDIR)$(xotcl_pkglibdir)/apps/$$i ; \ + $(INSTALL_DATA) $(src_app_dir)/$$i $(DESTDIR)$(xotcl_pkglibdir)/apps ; \ + done; + @rm -rf $(DESTDIR)$(xotcl_pkglibdir)/store/XOTclGdbm + @rm -rf $(DESTDIR)$(xotcl_pkglibdir)/store/XOTclSdbm + @rm -rf $(DESTDIR)$(xotcl_pkglibdir)/xml/TclExpat-1.1 + +#======================================================================== +# Install documentation. Unix manpages should go in the $(DESTDIR)$(mandir) +# directory. +#======================================================================== + +# install-doc: $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man3 $(DESTDIR)$(mandir)/mann +# @(cd $(src_man_dir)/ ; \ +# for i in *.1; do \ +# echo "Installing $$i"; \ +# rm -f $(DESTDIR)$(mandir)/man1/$$i; \ +# sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \ +# $$i > $(DESTDIR)$(mandir)/man1/$$i; \ +# chmod 444 $(DESTDIR)$(mandir)/man1/$$i; \ +# done) + +install-doc: + @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/man1 + @echo "Installing documentation in $(DESTDIR)$(mandir)" + @list='$(srcdir)/doc/*.1'; for i in $$list; do \ + echo "Installing $$i"; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man1 ; \ + done + @$(INSTALL_DATA_DIR) $(DESTDIR)$(mandir)/man3 + @list='$(srcdir)/doc/*.3'; for i in $$list; do \ + echo "Installing $$i"; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/man3 ; \ + done + +shell: binaries libraries + @$(TCLSH) $(SCRIPT) + +gdb: + $(TCLSH_ENV) gdb $(TCLSH_PROG) $(SCRIPT) + +lldbtest: + $(MAKE) "TCLSH_PROG=lldb -b -o run -- $(TCLSH_PROG)" test + +test: binaries libraries test-core test-xotcl test-http @test_actiweb@ + @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ + for dir in $$dirs ; do \ + if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ + done; fi + $(TCLSH) $(src_test_dir_native)/summary.tcl -title NX+XOTcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + +test-nohttp: binaries libraries test-core test-xotcl + +TESTLOG = ./__test.log +TESTFLAGS = -testlog $(TESTLOG) + +test-summary: + $(TCLSH) $(src_test_dir_native)/summary.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + +test-core: + rm -f $(TESTLOG) + $(TCLSH) $(src_test_dir_native)/object-system.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/destroy.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/methods.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/method-parameter.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/nsf-cmd.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/accessor.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/cget.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/properties.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/var-access.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/varresolution.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/info-method.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/submethods.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/info-variable.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/disposition.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/volatile.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/parameters.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/returns.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/method-require.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/interceptor-slot.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/alias.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/double-alias.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/protected.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/forward.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/mixinof.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/tcl86.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/contains.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/tcloo.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/interp.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/serialize.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/plain-object-method.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/class-method.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/linearization.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/traits.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/shells.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/msgcat.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/bagel.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/container.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-abstract-type.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-classes.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-constraint-genericity.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-delegates.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-polymorphism.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-serialization.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-singleton.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-unknown-method.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/ruby-mixins.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/traits-composite.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/traits-simple.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-tokenizer.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-tree.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-multiple-distinct.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-add-variable.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-clone.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-multiple-inheritance.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_doc_dir_native)/example-scripts/rosetta-single-inheritance.tcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + +test-xotcl: + $(TCLSH) $(xotcl_src_test_dir)/testo.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(xotcl_src_test_dir)/speedtest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(xotcl_src_test_dir)/testx.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(xotcl_src_test_dir)/slottest.xotcl -libdir $(PLATFORM_DIR) $(TESTFLAGS) + +test-http: + $(TCLSH) $(xotcl_src_test_dir)/xocomm.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + +test-actiweb: + $(TCLSH) $(xotcl_src_test_dir)/actiweb.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(xotcl_src_test_dir)/persistence.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(xotcl_src_test_dir)/UNIVERSAL.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(xotcl_src_test_dir)/xoRDF.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + @rm -rf receiver + +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 + +.c.@OBJEXT@: + $(COMPILE) -c `@CYGPATH@ $<` -o $@ + +#======================================================================== +# next shells +#======================================================================== + +pkgIndex.tcl: $(PKG_LIB_FILE) + @echo package ifneeded nsf $(PACKAGE_VERSION) \"load [list [file join \$$dir . $(PKG_LIB_FILE)] nsf]\; package provide nsf $(PACKAGE_VERSION)\" > pkgIndex.tcl + +install-pkgIndex: +# @echo package ifneeded nsf $(PACKAGE_VERSION) [list load [file join \$$dir .. "$(PKG_LIB_FILE)"] nsf] > "$(pkglibdir)/pkgIndex.tcl" + +nxsh nxwish xotclsh xowish: + $(TCLSH_PROG) $(top_builddir)/build.tcl $@ $@ + chmod +x $@ + + +#nxsh: tclAppInit.o $(PKG_OBJECTS) $(CONDITIONAL_STUB_OBJECTS) +# $(CC) -rdynamic -o $@ tclAppInit.o \ +# $(CFLAGS) $(TCL_LIB_SPEC) \ +# $(DMALLOC_LIB) $(CONDITIONAL_STUB_OBJECTS) + +#xowish: tkAppInit.o $(PKG_OBJECTS) $(CONDITIONAL_STUB_OBJECTS) +# $(CC) -rdynamic -o $@ tkAppInit.o \ +# $(PKG_OBJECTS) \ +# $(CFLAGS) $(TCL_LIB_SPEC) $(TK_LIB_SPEC) \ +# $(DMALLOC_LIB) $(CONDITIONAL_STUB_OBJECTS) + +install-shells: nxsh nxwish + $(INSTALL_PROGRAM) nxsh $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) nxwish $(DESTDIR)$(bindir) + +#======================================================================== +# We need to enumerate the list of .c to .o lines here. +# Unfortunately, there does not seem to be any other way to do this +# in a Makefile-independent way. We can't use VPATH because it picks up +# object files that may be located in the source directory. +# +# 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: +# +# exampleA.$(OBJEXT): $(srcdir)/src/win/exampleA.c +# $(COMPILE) -c `@CYGPATH@ $(srcdir)/src/win/exampleA.c` -o $@ +#======================================================================== + +$(src_generic_dir)/predefined.h: $(src_generic_dir)/mk_predefined.tcl $(src_generic_dir)/predefined_part1.tcl $(src_generic_dir)/predefined_part2.tcl + (cd $(src_generic_dir); $(TCLSH) mk_predefined.tcl predefined_part1.tcl predefined_part2.tcl > predefined.h) + +$(src_generic_dir)/nsfAPI.h: $(src_generic_dir)/gentclAPI.tcl $(src_generic_dir)/nsfAPI.decls + $(TCLSH) $(src_generic_dir)/gentclAPI.tcl $(src_generic_dir)/nsfAPI.decls > $(src_generic_dir)/nsfAPI.h + +aolstub.$(OBJEXT): $(src_generic_dir)/aolstub.c $(PKG_HEADERS) +nsf.$(OBJEXT): $(src_generic_dir)/nsf.c $(src_generic_dir)/predefined.h $(src_generic_dir)/nsfAccessInt.h $(src_generic_dir)/nsfAPI.h $(PKG_HEADERS) $(src_generic_dir)/nsfStack.c $(src_generic_dir)/asm/nsfAssemble.c $(src_generic_dir)/asm/nsfAsmExecuteCallThreading.c $(src_generic_dir)/asm/nsfAsmExecuteLabelThreading.c $(src_generic_dir)/asm/nsfAsmAssemble.c $(DTRACE_HDR) +nsfDebug.$(OBJEXT): $(src_generic_dir)/nsfDebug.c $(PKG_HEADERS) +nsfError.$(OBJEXT): $(src_generic_dir)/nsfError.c $(PKG_HEADERS) +nsfMetaData.$(OBJEXT): $(src_generic_dir)/nsfMetaData.c $(PKG_HEADERS) +nsfObj.$(OBJEXT): $(src_generic_dir)/nsfObj.c $(PKG_HEADERS) +nsfObjectData.$(OBJEXT): $(src_generic_dir)/nsfObjectData.c $(PKG_HEADERS) +nsfPointer.$(OBJEXT): $(src_generic_dir)/nsfPointer.c $(PKG_HEADERS) +nsfEnumerationType.$(OBJEXT): $(src_generic_dir)/nsfEnumerationType.c $(PKG_HEADERS) +nsfProfile.$(OBJEXT): $(src_generic_dir)/nsfProfile.c $(PKG_HEADERS) +nsfShadow.$(OBJEXT): $(src_generic_dir)/nsfShadow.c $(PKG_HEADERS) +$(stubdir)/nsfStubInit.$(OBJEXT): $(PKG_HEADERS) +nsfStubLib.$(OBJEXT): $(src_generic_dir)/nsfStubLib.c $(PKG_HEADERS) +nsfUtil.$(OBJEXT): $(src_generic_dir)/nsfUtil.c $(PKG_HEADERS) + +# +# Target to regenerate header files and stub files from the *.decls tables. +# + +TCL_SRC_DIR_85=/usr/local/src/tcl8.5.19 +TCL_SRC_DIR_86=/usr/local/src/tcl8.6.8 +TCL_SRC_DIR_87=/usr/local/src/core-8-branch + +genstubs: $(src_generic_dir)/nsf.decls + mkdir -p $(src_generic_dir)/stubs8.5 + tclsh8.5 $(TCL_SRC_DIR_85)/tools/genStubs.tcl $(src_generic_dir)/stubs8.5 \ + $(src_generic_dir)/nsf.decls $(src_generic_dir)/nsfInt.decls + mkdir -p $(src_generic_dir)/stubs8.6 + tclsh8.6 $(TCL_SRC_DIR_86)/tools/genStubs.tcl $(src_generic_dir)/stubs8.6 \ + $(src_generic_dir)/nsf.decls $(src_generic_dir)/nsfInt.decls + mkdir -p $(src_generic_dir)/stubs8.7 + tclsh8.7 $(TCL_SRC_DIR_87)/tools/genStubs.tcl $(src_generic_dir)/stubs8.7 \ + $(src_generic_dir)/nsf.decls $(src_generic_dir)/nsfInt.decls + +getstubs: + $(TCLSH) $(src_app_dir_native)/utils/getstubs.tcl $(src_generic_dir) + +# +# Target to check that all exported functions have an entry in the stubs +# tables. +# + +checkstubs: + -@for i in `nm -p $(PKG_LIB_FILE) | awk '$$2 ~ /T/ { print $$3 }' \ + | sort -n`; do \ + match=0; \ + for j in $(TCL_DECLS); do \ + if [ `grep -c $$i $$j` -gt 0 ]; then \ + match=1; \ + fi; \ + done; \ + if [ $$match -eq 0 ]; then echo $$i; fi \ + done + +# DTrace support + +$(DTRACE_HDR): $(DTRACE_SRC) + $(DTRACE) -h $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC) + +$(DTRACE_OBJ): $(DTRACE_SRC) $(TCL_OBJS) $(DTRACE_HDR) + $(DTRACE) -G $(DTRACE_SWITCHES) -o $@ -s $(DTRACE_SRC) $(TCL_OBJS) + + +#======================================================================== +# End of user-definable section +#======================================================================== + +#======================================================================== +# Don't modify the file to clean here. Instead, set the "CLEANFILES" +# variable in configure.in +#======================================================================== + +cleandoc: + -rm -rf $(xotcl_target_doc_dir)/*-xotcl.html + +clean: cleandoc + -rm -rf $(BINARIES) $(CLEANFILES) generic/stub*/*.o ./receiver $(TESTLOG) + find ${srcdir} -type f -name \*~ -exec rm \{} \; + @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ + for dir in $$dirs ; do \ + if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ + done; fi + +distclean: clean + -rm -rf $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log config.status + @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ + for dir in $$dirs ; do \ + if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ + done; fi + +#======================================================================== +# 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. +# +# A manual generation of the pkgIndex files via tclsh should look like +# pkg_mkIndex -direct -verbose library/lib *tcl +# +# 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: + @mkdir -p $(DESTDIR)$(pkglibdir) + @list='$(lib_BINARIES)'; for p in $$list; do \ + if test -f $$p; then \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \ + stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \ + if test "x$$stub" = "xstub"; then \ + echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \ + $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p; \ + else \ + echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \ + $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \ + ln -s $(DESTDIR)$(pkglibdir)/$$p $(DESTDIR)$(libdir)/$$p; \ + fi; \ + 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 + + +#======================================================================== +# 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: + @$(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 + +.SUFFIXES: .c .$(OBJEXT) + +#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 + +end: + @echo "" + @echo "***************************************************************" + @echo " Make completed. In order to test the Next Scripting Framework," + @echo " invoke:" + @echo " make test" + @echo "" + @echo " To install, use:" + @echo " make install" + @echo "" + @echo " To install for AOLserver 4.x, use:" + @echo " make install-aol" + @echo "" + @echo " In order to invoke NX interactively (before install), use:" + @echo " export TCLLIBPATH=\"$(TCLLIBPATH)\" TCL8_5_TM_PATH=\"$(TCLLIBPATH)\"/tcl8/site-tcl" + @echo " and" + @echo " @TCLSH_PROG@" + @echo " package require nx" + @echo "***************************************************************" + +RPMSOURCES=/usr/src/redhat/SOURCES +RPMSPECS=/usr/src/redhat/SPECS + +rpm: + @if test ! -d $(RPMSOURCES); then mkdir -p $(RPMSOURCES); fi + @if test ! -d $(RPMSPECS); then mkdir -p $(RPMSPECS); fi + cp unix/xotcl.spec $(RPMSPECS)/xotcl-$(PACKAGE_VERSION).spec + make tar + cp ../xotcl-$(PACKAGE_VERSION).tar.gz $(RPMSOURCES) + rpmbuild -ba $(RPMSPECS)/xotcl-$(PACKAGE_VERSION).spec + +bin-tar: + (cd ..; tar zcvf xotcl-$(PACKAGE_VERSION)-bin-linux-i686-glibc.tar.gz \ + `find \ + $(prefix)/bin/nx*sh \ + $(prefix)/bin/xotcl*sh \ + $(prefix)/lib/nsf* \ + $(prefix)/lib/libnsf* \ + $(prefix)/include/nsf*.h \ + $(DESTDIR)$(pkglibdir) $(prefix)/man/man1/nsf* \ + -type f -o -type l | fgrep -v CVS | fgrep -v SCCS | fgrep -v .junk| fgrep -v .db | fgrep -v "~" | fgrep -v "#" | fgrep -v /receiver/` \ + ) + +tar: libraries-pkgindex + echo @NSF_COMMIT@ > COMMIT + sh $(srcdir)/tclconfig/mktar.sh + +.PHONY: all binaries clean depend distclean doc install libraries \ + test test-core test-actiweb + +# 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: Index: build.tcl.in =================================================================== diff -u -r57d74ca7442169f0317dbbbbac1b479aee30ec21 -re8dc26b2f6831f2a68d6040c5f6fb5380aa5feee --- build.tcl.in (.../build.tcl.in) (revision 57d74ca7442169f0317dbbbbac1b479aee30ec21) +++ build.tcl.in (.../build.tcl.in) (revision e8dc26b2f6831f2a68d6040c5f6fb5380aa5feee) @@ -1,181 +1,181 @@ -#! /usr/bin/env tclsh - - -proc fputs {filename content} { - set chan [open $filename w] - try { - puts $chan $content - } finally { - close $chan - } -} - - -proc heredoc doc { - if {![regexp {^(?:\s*?\n)(.*?)\n(?:\s(?!\n))*$} $doc[ - set doc {}] -> doc]} { - - error [list {bad heredoc format (missing final newline)}] - } - regsub -all {\\\\\n} [string trim $doc[set doc {}]] "\\\n" doc - regsub -lineanchor -all {^\t} $doc[set doc {}] {} doc - return $doc -} - - -proc innerscript namevar { - upvar script script - namespace upvar [namespace current] $namevar innerscript - append script \n$innerscript -} - - -proc requirescript name { - variable autopath - upvar script script - namespace upvar [namespace current] \ - ${name}_requirescript requirescript - append script \n[string map [list @requirescript@ [ - list $requirescript] @requirescript2@ $requirescript] $autopath] -} - - -proc runshell {} { - upvar script script - append script \n [heredoc { - set exitCode [nx::shell run $argc $argv] - exit $exitCode - }] -} - - -proc shellscript {name filename} { - shelltotclsh $name - requirescript $name - innerscript $name - runshell - fputs $filename $script -} - - -proc shelltotclsh name { - variable shelltotclsh - upvar script script - set script [string map {@name@ $name} $shelltotclsh] -} - - -variable autopath [heredoc { - apply {{} { - if {[catch @requirescript@ cres copts]} { - set pkgdir @PACKAGE_NAME@@PACKAGE_VERSION@ - - set autopath [list ::apply {{dir pkgdir} { - global auto_path - set candidate $dir/$pkgdir - if {[file exists $candidate]} { - foreach tcldir [glob -directory $dir tcl*] { - set candidate1 $tcldir/site-tcl - if {[file exists $candidate1]} { - set auto_path [linsert $auto_path[ - set auto_path {}] 0 $candidate1] - } - } - - set auto_path [linsert $auto_path[ - set auto_path {}] 0 $candidate] - } - }}] - - set findpkgindex [list ::apply {{top pkgdir} { - upvar 1 autopath autopath - foreach dir {lib lib64} { - {*}$autopath $top/$dir $pkgdir - } - set dirs [glob -nocomplain -directory $top -type d *] - foreach dir $dirs { - {*}$autopath $dir $pkgdir - } - foreach dir $dirs { - foreach dir [glob -nocomplain -directory \ - $top/$dir -type d *] { - {*}$autopath $dir $pkgdir - } - } - }}] - - - set top [file dirname [file dirname [file dirname [ - file normalize [info script]/...]]]] - {*}$findpkgindex $top $pkgdir - - @requirescript2@ - } - }} -}] - -variable shelltotclsh [heredoc { - #! /bin/sh - # Lookup a Tcl interpreter \\ - INTERP="tclsh@TCL_VERSION@"; \\ - INTERPS="@NSF_COMPATIBLE_TCLSH@ @TCL_EXEC_PREFIX@/bin/$INTERP"; \\ - for interp in $INTERPS; \\ - do if [ -x $interp ]; then INTERP=$interp; break; \\ - fi; done; \\ - exec $INTERP "$0" ${1+"$@"} - - # -*- tcl -*- - # - # Tiny scripted replacement of a binary @name@. This script can be used - # as interactive shell for testing or like a regular shell with the #! - # markup in the first line of a script. It is designed to work with - # multiple installed Tcl shells during development. - # -}] - - -variable nxsh { - namespace import -force ::nx::* -} - -variable nxsh_requirescript { - package require nx::shell 1.1 -} - - -variable nxwish $nxsh - -variable nxwish_requirescript { - package require Tk - package require nx::shell 1.1 -} - - -variable xotclsh { - namespace import -force ::xotcl::* -} - -variable xotclsh_requirescript { - package require XOTcl 2 - package require nx::shell 1.1 -} - - -variable xowish $xotclsh - -variable xowish_requirescript { - package require Tk - package require XOTcl 2 - package require nx::shell 1.1 -} - - -namespace ensemble create -map { - nxsh {shellscript nxsh} - nxwish {shellscript nxwish} - xotclsh {shellscript xotclsh} - xowish {shellscript xowish} -} - - -[namespace current] {*}$argv +#! /usr/bin/env tclsh + + +proc fputs {filename content} { + set chan [open $filename w] + try { + puts $chan $content + } finally { + close $chan + } +} + + +proc heredoc doc { + if {![regexp {^(?:\s*?\n)(.*?)\n(?:\s(?!\n))*$} $doc[ + set doc {}] -> doc]} { + + error [list {bad heredoc format (missing final newline)}] + } + regsub -all {\\\\\n} [string trim $doc[set doc {}]] "\\\n" doc + regsub -lineanchor -all {^\t} $doc[set doc {}] {} doc + return $doc +} + + +proc innerscript namevar { + upvar script script + namespace upvar [namespace current] $namevar innerscript + append script \n$innerscript +} + + +proc requirescript name { + variable autopath + upvar script script + namespace upvar [namespace current] \ + ${name}_requirescript requirescript + append script \n[string map [list @requirescript@ [ + list $requirescript] @requirescript2@ $requirescript] $autopath] +} + + +proc runshell {} { + upvar script script + append script \n [heredoc { + set exitCode [nx::shell run $argc $argv] + exit $exitCode + }] +} + + +proc shellscript {name filename} { + shelltotclsh $name + requirescript $name + innerscript $name + runshell + fputs $filename $script +} + + +proc shelltotclsh name { + variable shelltotclsh + upvar script script + set script [string map {@name@ $name} $shelltotclsh] +} + + +variable autopath [heredoc { + apply {{} { + if {[catch @requirescript@ cres copts]} { + set pkgdir @PACKAGE_NAME@@PACKAGE_VERSION@ + + set autopath [list ::apply {{dir pkgdir} { + global auto_path + set candidate $dir/$pkgdir + if {[file exists $candidate]} { + foreach tcldir [glob -directory $dir tcl*] { + set candidate1 $tcldir/site-tcl + if {[file exists $candidate1]} { + set auto_path [linsert $auto_path[ + set auto_path {}] 0 $candidate1] + } + } + + set auto_path [linsert $auto_path[ + set auto_path {}] 0 $candidate] + } + }}] + + set findpkgindex [list ::apply {{top pkgdir} { + upvar 1 autopath autopath + foreach dir {lib lib64} { + {*}$autopath $top/$dir $pkgdir + } + set dirs [glob -nocomplain -directory $top -type d *] + foreach dir $dirs { + {*}$autopath $dir $pkgdir + } + foreach dir $dirs { + foreach dir [glob -nocomplain -directory \ + $top/$dir -type d *] { + {*}$autopath $dir $pkgdir + } + } + }}] + + + set top [file dirname [file dirname [file dirname [ + file normalize [info script]/...]]]] + {*}$findpkgindex $top $pkgdir + + @requirescript2@ + } + }} +}] + +variable shelltotclsh [heredoc { + #! /bin/sh + # Lookup a Tcl interpreter \\ + INTERP="tclsh@TCL_VERSION@"; \\ + INTERPS="@NSF_COMPATIBLE_TCLSH@ @TCL_EXEC_PREFIX@/bin/$INTERP"; \\ + for interp in $INTERPS; \\ + do if [ -x $interp ]; then INTERP=$interp; break; \\ + fi; done; \\ + exec $INTERP "$0" ${1+"$@"} + + # -*- tcl -*- + # + # Tiny scripted replacement of a binary @name@. This script can be used + # as interactive shell for testing or like a regular shell with the #! + # markup in the first line of a script. It is designed to work with + # multiple installed Tcl shells during development. + # +}] + + +variable nxsh { + namespace import -force ::nx::* +} + +variable nxsh_requirescript { + package require nx::shell 1.1 +} + + +variable nxwish $nxsh + +variable nxwish_requirescript { + package require Tk + package require nx::shell 1.1 +} + + +variable xotclsh { + namespace import -force ::xotcl::* +} + +variable xotclsh_requirescript { + package require XOTcl 2 + package require nx::shell 1.1 +} + + +variable xowish $xotclsh + +variable xowish_requirescript { + package require Tk + package require XOTcl 2 + package require nx::shell 1.1 +} + + +namespace ensemble create -map { + nxsh {shellscript nxsh} + nxwish {shellscript nxwish} + xotclsh {shellscript xotclsh} + xowish {shellscript xowish} +} + + +[namespace current] {*}$argv Index: configure.ac =================================================================== diff -u -r57d74ca7442169f0317dbbbbac1b479aee30ec21 -re8dc26b2f6831f2a68d6040c5f6fb5380aa5feee --- configure.ac (.../configure.ac) (revision 57d74ca7442169f0317dbbbbac1b479aee30ec21) +++ configure.ac (.../configure.ac) (revision e8dc26b2f6831f2a68d6040c5f6fb5380aa5feee) @@ -1,500 +1,500 @@ - -#-------------------------------------------------------------------- -# Sample configure.in for Tcl Extensions. The only places you should -# need to modify this file are marked by the string __CHANGE__ -#-------------------------------------------------------------------- - -#-------------------------------------------------------------------- -# __CHANGE__ -# This very first macro is used to verify that the configure script can -# find the sources. The argument to AC_INIT should be a unique filename -# for this package, and can be a relative path, such as: -# -#-------------------------------------------------------------------- -AC_PREREQ([2.69]) - -define(NsfVersion, 2.4.0) -AC_INIT([nsf], [NsfVersion], [https://sourceforge.net/p/next-scripting/tickets/]) - -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_AUX_DIR([tclconfig]) - -#-------------------------------------------------------------------- -# Call TEA_INIT as the first TEA_ macro to set up initial vars. -# This will define a ${TEA_PLATFORM} variable == "unix" or "windows". -#-------------------------------------------------------------------- - -TEA_INIT([3.10]) - -#-------------------------------------------------------------------- -# specify some extra flags -#-------------------------------------------------------------------- -# According to http://www.gnu.org/software/autoconf/manual/autoconf.html -# - "with" is for external software (optional packages) -# - "enable" is for optional features -# -AC_ARG_WITH([aolserver3], - AS_HELP_STRING([--with-aolserver3=AOL_SERVER_DIR], - [build an AOLserver 3 module; - point to directory containing aolsever/include (default: off)]), - [with_aol3=$withval], [with_aol3=no]) -AC_ARG_WITH([dtrace], - AS_HELP_STRING([--with-dtrace], [build nsf with dtrace (default: without)]), - [with_dtrace=$withval], [with_dtrace=no]) -AC_ARG_WITH([mongoc], - AS_HELP_STRING([--with-mongoc=MONGOC_INCLUDE_DIR[,MONGOC_LIB_DIR]], - [build nsf with mongodb c-driver support (default: without)]), - [with_mongoc=$withval], [with_mongoc=no]) -AC_ARG_WITH([bson], - AS_HELP_STRING([--with-bson=BSON_INCLUDE_DIR[,BSON_LIB_DIR]], - [build nsf with mongodb bson support (default: without)]), - [with_bson=$withval], [with_bson=no]) -AC_ARG_ENABLE([profile], - AS_HELP_STRING([--enable-profile], [build nsf with profile support (default: disabled)]), - [enable_profile=$enableval], [enable_profile=no]) -AC_ARG_ENABLE([memcount], - AS_HELP_STRING([--enable-memcount=yes|trace], - [build nsf with memcount debug support (default: disabled)]), - [enable_memcount=$enableval], [enable_memcount=no]) -AC_ARG_ENABLE([development], - AS_HELP_STRING([--enable-development=yes|test], - [build nsf with development support (intensive runtime checking, etc.; default: disabled)]), - [enable_development=$enableval], [enable_development=no]) -AC_ARG_ENABLE([assertions], - AS_HELP_STRING([--enable-assertions], - [build nsf with assertion support (default: enabled)]), - [enable_assertions=$enableval], [enable_assertions=yes]) -AC_ARG_ENABLE([assemble], - AS_HELP_STRING([--enable-assemble=yes|label|call], - [build nsf with assemble support (default: disabled)]), - [enable_assemble=$enableval], [enable_assemble=no]) - -subdirs="" - -if ! test "$with_mongoc" = no; then - test_mongodb=test-mongdb - subdirs="$subdirs ${srcdir}/library/mongodb" -fi - -test_actiweb="" -libdirs_actiweb="" -apps_actiweb="" - -AC_SUBST([subdirs]) - - -#-------------------------------------------------------------------- -# __CHANGE__ -# Set your package name and version numbers here. The NODOT_VERSION is -# required for constructing the library name on systems that don't like -# dots in library names (Windows). The VERSION variable is used on the -# other systems. -#-------------------------------------------------------------------- - -NSF_MAJOR_VERSION=2 -NSF_MINOR_VERSION=4 - -NSF_PATCH_LEVEL=$PACKAGE_VERSION - -NSF_VERSION=${NSF_MAJOR_VERSION}.${NSF_MINOR_VERSION} -NODOT_VERSION=${NSF_MAJOR_VERSION}${NSF_MINOR_VERSION} - -AC_SUBST([NSF_VERSION]) -AC_SUBST([NSF_MAJOR_VERSION]) -AC_SUBST([NSF_MINOR_VERSION]) -AC_SUBST([NSF_PATCH_LEVEL]) - -echo "Configuring NSF Version $PACKAGE_VERSION" - -AC_CHECK_PROG(git_installed,git,"yes", "no") - -if test "$git_installed" = "yes" -a -d ".git" ; then - nsf_commit=`git describe --always --dirty` -elif test -f "COMMIT" ; then - nsf_commit=`cat COMMIT` -else - nsf_commit=unknown-${PACKAGE_VERSION} -fi - -NSF_COMMIT=$nsf_commit -AC_SUBST([NSF_COMMIT]) - -# AC_DEFINE_UNQUOTED([NSF_COMMIT], "$nsf_commit", -# [Commit ID at the time of the last configure run.]) - -AC_CHECK_TYPES([intptr_t, uintptr_t]) - - -#-------------------------------------------------------------------- -# Load the tclConfig.sh file -#-------------------------------------------------------------------- - -TEA_PATH_TCLCONFIG -TEA_LOAD_TCLCONFIG - -AC_CHECK_FUNCS([strnstr]) - -#-------------------------------------------------------------------- -# check for TK -#-------------------------------------------------------------------- - - -#-------------------------------------------------------------------- -# Handle the --prefix=... option by defaulting to what Tcl gave. -# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. -#----------------------------------------------------------------------- - -TEA_PREFIX - -#----------------------------------------------------------------------- -# Standard compiler checks. -# This sets up CC by using the CC env var, or looks for gcc otherwise. -# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create -# the basic setup necessary to compile executables. -#----------------------------------------------------------------------- - -TEA_SETUP_COMPILER - -#-------------------------------------------------------------------- -# check for extra flags -# -# FORCE_NO_STUBS is deactivated for now -if ! test "$with_aol3" = "no"; then - echo "Pre-configuring AOL-Server (nsf)" - AOL_DEFINES="-DAOL_SERVER -DUSE_TCL8X -I$with_aol3/include -I$TCL_SRC_DIR/generic" - FORCE_NO_STUBS=1 -else - AOL_DEFINES="" - FORCE_NO_STUBS=0 -fi - -# set the default aol_prefix -aol_prefix="/usr/local/aolserver" -# if we have under ${prefix} either modules/tcl/init.tcl (aolserver -# style) or modules/tcl/init.tcl (naviserver style), then use -# ${prefix} as aol_prefix (path for the installation of -# aolserver/naviserver specific tcl files). -if test -f "${prefix}/modules/tcl/init.tcl" ; then - aol_prefix="${prefix}" -else - if test -f "${prefix}/tcl/init.tcl" ; then - aol_prefix="${prefix}" - fi -fi -AC_SUBST([aol_prefix]) - -#-------------------------------------------------------------------- -# check for tclCompile.h (needed, when compiled without full source) -if test -f "$TCL_SRC_DIR/generic/tclCompile.h"; then - AC_DEFINE([HAVE_TCL_COMPILE_H], [1], [Do we have tclCompile.h installed?]) -fi - -if test "$enable_assertions" = yes; then - AC_DEFINE([NSF_WITH_ASSERTIONS], [1], [Are we building with assertions support?]) -fi - -if test "$enable_profile" = yes; then - AC_DEFINE([NSF_PROFILE], [1], [Are we building with profile support?]) -fi - -if test "$enable_development" = yes; then - AC_DEFINE([NSF_DEVELOPMENT], [1], [Are we building with development support?]) -fi -if test "$enable_development" = test; then - AC_DEFINE([NSF_DEVELOPMENT_TEST], [1], [Are we building with development support and intesive testing?]) -fi - -if test "$enable_memcount" = yes; then - AC_DEFINE([NSF_MEM_COUNT], [1], [Are we building with memcount support?]) -fi -if test "$enable_memcount" = trace; then - AC_DEFINE([NSF_MEM_TRACE], [1], [Are we building with memcount tracing support?]) -fi - -if test "$enable_assemble" = yes; then - AC_DEFINE([NSF_ASSEMBLE], [1], [Are we building with assembly support?]) -fi -if test "$enable_assemble" = call; then - AC_DEFINE([NSF_ASSEMBLE_CT], [1], [Are we building with assembly call threading support?]) -fi -if test "$enable_assemble" = call; then - AC_DEFINE([NSF_ASSEMBLE_LT], [1], [Are we building with assembly label threading support?]) -fi - -DTRACE_OBJ= -if test "$with_dtrace" = yes; then - AC_DEFINE([NSF_DTRACE], [1], [Are we building with DTrace support?]) - # Under macOS, we need no nsfDTrace.o - if test "`uname -s`" != "Darwin" ; then - DTRACE_OBJ=nsfDTrace.o - fi - DTRACE_HDR='$(src_generic_dir)/nsfDTrace.h' - DTRACE_SRC='$(src_generic_dir)/nsfDTrace.d' -fi -AC_SUBST([DTRACE_OBJ]) -AC_SUBST([DTRACE_HDR]) -AC_SUBST([DTRACE_SRC]) - -#----------------------------------------------------------------------- -# __CHANGE__ -# Specify the C source files to compile in TEA_ADD_SOURCES, -# public headers that need to be installed in TEA_ADD_HEADERS, -# stub library C source files to compile in TEA_ADD_STUB_SOURCES, -# and runtime Tcl library files in TEA_ADD_TCL_SOURCES. -# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS -# and PKG_TCL_SOURCES. -#----------------------------------------------------------------------- -stubdir=stubs${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION} -TEA_ADD_SOURCES([nsf.c nsfError.c nsfObjectData.c nsfProfile.c \ - nsfDebug.c nsfUtil.c nsfObj.c nsfPointer.c nsfEnumerationType.c \ - nsfCmdDefinitions.c nsfFunPtrHashTable.c nsfShadow.c nsfCompile.c aolstub.c \${srcdir}/generic/${stubdir}/nsfStubInit.${OBJEXT}]) -TEA_ADD_HEADERS([generic/nsf.h generic/nsfInt.h generic/${stubdir}/nsfDecls.h generic/${stubdir}/nsfIntDecls.h]) -TEA_ADD_INCLUDES([]) -TEA_ADD_LIBS([]) -TEA_ADD_CFLAGS([-DNSF_VERSION=\\\"$NSF_VERSION\\\" -DNSF_PATCHLEVEL=\\\"$NSF_PATCH_LEVEL\\\" \ --DNSF_COMMIT=\\\"$NSF_COMMIT\\\" $AOL_DEFINES ]) -TEA_ADD_STUB_SOURCES([nsfStubLib.c]) -TEA_ADD_TCL_SOURCES([]) - -#-------------------------------------------------------------------- -# __CHANGE__ -# -# You can add more files to clean if your extension creates any extra -# files by extending CLEANFILES. -# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure -# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. -# -# A few miscellaneous platform-specific items: -# TEA_ADD_* any platform specific compiler/build info here. -#-------------------------------------------------------------------- - -if test "${TEA_PLATFORM}" = "windows" ; then - if test "$GCC" != "yes" ; then - AC_DEFINE([VISUAL_CC]) - fi - CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch vc60.pch " - #TEA_ADD_SOURCES([win/winFile.c]) - #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) -else - CLEANFILES="*.a *.so *~ core gmon.out" - #TEA_ADD_SOURCES([unix/unixFile.c]) - #TEA_ADD_LIBS([-lsuperfly]) -fi -CLEANFILES="$CLEANFILES *.${OBJEXT} pkgIndex.tcl" - -#-------------------------------------------------------------------- -# __CHANGE__ -# Choose which headers you need. Extension authors should try very -# hard to only rely on the Tcl public header files. Internal headers -# contain private data structures and are subject to change without -# notice. -# This must be done AFTER calling TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG -# so that we can extract TCL_SRC_DIR from the config file (in the case -# of private headers -#-------------------------------------------------------------------- - -#TEA_PUBLIC_TCL_HEADERS -TEA_PRIVATE_TCL_HEADERS - -#TEA_PUBLIC_TK_HEADERS -#TEA_PRIVATE_TK_HEADERS -#TEA_PATH_X - -#-------------------------------------------------------------------- -# Check whether --enable-threads or --disable-threads was given. -#-------------------------------------------------------------------- - -TEA_ENABLE_THREADS - -#-------------------------------------------------------------------- -# The statement below defines a collection of symbols related to -# building as a shared library instead of a static library. -#-------------------------------------------------------------------- - -TEA_ENABLE_SHARED - -#-------------------------------------------------------------------- -# This macro figures out what flags to use with the compiler/linker -# when building shared/static debug/optimized objects. This information -# can be taken from the tclConfig.sh file, but this figures it all out. -#-------------------------------------------------------------------- - -TEA_CONFIG_CFLAGS - -# Without the following two eval statements, NSF_SHARED_LIB_SUFFIX -# in nsfConfig.sh has $PACKAGE_VERSION unresolved. When another -# app links against nsf, the PACKAGE_VERSIONs are confused. -# -# Without the first eval, we get -# NSF_SHARED_LIB_SUFFIX=${PACKAGE_VERSION}\$\{DBGX\}${SHLIB_SUFFIX} -# NSF_UNSHARED_LIB_SUFFIX=${PACKAGE_VERSION}\$\{DBGX\}.a -# -# after the first eval, we get -# NSF_SHARED_LIB_SUFFIX=1.2.1${DBGX}.so -# NSF_UNSHARED_LIB_SUFFIX=1.2.1${DBGX}.a -# after the second eval, all variables are resolved. - - -eval "SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}" -eval "UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}" - -#eval "SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}" -#eval "UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}" - -#-------------------------------------------------------------------- -# Set the default compiler switches based on the --enable-symbols -# option. -#-------------------------------------------------------------------- - -TEA_ENABLE_SYMBOLS - -#-------------------------------------------------------------------- -# Everyone should be linking against the Tcl stub library. If you -# can't for some reason, remove this definition. If you aren't using -# stubs, you also need to modify the SHLIB_LD_LIBS setting below to -# link against the non-stubbed Tcl library. -#-------------------------------------------------------------------- - -AC_DEFINE([USE_TCL_STUBS], [1], [Use Tcl stubs]) - -#-------------------------------------------------------------------- -# This macro generates a line to use when building a library. It -# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, -# and TEA_LOAD_TCLCONFIG macros above. -#-------------------------------------------------------------------- - -TEA_MAKE_LIB - -#-------------------------------------------------------------------- -# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl -# file during the install process. Don't run the TCLSH_PROG through -# ${CYGPATH} because it's being used directly by make. -# Require that we use a tclsh shell version 8.2 or later since earlier -# versions have bugs in the pkg_mkIndex routine. -#-------------------------------------------------------------------- - -TEA_PROG_TCLSH - -# make this available, for such as nsfConfig.sh -NSF_COMPATIBLE_TCLSH=${TCLSH_PROG} -AC_SUBST([NSF_COMPATIBLE_TCLSH]) -AC_SUBST([TCL_EXEC_PREFIX]) - -# -# Next Scripting specific configs -# -#NSF_SRC_DIR=$srcdir -#NSF_SRC_DIR="`pwd`" - -NSF_BUILD_DIR=${PWD} -cd ${srcdir} -NSF_SRC_DIR=${PWD} -cd ${NSF_BUILD_DIR} - -AC_SUBST([NSF_SRC_DIR]) - -eval "NSF_PKG_LIBDIR=\"${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}\"" - -if test "${TEA_PLATFORM}" != "windows" ; then - -NSF_BUILD_LIB_SPEC="-L${NSF_BUILD_DIR} -lnsf${PACKAGE_VERSION}" -NSF_LIB_SPEC="-L${NSF_PKG_LIBDIR} -lnsf${PACKAGE_VERSION}" - -# If someone wants to build without stubs, as it was the case for -# earlier Tcl versions, we keep the following block as a reference. -if test "${TCL_MAJOR_VERSION}" = "8" -a "${TCL_MINOR_VERSION}" = "0"; then - NSF_BUILD_STUB_LIB_PATH="" - NSF_STUB_LIB_PATH="" - NSF_BUILD_STUB_LIB_SPEC="" - NSF_STUB_LIB_SPEC="" -else - NSF_BUILD_STUB_LIB_PATH="${NSF_SRC_DIR}/${PKG_STUB_LIB_FILE}" - NSF_STUB_LIB_PATH="${NSF_PKG_LIBDIR}/${PKG_STUB_LIB_FILE}" - NSF_BUILD_STUB_LIB_SPEC="-L${NSF_BUILD_DIR} -lnsfstub${PACKAGE_VERSION}" - NSF_STUB_LIB_SPEC="-L${NSF_PKG_LIBDIR} -lnsfstub${PACKAGE_VERSION}" - AC_DEFINE([COMPILE_NSF_STUBS]) -fi - -else - - NSF_BUILD_LIB_SPEC="${NSF_SRC_DIR}/${PKG_LIB_FILE}" - NSF_LIB_SPEC="${NSF_PKG_LIBDIR}/${PKG_LIB_FILE}" - NSF_BUILD_STUB_LIB_PATH="${NSF_BUILD_DIR}/${PKG_STUB_LIB_FILE}" - NSF_STUB_LIB_PATH="${NSF_PKG_LIBDIR}/${PKG_STUB_LIB_FILE}" - NSF_BUILD_STUB_LIB_SPEC="${NSF_BUILD_DIR}/${PKG_STUB_LIB_FILE}" - NSF_STUB_LIB_SPEC="${NSF_PKG_LIBDIR}/${PKG_STUB_LIB_FILE}" - AC_DEFINE([COMPILE_NSF_STUBS]) - -fi - -AC_SUBST([SHARED_LIB_SUFFIX]) -AC_SUBST([UNSHARED_LIB_SUFFIX]) -AC_SUBST([NSF_BUILD_LIB_SPEC]) -AC_SUBST([NSF_LIB_SPEC]) -AC_SUBST([NSF_BUILD_STUB_LIB_SPEC]) -AC_SUBST([NSF_STUB_LIB_SPEC]) -AC_SUBST([NSF_BUILD_STUB_LIB_PATH]) -AC_SUBST([NSF_STUB_LIB_PATH]) -AC_SUBST([NXSH]) -AC_SUBST([XOWISH]) - -# include dirs for nsf during build process (i.e., does not assume installed) -NSF_BUILD_INCLUDE_DIR="${NSF_SRC_DIR}/generic" -NSF_BUILD_INCLUDE_SPEC="-I${NSF_BUILD_INCLUDE_DIR}" -AC_SUBST([NSF_BUILD_INCLUDE_DIR]) -AC_SUBST([NSF_BUILD_INCLUDE_SPEC]) - - -eval "NSF_INCLUDE_DIR=\"$includedir\"" -AC_SUBST([NSF_INCLUDE_DIR]) - -AC_SUBST([test_actiweb]) -AC_SUBST([libdirs_actiweb]) -AC_SUBST([apps_actiweb]) - -AC_SUBST([TEA_PLATFORM]) - -dnl macro expanding to the names of files ./configure is to generate. -dnl reasoning: this is a factoring; I use this value elsewhere. -dnl -dnl Change the value of -this- macro if you want to add or remove -dnl such files. - -AC_DEFUN([CONFIG_OUTPUT_FILES], [[Makefile ${srcdir}/nsfConfig.sh ${srcdir}/unix/pkgIndex.unix build.tcl ${srcdir}/doc/version.inc]]) - -#-------------------------------------------------------------------- -# the value of this variable is set to the files which are to be -# removed when the user invokes 'make distclean' (i.e., those -# files generated by ./configure) and is used in the make distclean -# target, defined in Makefile.in -#-------------------------------------------------------------------- - -CONFIG_CLEAN_FILES="CONFIG_OUTPUT_FILES autom4te.cache/" -AC_SUBST([CONFIG_CLEAN_FILES]) -AC_CONFIG_FILES(CONFIG_OUTPUT_FILES) - -#-------------------------------------------------------------------- -# Finally, substitute all of the various values into the Makefile, -# and generate the other output files. (this is done by invoking -# config.status) -# -# NOTE the lack of parameters! AC_OUTPUT with params is deprecated; -# use macros such as AC_CONFIG_FILES, AC_HEADER_FILES, etc to add -# to the files output by ./configure. -#-------------------------------------------------------------------- - -AC_OUTPUT - -for subdir in ${subdirs} -do - echo "==================== configure $subdir" - if test x"${srcdir}" = x. ; then - confdir=. - else - #mkdir -p $subdir - confdir=${srcdir}/$subdir - fi - (cd $subdir; echo $SHELL ${confdir}/configure ${ac_configure_args} --prefix=${prefix} --with-nsf=${NSF_SRC_DIR}; eval $SHELL ${confdir}/configure ${ac_configure_args} --prefix=${prefix} --with-nsf=${NSF_SRC_DIR}) -done - - + +#-------------------------------------------------------------------- +# Sample configure.in for Tcl Extensions. The only places you should +# need to modify this file are marked by the string __CHANGE__ +#-------------------------------------------------------------------- + +#-------------------------------------------------------------------- +# __CHANGE__ +# This very first macro is used to verify that the configure script can +# find the sources. The argument to AC_INIT should be a unique filename +# for this package, and can be a relative path, such as: +# +#-------------------------------------------------------------------- +AC_PREREQ([2.69]) + +define(NsfVersion, 2.4.0) +AC_INIT([nsf], [NsfVersion], [https://sourceforge.net/p/next-scripting/tickets/]) + +AC_CONFIG_MACRO_DIR([m4]) +AC_CONFIG_AUX_DIR([tclconfig]) + +#-------------------------------------------------------------------- +# Call TEA_INIT as the first TEA_ macro to set up initial vars. +# This will define a ${TEA_PLATFORM} variable == "unix" or "windows". +#-------------------------------------------------------------------- + +TEA_INIT([3.10]) + +#-------------------------------------------------------------------- +# specify some extra flags +#-------------------------------------------------------------------- +# According to http://www.gnu.org/software/autoconf/manual/autoconf.html +# - "with" is for external software (optional packages) +# - "enable" is for optional features +# +AC_ARG_WITH([aolserver3], + AS_HELP_STRING([--with-aolserver3=AOL_SERVER_DIR], + [build an AOLserver 3 module; + point to directory containing aolsever/include (default: off)]), + [with_aol3=$withval], [with_aol3=no]) +AC_ARG_WITH([dtrace], + AS_HELP_STRING([--with-dtrace], [build nsf with dtrace (default: without)]), + [with_dtrace=$withval], [with_dtrace=no]) +AC_ARG_WITH([mongoc], + AS_HELP_STRING([--with-mongoc=MONGOC_INCLUDE_DIR[,MONGOC_LIB_DIR]], + [build nsf with mongodb c-driver support (default: without)]), + [with_mongoc=$withval], [with_mongoc=no]) +AC_ARG_WITH([bson], + AS_HELP_STRING([--with-bson=BSON_INCLUDE_DIR[,BSON_LIB_DIR]], + [build nsf with mongodb bson support (default: without)]), + [with_bson=$withval], [with_bson=no]) +AC_ARG_ENABLE([profile], + AS_HELP_STRING([--enable-profile], [build nsf with profile support (default: disabled)]), + [enable_profile=$enableval], [enable_profile=no]) +AC_ARG_ENABLE([memcount], + AS_HELP_STRING([--enable-memcount=yes|trace], + [build nsf with memcount debug support (default: disabled)]), + [enable_memcount=$enableval], [enable_memcount=no]) +AC_ARG_ENABLE([development], + AS_HELP_STRING([--enable-development=yes|test], + [build nsf with development support (intensive runtime checking, etc.; default: disabled)]), + [enable_development=$enableval], [enable_development=no]) +AC_ARG_ENABLE([assertions], + AS_HELP_STRING([--enable-assertions], + [build nsf with assertion support (default: enabled)]), + [enable_assertions=$enableval], [enable_assertions=yes]) +AC_ARG_ENABLE([assemble], + AS_HELP_STRING([--enable-assemble=yes|label|call], + [build nsf with assemble support (default: disabled)]), + [enable_assemble=$enableval], [enable_assemble=no]) + +subdirs="" + +if ! test "$with_mongoc" = no; then + test_mongodb=test-mongdb + subdirs="$subdirs ${srcdir}/library/mongodb" +fi + +test_actiweb="" +libdirs_actiweb="" +apps_actiweb="" + +AC_SUBST([subdirs]) + + +#-------------------------------------------------------------------- +# __CHANGE__ +# Set your package name and version numbers here. The NODOT_VERSION is +# required for constructing the library name on systems that don't like +# dots in library names (Windows). The VERSION variable is used on the +# other systems. +#-------------------------------------------------------------------- + +NSF_MAJOR_VERSION=2 +NSF_MINOR_VERSION=4 + +NSF_PATCH_LEVEL=$PACKAGE_VERSION + +NSF_VERSION=${NSF_MAJOR_VERSION}.${NSF_MINOR_VERSION} +NODOT_VERSION=${NSF_MAJOR_VERSION}${NSF_MINOR_VERSION} + +AC_SUBST([NSF_VERSION]) +AC_SUBST([NSF_MAJOR_VERSION]) +AC_SUBST([NSF_MINOR_VERSION]) +AC_SUBST([NSF_PATCH_LEVEL]) + +echo "Configuring NSF Version $PACKAGE_VERSION" + +AC_CHECK_PROG(git_installed,git,"yes", "no") + +if test "$git_installed" = "yes" -a -d ".git" ; then + nsf_commit=`git describe --always --dirty` +elif test -f "COMMIT" ; then + nsf_commit=`cat COMMIT` +else + nsf_commit=unknown-${PACKAGE_VERSION} +fi + +NSF_COMMIT=$nsf_commit +AC_SUBST([NSF_COMMIT]) + +# AC_DEFINE_UNQUOTED([NSF_COMMIT], "$nsf_commit", +# [Commit ID at the time of the last configure run.]) + +AC_CHECK_TYPES([intptr_t, uintptr_t]) + + +#-------------------------------------------------------------------- +# Load the tclConfig.sh file +#-------------------------------------------------------------------- + +TEA_PATH_TCLCONFIG +TEA_LOAD_TCLCONFIG + +AC_CHECK_FUNCS([strnstr]) + +#-------------------------------------------------------------------- +# check for TK +#-------------------------------------------------------------------- + + +#-------------------------------------------------------------------- +# Handle the --prefix=... option by defaulting to what Tcl gave. +# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER. +#----------------------------------------------------------------------- + +TEA_PREFIX + +#----------------------------------------------------------------------- +# Standard compiler checks. +# This sets up CC by using the CC env var, or looks for gcc otherwise. +# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create +# the basic setup necessary to compile executables. +#----------------------------------------------------------------------- + +TEA_SETUP_COMPILER + +#-------------------------------------------------------------------- +# check for extra flags +# +# FORCE_NO_STUBS is deactivated for now +if ! test "$with_aol3" = "no"; then + echo "Pre-configuring AOL-Server (nsf)" + AOL_DEFINES="-DAOL_SERVER -DUSE_TCL8X -I$with_aol3/include -I$TCL_SRC_DIR/generic" + FORCE_NO_STUBS=1 +else + AOL_DEFINES="" + FORCE_NO_STUBS=0 +fi + +# set the default aol_prefix +aol_prefix="/usr/local/aolserver" +# if we have under ${prefix} either modules/tcl/init.tcl (aolserver +# style) or modules/tcl/init.tcl (naviserver style), then use +# ${prefix} as aol_prefix (path for the installation of +# aolserver/naviserver specific tcl files). +if test -f "${prefix}/modules/tcl/init.tcl" ; then + aol_prefix="${prefix}" +else + if test -f "${prefix}/tcl/init.tcl" ; then + aol_prefix="${prefix}" + fi +fi +AC_SUBST([aol_prefix]) + +#-------------------------------------------------------------------- +# check for tclCompile.h (needed, when compiled without full source) +if test -f "$TCL_SRC_DIR/generic/tclCompile.h"; then + AC_DEFINE([HAVE_TCL_COMPILE_H], [1], [Do we have tclCompile.h installed?]) +fi + +if test "$enable_assertions" = yes; then + AC_DEFINE([NSF_WITH_ASSERTIONS], [1], [Are we building with assertions support?]) +fi + +if test "$enable_profile" = yes; then + AC_DEFINE([NSF_PROFILE], [1], [Are we building with profile support?]) +fi + +if test "$enable_development" = yes; then + AC_DEFINE([NSF_DEVELOPMENT], [1], [Are we building with development support?]) +fi +if test "$enable_development" = test; then + AC_DEFINE([NSF_DEVELOPMENT_TEST], [1], [Are we building with development support and intesive testing?]) +fi + +if test "$enable_memcount" = yes; then + AC_DEFINE([NSF_MEM_COUNT], [1], [Are we building with memcount support?]) +fi +if test "$enable_memcount" = trace; then + AC_DEFINE([NSF_MEM_TRACE], [1], [Are we building with memcount tracing support?]) +fi + +if test "$enable_assemble" = yes; then + AC_DEFINE([NSF_ASSEMBLE], [1], [Are we building with assembly support?]) +fi +if test "$enable_assemble" = call; then + AC_DEFINE([NSF_ASSEMBLE_CT], [1], [Are we building with assembly call threading support?]) +fi +if test "$enable_assemble" = call; then + AC_DEFINE([NSF_ASSEMBLE_LT], [1], [Are we building with assembly label threading support?]) +fi + +DTRACE_OBJ= +if test "$with_dtrace" = yes; then + AC_DEFINE([NSF_DTRACE], [1], [Are we building with DTrace support?]) + # Under macOS, we need no nsfDTrace.o + if test "`uname -s`" != "Darwin" ; then + DTRACE_OBJ=nsfDTrace.o + fi + DTRACE_HDR='$(src_generic_dir)/nsfDTrace.h' + DTRACE_SRC='$(src_generic_dir)/nsfDTrace.d' +fi +AC_SUBST([DTRACE_OBJ]) +AC_SUBST([DTRACE_HDR]) +AC_SUBST([DTRACE_SRC]) + +#----------------------------------------------------------------------- +# __CHANGE__ +# Specify the C source files to compile in TEA_ADD_SOURCES, +# public headers that need to be installed in TEA_ADD_HEADERS, +# stub library C source files to compile in TEA_ADD_STUB_SOURCES, +# and runtime Tcl library files in TEA_ADD_TCL_SOURCES. +# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS +# and PKG_TCL_SOURCES. +#----------------------------------------------------------------------- +stubdir=stubs${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION} +TEA_ADD_SOURCES([nsf.c nsfError.c nsfObjectData.c nsfProfile.c \ + nsfDebug.c nsfUtil.c nsfObj.c nsfPointer.c nsfEnumerationType.c \ + nsfCmdDefinitions.c nsfFunPtrHashTable.c nsfShadow.c nsfCompile.c aolstub.c \${srcdir}/generic/${stubdir}/nsfStubInit.${OBJEXT}]) +TEA_ADD_HEADERS([generic/nsf.h generic/nsfInt.h generic/${stubdir}/nsfDecls.h generic/${stubdir}/nsfIntDecls.h]) +TEA_ADD_INCLUDES([]) +TEA_ADD_LIBS([]) +TEA_ADD_CFLAGS([-DNSF_VERSION=\\\"$NSF_VERSION\\\" -DNSF_PATCHLEVEL=\\\"$NSF_PATCH_LEVEL\\\" \ +-DNSF_COMMIT=\\\"$NSF_COMMIT\\\" $AOL_DEFINES ]) +TEA_ADD_STUB_SOURCES([nsfStubLib.c]) +TEA_ADD_TCL_SOURCES([]) + +#-------------------------------------------------------------------- +# __CHANGE__ +# +# You can add more files to clean if your extension creates any extra +# files by extending CLEANFILES. +# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure +# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var. +# +# A few miscellaneous platform-specific items: +# TEA_ADD_* any platform specific compiler/build info here. +#-------------------------------------------------------------------- + +if test "${TEA_PLATFORM}" = "windows" ; then + if test "$GCC" != "yes" ; then + AC_DEFINE([VISUAL_CC]) + fi + CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc50.pch vc60.pch " + #TEA_ADD_SOURCES([win/winFile.c]) + #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"]) +else + CLEANFILES="*.a *.so *~ core gmon.out" + #TEA_ADD_SOURCES([unix/unixFile.c]) + #TEA_ADD_LIBS([-lsuperfly]) +fi +CLEANFILES="$CLEANFILES *.${OBJEXT} pkgIndex.tcl" + +#-------------------------------------------------------------------- +# __CHANGE__ +# Choose which headers you need. Extension authors should try very +# hard to only rely on the Tcl public header files. Internal headers +# contain private data structures and are subject to change without +# notice. +# This must be done AFTER calling TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG +# so that we can extract TCL_SRC_DIR from the config file (in the case +# of private headers +#-------------------------------------------------------------------- + +#TEA_PUBLIC_TCL_HEADERS +TEA_PRIVATE_TCL_HEADERS + +#TEA_PUBLIC_TK_HEADERS +#TEA_PRIVATE_TK_HEADERS +#TEA_PATH_X + +#-------------------------------------------------------------------- +# Check whether --enable-threads or --disable-threads was given. +#-------------------------------------------------------------------- + +TEA_ENABLE_THREADS + +#-------------------------------------------------------------------- +# The statement below defines a collection of symbols related to +# building as a shared library instead of a static library. +#-------------------------------------------------------------------- + +TEA_ENABLE_SHARED + +#-------------------------------------------------------------------- +# This macro figures out what flags to use with the compiler/linker +# when building shared/static debug/optimized objects. This information +# can be taken from the tclConfig.sh file, but this figures it all out. +#-------------------------------------------------------------------- + +TEA_CONFIG_CFLAGS + +# Without the following two eval statements, NSF_SHARED_LIB_SUFFIX +# in nsfConfig.sh has $PACKAGE_VERSION unresolved. When another +# app links against nsf, the PACKAGE_VERSIONs are confused. +# +# Without the first eval, we get +# NSF_SHARED_LIB_SUFFIX=${PACKAGE_VERSION}\$\{DBGX\}${SHLIB_SUFFIX} +# NSF_UNSHARED_LIB_SUFFIX=${PACKAGE_VERSION}\$\{DBGX\}.a +# +# after the first eval, we get +# NSF_SHARED_LIB_SUFFIX=1.2.1${DBGX}.so +# NSF_UNSHARED_LIB_SUFFIX=1.2.1${DBGX}.a +# after the second eval, all variables are resolved. + + +eval "SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}" +eval "UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}" + +#eval "SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}" +#eval "UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}" + +#-------------------------------------------------------------------- +# Set the default compiler switches based on the --enable-symbols +# option. +#-------------------------------------------------------------------- + +TEA_ENABLE_SYMBOLS + +#-------------------------------------------------------------------- +# Everyone should be linking against the Tcl stub library. If you +# can't for some reason, remove this definition. If you aren't using +# stubs, you also need to modify the SHLIB_LD_LIBS setting below to +# link against the non-stubbed Tcl library. +#-------------------------------------------------------------------- + +AC_DEFINE([USE_TCL_STUBS], [1], [Use Tcl stubs]) + +#-------------------------------------------------------------------- +# This macro generates a line to use when building a library. It +# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS, +# and TEA_LOAD_TCLCONFIG macros above. +#-------------------------------------------------------------------- + +TEA_MAKE_LIB + +#-------------------------------------------------------------------- +# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl +# file during the install process. Don't run the TCLSH_PROG through +# ${CYGPATH} because it's being used directly by make. +# Require that we use a tclsh shell version 8.2 or later since earlier +# versions have bugs in the pkg_mkIndex routine. +#-------------------------------------------------------------------- + +TEA_PROG_TCLSH + +# make this available, for such as nsfConfig.sh +NSF_COMPATIBLE_TCLSH=${TCLSH_PROG} +AC_SUBST([NSF_COMPATIBLE_TCLSH]) +AC_SUBST([TCL_EXEC_PREFIX]) + +# +# Next Scripting specific configs +# +#NSF_SRC_DIR=$srcdir +#NSF_SRC_DIR="`pwd`" + +NSF_BUILD_DIR=${PWD} +cd ${srcdir} +NSF_SRC_DIR=${PWD} +cd ${NSF_BUILD_DIR} + +AC_SUBST([NSF_SRC_DIR]) + +eval "NSF_PKG_LIBDIR=\"${libdir}/${PACKAGE_NAME}${PACKAGE_VERSION}\"" + +if test "${TEA_PLATFORM}" != "windows" ; then + +NSF_BUILD_LIB_SPEC="-L${NSF_BUILD_DIR} -lnsf${PACKAGE_VERSION}" +NSF_LIB_SPEC="-L${NSF_PKG_LIBDIR} -lnsf${PACKAGE_VERSION}" + +# If someone wants to build without stubs, as it was the case for +# earlier Tcl versions, we keep the following block as a reference. +if test "${TCL_MAJOR_VERSION}" = "8" -a "${TCL_MINOR_VERSION}" = "0"; then + NSF_BUILD_STUB_LIB_PATH="" + NSF_STUB_LIB_PATH="" + NSF_BUILD_STUB_LIB_SPEC="" + NSF_STUB_LIB_SPEC="" +else + NSF_BUILD_STUB_LIB_PATH="${NSF_SRC_DIR}/${PKG_STUB_LIB_FILE}" + NSF_STUB_LIB_PATH="${NSF_PKG_LIBDIR}/${PKG_STUB_LIB_FILE}" + NSF_BUILD_STUB_LIB_SPEC="-L${NSF_BUILD_DIR} -lnsfstub${PACKAGE_VERSION}" + NSF_STUB_LIB_SPEC="-L${NSF_PKG_LIBDIR} -lnsfstub${PACKAGE_VERSION}" + AC_DEFINE([COMPILE_NSF_STUBS]) +fi + +else + + NSF_BUILD_LIB_SPEC="${NSF_SRC_DIR}/${PKG_LIB_FILE}" + NSF_LIB_SPEC="${NSF_PKG_LIBDIR}/${PKG_LIB_FILE}" + NSF_BUILD_STUB_LIB_PATH="${NSF_BUILD_DIR}/${PKG_STUB_LIB_FILE}" + NSF_STUB_LIB_PATH="${NSF_PKG_LIBDIR}/${PKG_STUB_LIB_FILE}" + NSF_BUILD_STUB_LIB_SPEC="${NSF_BUILD_DIR}/${PKG_STUB_LIB_FILE}" + NSF_STUB_LIB_SPEC="${NSF_PKG_LIBDIR}/${PKG_STUB_LIB_FILE}" + AC_DEFINE([COMPILE_NSF_STUBS]) + +fi + +AC_SUBST([SHARED_LIB_SUFFIX]) +AC_SUBST([UNSHARED_LIB_SUFFIX]) +AC_SUBST([NSF_BUILD_LIB_SPEC]) +AC_SUBST([NSF_LIB_SPEC]) +AC_SUBST([NSF_BUILD_STUB_LIB_SPEC]) +AC_SUBST([NSF_STUB_LIB_SPEC]) +AC_SUBST([NSF_BUILD_STUB_LIB_PATH]) +AC_SUBST([NSF_STUB_LIB_PATH]) +AC_SUBST([NXSH]) +AC_SUBST([XOWISH]) + +# include dirs for nsf during build process (i.e., does not assume installed) +NSF_BUILD_INCLUDE_DIR="${NSF_SRC_DIR}/generic" +NSF_BUILD_INCLUDE_SPEC="-I${NSF_BUILD_INCLUDE_DIR}" +AC_SUBST([NSF_BUILD_INCLUDE_DIR]) +AC_SUBST([NSF_BUILD_INCLUDE_SPEC]) + + +eval "NSF_INCLUDE_DIR=\"$includedir\"" +AC_SUBST([NSF_INCLUDE_DIR]) + +AC_SUBST([test_actiweb]) +AC_SUBST([libdirs_actiweb]) +AC_SUBST([apps_actiweb]) + +AC_SUBST([TEA_PLATFORM]) + +dnl macro expanding to the names of files ./configure is to generate. +dnl reasoning: this is a factoring; I use this value elsewhere. +dnl +dnl Change the value of -this- macro if you want to add or remove +dnl such files. + +AC_DEFUN([CONFIG_OUTPUT_FILES], [[Makefile ${srcdir}/nsfConfig.sh ${srcdir}/unix/pkgIndex.unix build.tcl ${srcdir}/doc/version.inc]]) + +#-------------------------------------------------------------------- +# the value of this variable is set to the files which are to be +# removed when the user invokes 'make distclean' (i.e., those +# files generated by ./configure) and is used in the make distclean +# target, defined in Makefile.in +#-------------------------------------------------------------------- + +CONFIG_CLEAN_FILES="CONFIG_OUTPUT_FILES autom4te.cache/" +AC_SUBST([CONFIG_CLEAN_FILES]) +AC_CONFIG_FILES(CONFIG_OUTPUT_FILES) + +#-------------------------------------------------------------------- +# Finally, substitute all of the various values into the Makefile, +# and generate the other output files. (this is done by invoking +# config.status) +# +# NOTE the lack of parameters! AC_OUTPUT with params is deprecated; +# use macros such as AC_CONFIG_FILES, AC_HEADER_FILES, etc to add +# to the files output by ./configure. +#-------------------------------------------------------------------- + +AC_OUTPUT + +for subdir in ${subdirs} +do + echo "==================== configure $subdir" + if test x"${srcdir}" = x. ; then + confdir=. + else + #mkdir -p $subdir + confdir=${srcdir}/$subdir + fi + (cd $subdir; echo $SHELL ${confdir}/configure ${ac_configure_args} --prefix=${prefix} --with-nsf=${NSF_SRC_DIR}; eval $SHELL ${confdir}/configure ${ac_configure_args} --prefix=${prefix} --with-nsf=${NSF_SRC_DIR}) +done + +