+2003-01-29 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * 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 <vincentdarley@sourceforge.net>
* library/*.tcl: add 'package provide vfs::<name>' to the
virtual filesystems. These are the current versions:
#========================================================================
# 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
DEFS = $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS)
-CONFIG_CLEAN_FILES = Makefile
+CONFIG_CLEAN_FILES = Makefile library/pkgIndex.tcl
CPPFLAGS = @CPPFLAGS@
LIBS = @LIBS@
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
# 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
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
#========================================================================
.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
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
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 <<EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile library/pkgIndex.tcl"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# Finally, substitute all of the various values into the Makefile.
#--------------------------------------------------------------------
-AC_OUTPUT([Makefile])
+AC_OUTPUT([Makefile] library/pkgIndex.tcl)
# 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.
--- /dev/null
+# 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]]