From: Pat Thoyts Date: Fri, 28 Feb 2003 23:49:21 +0000 (+0000) Subject: Fixed the build to create a proper pkgIndex X-Git-Tag: winsend-0-6~4 X-Git-Url: http://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=5b2c527c24354eabb85d44cd145212175b6fe4a5;p=winsend Fixed the build to create a proper pkgIndex --- diff --git a/LICENSE b/LICENSE index 9442699..4e422ba 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2002 Patrick Thoyts +Copyright (C) 2002 Patrick Thoyts Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/Makefile.in b/Makefile.in index 25f9dfc..3b661cb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,13 +1,12 @@ # Makefile.in -- # -# This file is a Makefile for Sample TEA Extension. If it has the name +# This file is a Makefile for the Winsend package. 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 ActiveState SRL. +# Copyright (c) 2002 Pat Thoyts # # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. @@ -189,15 +188,12 @@ all: binaries libraries doc # of the Makefile, in the "BINARIES" variable. #======================================================================== -binaries: $(BINARIES) pkgIndex.tcl +binaries: $(BINARIES) libraries: doc: - @echo "If you have documentation to create, place the commands to" - @echo "build the docs in the 'doc:' target. For example:" - @echo " xml2nroff sample.xml > sample.n" - @echo " xml2html sample.xml > sample.html" +# cd $(top_builddir)/doc && mpexpand nroff winsend.man winsend.n install: all install-binaries install-libraries install-doc @@ -211,12 +207,12 @@ install-binaries: binaries install-lib-binaries install-bin-binaries #======================================================================== install-libraries: libraries - @mkdir -p $(DESTDIR)$(includedir) - @echo "Installing header files in $(DESTDIR)$(includedir)" - @for i in $(GENERIC_HDRS) ; do \ - echo "Installing $$i" ; \ - $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \ - done; +# @mkdir -p $(DESTDIR)$(includedir) +# @echo "Installing header files in $(DESTDIR)$(includedir)" +# @for i in $(GENERIC_HDRS) ; do \ +# echo "Installing $$i" ; \ +# $(INSTALL_DATA) $$i $(DESTDIR)$(includedir) ; \ +# done; #======================================================================== # Install documentation. Unix manpages should go in the $(mandir) @@ -286,13 +282,13 @@ VPATH = $(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win # the configure script output the pkgIndex.tcl by editing configure.in. #======================================================================== -pkgIndex.tcl: - ( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH) - -pkgIndex.tcl-hand: - (echo 'package ifneeded $(PACKAGE) $(VERSION) \ - [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\ - ) > pkgIndex.tcl +#pkgIndex.tcl: +# ( echo pkg_mkIndex . $($(PACKAGE)_LIB_FILE) \; exit; ) | $(TCLSH) +# +#pkgIndex.tcl-hand: +# (echo 'package ifneeded $(PACKAGE) $(VERSION) \ +# [list load [file join $$dir $($(PACKAGE)_LIB_FILE)]]'\ +# ) > pkgIndex.tcl #======================================================================== # Distribution creation diff --git a/configure b/configure index 4c13399..5d97dc0 100644 --- a/configure +++ b/configure @@ -4466,6 +4466,12 @@ fi # which require substituting th AC variables in. Include these here. #-------------------------------------------------------------------- +PKG_RELEASE_LIB="${PACKAGE}${MAJOR_VERSION}${MINOR_VERSION}${SHLIB_SUFFIX}" +PKG_DEBUG_LIB="${PACKAGE}${MAJOR_VERSION}${MINOR_VERSION}${tcl_dbgx}${SHLIB_SUFFIX}" + + + + trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure @@ -4579,7 +4585,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile pkgIndex.tcl" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/configure.in b/configure.in index 3bbe422..2b8e747 100644 --- a/configure.in +++ b/configure.in @@ -36,7 +36,7 @@ AC_SUBST(CONFIGDIR) PACKAGE=winsend MAJOR_VERSION=0 -MINOR_VERSION=5 +MINOR_VERSION=6 PATCHLEVEL= VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL} @@ -212,4 +212,10 @@ TEA_PROG_TCLSH # which require substituting th AC variables in. Include these here. #-------------------------------------------------------------------- -AC_OUTPUT([Makefile]) +PKG_RELEASE_LIB="${PACKAGE}${MAJOR_VERSION}${MINOR_VERSION}${SHLIB_SUFFIX}" +PKG_DEBUG_LIB="${PACKAGE}${MAJOR_VERSION}${MINOR_VERSION}${tcl_dbgx}${SHLIB_SUFFIX}" +AC_SUBST([PKG_RELEASE_LIB]) +AC_SUBST([PKG_DEBUG_LIB]) + + +AC_OUTPUT([Makefile pkgIndex.tcl]) diff --git a/pkgIndex.tcl.in b/pkgIndex.tcl.in new file mode 100644 index 0000000..090c146 --- /dev/null +++ b/pkgIndex.tcl.in @@ -0,0 +1,8 @@ +# Package index file for Winsend + +if {[info exists ::tcl_platform(debug)] && $::tcl_platform(debug)} { + package ifneeded @PACKAGE@ @VERSION@ [list load [file join $dir @PKG_DEBUG_LIB@]] +} else { + package ifneeded @PACKAGE@ @VERSION@ [list load [file join $dir @PKG_RELEASE_LIB@]] +} + diff --git a/tests/all.tcl b/tests/all.tcl new file mode 100644 index 0000000..d711f38 --- /dev/null +++ b/tests/all.tcl @@ -0,0 +1,58 @@ +# all.tcl -- +# +# This file contains a top-level script to run all of the Tcl +# tests. Execute it by invoking "source all.test" when running tcltest +# in this directory. +# +# Copyright (c) 1998-2000 by Scriptics Corporation. +# All rights reserved. +# +# RCS: @(#) $Id$ + +if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import ::tcltest::* +} + +set ::tcltest::testSingleFile false +set ::tcltest::testsDirectory [file dir [info script]] + +# We need to ensure that the testsDirectory is absolute +::tcltest::normalizePath ::tcltest::testsDirectory + +set chan $::tcltest::outputChannel + +puts $chan "Tests running in interp: [info nameofexecutable]" +puts $chan "Tests running with pwd: [pwd]" +puts $chan "Tests running in working dir: $::tcltest::testsDirectory" +if {[llength $::tcltest::skip] > 0} { + puts $chan "Skipping tests that match: $::tcltest::skip" +} +if {[llength $::tcltest::match] > 0} { + puts $chan "Only running tests that match: $::tcltest::match" +} + +if {[llength $::tcltest::skipFiles] > 0} { + puts $chan "Skipping test files that match: $::tcltest::skipFiles" +} +if {[llength $::tcltest::matchFiles] > 0} { + puts $chan "Only sourcing test files that match: $::tcltest::matchFiles" +} + +set timeCmd {clock format [clock seconds]} +puts $chan "Tests began at [eval $timeCmd]" + +# source each of the specified tests +foreach file [lsort [::tcltest::getMatchingFiles]] { + set tail [file tail $file] + puts $chan $tail + if {[catch {source $file} msg]} { + puts $chan $msg + } +} + +# cleanup +puts $chan "\nTests ended at [eval $timeCmd]" +::tcltest::cleanupTests 1 +return +