From: Vince Darley <vincentdarley@sourceforge.net>
Date: Mon, 10 Sep 2001 16:34:35 +0000 (+0000)
Subject: make fixes
X-Git-Tag: vfs-1-2~109
X-Git-Url: http://www.privyetmir.co.uk/gitweb?a=commitdiff_plain;h=c3172140f11ba17025b539f1bc33a2db890f3ccb;p=tclvfs

make fixes
---

diff --git a/ChangeLog b/ChangeLog
index 968a410..cea86cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
 2001-09-07  Vince Darley <vincentdarley@sourceforge.net>
+	* generic/vfs.c: Fixed '==' error
+	* doc/vfs.n: Improved docs.
+	* library/mk4vfs.tcl: Better mk support
+
+2001-09-06  Vince Darley <vincentdarley@sourceforge.net>
 	* Further minor improvements, unfortunately requires
 	new release of Tcl from cvs (today).  Also added
 	'install' target to vc++ makefile.
diff --git a/Makefile.in b/Makefile.in
index 364d557..b7d14cd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -31,7 +31,7 @@ BINARIES=$(lib_BINARIES)
 # This will be used when a dist target is added to the Makefile.
 #========================================================================
 
-vfs_SOURCES = vfs.c
+vfs_SOURCES = generic/vfs.c
 SOURCES = $(vfs_SOURCES)
 
 #========================================================================
@@ -42,7 +42,7 @@ SOURCES = $(vfs_SOURCES)
 #
 #========================================================================
 
-vfs_OBJECTS =  vfs.$(OBJEXT)
+vfs_OBJECTS =  generic/vfs.$(OBJEXT)
 OBJECTS = $(vfs_OBJECTS)
 
 #========================================================================
@@ -163,7 +163,7 @@ AUTOCONF = autoconf
 
 LDFLAGS = $(LDFLAGS_DEFAULT)
 
-INCLUDES = @TCL_INCLUDES@
+INCLUDES = @TCL_INCLUDES@ 
 
 EXTRA_CFLAGS = $(TCL_DEFS) $(PROTO_FLAGS) $(SECURITY_FLAGS) $(MEM_DEBUG_FLAGS) $(KEYSYM_FLAGS) $(NO_DEPRECATED_FLAGS) $(TCL_EXTRA_CFLAGS)
 
@@ -177,8 +177,9 @@ CONFIG_CLEAN_FILES = mkIndex.tcl
 CPPFLAGS = @CPPFLAGS@
 LIBS = @LIBS@
 AR = ar
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+## need to include the tcl source dir here for tclPort.h
+CFLAGS = @CFLAGS@ -I@TCL_SRC_DIR@/generic
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 
 CCLD = $(CC)
 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
 
diff --git a/configure.in b/configure.in
index d8b082f..f4f7350 100644
--- a/configure.in
+++ b/configure.in
@@ -12,7 +12,7 @@
 # AC_INIT(../generic/tcl.h)
 #--------------------------------------------------------------------
 
-AC_INIT(vfs.c)
+AC_INIT(generic/vfs.c)
 
 #AC_CONFIG_AUX_DIR(config)
 #CONFIGDIR=${srcdir}/config
diff --git a/doc/vfs.n b/doc/vfs.n
index 9cc8648..a35eea2 100644
--- a/doc/vfs.n
+++ b/doc/vfs.n
@@ -1,5 +1,5 @@
 '\"
-'\" Copyright (c) 2001 Vince Darley
+'\" Copyright (c) 2001, Vince Darley
 '\" 
 '\" 
 .so man.macros
@@ -21,6 +21,8 @@
 .sp
 \fBvfs::filesystem\fR \fIunmount\fR
 .sp
+\fBvfs::filesystem\fR \fImountschanged\fR
+.sp
 .sp
 \fBvfs::foo \fIa b c\fR
 .BE
@@ -34,7 +36,14 @@ filesystem is in place, the standard Tcl \fBfile\fP, \fBglob\fP,
 the Tcl library (e.g. \fBTcl_FSOpenFileChannel\fR,
 \fBTcl_FSMatchInDirectory\fR,...), can be used within the filesystem
 (and indeed, properly written extensions such as Tk which may open or
-read files will also transparently access the virtual filesystem).
+read files will also transparently access the virtual filesystem). 
+Because all of Tcl's FS activity passes through a single layer, it can
+all be intercepted.  This package does just that.  Notice that this
+is quite different to overloading the \fBfile\fP command in Tcl.  We
+are actually providing vfs replacements for C commands like
+\fBaccess\fP, \fBstat\fP.  By implementing just a handful of commands
+at this low level, we ensure that all commands at higher levels
+function irrespective of what is going on inside the FS layer.
 .PP
 The \fBpackage require vfs\fP command should be used to access this
 library.  It automatically registers the vfs hooks into Tcl's
@@ -59,6 +68,12 @@ If no arguments are given, this returns a list of all filesystems
 mounted.  If a path argument is given, then the \fIcommand\fR to be
 used for that path is returned, or an error is thrown if no vfs is
 mounted for that path.
+.TP
+\fBvfs::filesystem\fR \fImountschanged\fR
+There is generally no need to call this.  It is used by the library
+when the list of volumes changes, or when any kind of new mount point
+is added.  It ensures that Tcl's cached file representations are not
+out of date.
 .PP
 Currently mount information is stored by the extension in the
 vfs::mount array variable, but this should be considered private
@@ -77,7 +92,8 @@ Here \fIsubcmd\fR may be any of the following: \fIaccess\fR,
 \fImatchindirectory\fR, \fIopen\fR, \fIremovedirectory\fR, \fIstat\fR,
 \fIutime\fR. If \fIcommand\fR takes appropriate action for each of
 these cases, a complete, perfect virtual filesystem will be achieved,
-indistinguishable to Tcl from the native filesystem. 
+indistinguishable to Tcl from the native filesystem.  (CAVEATS: right 
+now I don't expose to Tcl all the permission-related flags of 'glob').
 .PP
 The remaining arguments specify a file path on which to operate (all
 commands operate on one of these), and any additional arguments which