From 688617bc9c3d4651222c378344689c0a58930992 Mon Sep 17 00:00:00 2001 From: Jeff Hobbs Date: Wed, 29 Jan 2003 17:49:53 +0000 Subject: [PATCH] * library/pkgIndex.tcl.in (new): * library/pkgIndex.tcl: Replace pkgIndex.tcl with one that is * configure: generated by configure to include the right * configure.in: vfs dll name. Left the old one for * Makefile.in: non-configure users, but it can be wrong. Also added tarvfs.tcl to list of files to install. --- ChangeLog | 11 ++++++++++ Makefile.in | 36 ++++++++++++++++++++------------- configure | 4 ++-- configure.in | 2 +- library/pkgIndex.tcl | 8 +++----- library/pkgIndex.tcl.in | 45 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 84 insertions(+), 22 deletions(-) create mode 100644 library/pkgIndex.tcl.in diff --git a/ChangeLog b/ChangeLog index 18b8d28..bcae5af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2003-01-29 Jeff Hobbs + + * library/pkgIndex.tcl.in (new): + * library/pkgIndex.tcl: Replace pkgIndex.tcl with one that is + * configure: generated by configure to include the right + * configure.in: vfs dll name. Left the old one for + * Makefile.in: non-configure users, but it can be wrong. + Also added tarvfs.tcl to list of files to install. + + * library/vfsUtils.tcl: code cleanup + 2003-01-28 Vince Darley * library/*.tcl: add 'package provide vfs::' to the virtual filesystems. These are the current versions: diff --git a/Makefile.in b/Makefile.in index 34fdc6a..65858b5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -29,13 +29,15 @@ vfs_LIB_FILE = @vfs_LIB_FILE@ #======================================================================== # RUNTIME_SOURCES identifies Tcl runtime files that are associated with -# this package that need to be installed, if any. +# this package that need to be installed, if any. They are moved into +# top_builddir/library and then installed. pkgIndex.tcl is generated +# through the configure script. #======================================================================== -RUNTIME_SOURCES = pkgIndex.tcl ftpvfs.tcl httpvfs.tcl mk4vfs.tcl \ - starkit.tcl tclprocvfs.tcl testvfs.tcl \ - vfslib.tcl vfsUrl.tcl vfsUtils.tcl \ - webdavvfs.tcl zipvfs.tcl tclIndex +RUNTIME_SOURCES = ftpvfs.tcl httpvfs.tcl mk4vfs.tcl starkit.tcl \ + tarvfs.tcl tclIndex tclprocvfs.tcl testvfs.tcl \ + vfsUrl.tcl vfsUtils.tcl vfslib.tcl \ + webdavvfs.tcl zipvfs.tcl #======================================================================== # This is a list of header files to be installed @@ -136,7 +138,7 @@ EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@ DEFS = $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS) -CONFIG_CLEAN_FILES = Makefile +CONFIG_CLEAN_FILES = Makefile library/pkgIndex.tcl CPPFLAGS = @CPPFLAGS@ LIBS = @LIBS@ @@ -169,9 +171,10 @@ all: binaries libraries doc binaries: $(BINARIES) libraries: + @mkdir -p $(top_builddir)/library/ @list='$(RUNTIME_SOURCES)'; for p in $$list; do \ if test -f $(srcdir)/library/$$p; then \ - $(INSTALL_DATA) $(srcdir)/library/$$p $(top_builddir)/$$p; \ + $(INSTALL_DATA) $(srcdir)/library/$$p $(top_builddir)/library/$$p;\ fi; \ done @@ -264,12 +267,13 @@ VPATH = $(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win # variable in configure.in #======================================================================== -clean: +clean: + -cd $(top_builddir) -test -z "$(BINARIES)" || rm -f $(BINARIES) -rm -f *.$(OBJEXT) core *.core -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) list='$(RUNTIME_SOURCES)'; for p in $$list; do \ - rm -f $$p; \ + rm -f library/$$p; \ done distclean: clean @@ -308,10 +312,9 @@ install-lib-binaries: fi; \ done @echo "Installing runtime sources in $(DESTDIR)$(pkglibdir)/" - @list='$(RUNTIME_SOURCES)'; for p in $$list; do \ - if test -f $(srcdir)/library/$$p; then \ - $(INSTALL_DATA) $(srcdir)/library/$$p $(DESTDIR)$(pkglibdir)/$$p; \ - fi; \ + @for i in $(top_builddir)/library/*; do \ + rm -f $(DESTDIR)$(pkglibdir)/`basename $$i`; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(pkglibdir)/ ; \ done #======================================================================== @@ -331,7 +334,11 @@ install-bin-binaries: .SUFFIXES: .c .$(OBJEXT) -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +library/pkgIndex.tcl: $(srcdir)/library/pkgIndex.tcl.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +Makefile: library/pkgIndex.tcl $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -342,6 +349,7 @@ uninstall-binaries: list='$(RUNTIME_SOURCES)'; for p in $$list; do \ rm -f $(DESTDIR)$(pkglibdir)/$$p; \ done + rm -f $(DESTDIR)$(pkglibdir)/pkgIndex.tcl; \ list='$(bin_BINARIES)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/$$p; \ done diff --git a/configure b/configure index f8686ce..572e1a8 100755 --- a/configure +++ b/configure @@ -3550,7 +3550,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 library/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 a58fc5f..57dab7b 100644 --- a/configure.in +++ b/configure.in @@ -98,4 +98,4 @@ TEA_PROG_TCLSH # Finally, substitute all of the various values into the Makefile. #-------------------------------------------------------------------- -AC_OUTPUT([Makefile]) +AC_OUTPUT([Makefile] library/pkgIndex.tcl) diff --git a/library/pkgIndex.tcl b/library/pkgIndex.tcl index d046d45..6269c39 100644 --- a/library/pkgIndex.tcl +++ b/library/pkgIndex.tcl @@ -1,11 +1,9 @@ # Tcl package index file, version 1.1 # This file was generated by hand. # -# It invokes the "package ifneeded" command to set up package-related -# information so that packages will be loaded automatically in response -# to "package require" commands. When this script is sourced, the -# variable $dir must contain the full path name of this file's -# directory. +# This file is used by makefile.vc until that properly auto-generates it. +# pkgIndex.tcl.in is used instead of configure-based builds. +# Keep in sync with pkgIndex.tcl.in until this goes away. # We don't really want to throw an error with older versions of # Tcl, they should just ignore us. diff --git a/library/pkgIndex.tcl.in b/library/pkgIndex.tcl.in new file mode 100644 index 0000000..c13ae9f --- /dev/null +++ b/library/pkgIndex.tcl.in @@ -0,0 +1,45 @@ +# Tcl package index file, version 1.1 +# This file was generated by hand. +# +# This will be autogenerated by configure to use the correct name +# for the vfs dynamic library. +# Keep in sync with pkgIndex.tcl until that goes away. + +# We don't really want to throw an error with older versions of +# Tcl, they should just ignore us. +if {[package provide Tcl] < 8.4} { + return +} +package require Tcl 8.4 + +namespace eval ::vfs {} +variable vfs::dll [file join $dir @vfs_LIB_FILE@] + +proc loadvfs {dll} { + global auto_path + if {![file exists $dll]} { return } + set dir [file dirname $dll] + if {[lsearch -exact $auto_path $dir] == -1} { + lappend auto_path $dir + } + load $dll +} + +package ifneeded vfs 1.0 [list loadvfs $dll] +package ifneeded starkit 1.0 [list source [file join $dir starkit.tcl]] +package ifneeded vfslib 1.3 [list source [file join $dir vfslib.tcl]] + +# Old +package ifneeded mk4vfs 1.6 [list source [file join $dir mk4vfs.tcl]] +package ifneeded zipvfs 1.0 [list source [file join $dir zipvfs.tcl]] + +# New +package ifneeded vfs::ftp 1.0 [list source [file join $dir ftpvfs.tcl]] +package ifneeded vfs::http 0.5 [list source [file join $dir httpvfs.tcl]] +package ifneeded vfs::mk4 1.6 [list source [file join $dir mk4vfs.tcl]] +package ifneeded vfs::ns 0.5 [list source [file join $dir tclprocvfs.tcl]] +package ifneeded vfs::tar 0.9 [list source [file join $dir tarvfs.tcl]] +package ifneeded vfs::test 1.0 [list source [file join $dir testvfs.tcl]] +package ifneeded vfs::urltype 1.0 [list source [file join $dir vfsUrl.tcl]] +package ifneeded vfs::webdav 0.1 [list source [file join $dir webdavvfs.tcl]] +package ifneeded vfs::zip 1.0 [list source [file join $dir zipvfs.tcl]] -- 2.23.0