diff --git a/Makefile b/Makefile index f8ee01d..44e3f13 100644 --- a/Makefile +++ b/Makefile @@ -1,28 +1,23 @@ -# $Id: Makefile,v 1.26 2005/06/27 17:06:01 tomas Exp $ +# $Id: Makefile,v 1.26.2.1 2007/05/08 21:35:11 carregal Exp $ T= lfs -V= 1.2 +V= 1.2.1 CONFIG= ./config include $(CONFIG) -COMPAT_O= $(COMPAT_DIR)/compat-5.1.o SRCS= src/$T.c -OBJS= src/$T.o $(COMPAT_O) - +OBJS= src/$T.o lib: src/$(LIBNAME) src/$(LIBNAME): $(OBJS) export MACOSX_DEPLOYMENT_TARGET="10.3"; $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) -$(COMPAT_O): $(COMPAT_DIR)/compat-5.1.c - $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c - install: src/$(LIBNAME) mkdir -p $(LUA_LIBDIR) cp src/$(LIBNAME) $(LUA_LIBDIR) cd $(LUA_LIBDIR); ln -f -s $(LIBNAME) $T.so clean: - rm -f src/$(LIBNAME) $(OBJS) $(COMPAT_O) + rm -f src/$(LIBNAME) $(OBJS) diff --git a/Makefile.win b/Makefile.win new file mode 100644 index 0000000..29b7483 --- /dev/null +++ b/Makefile.win @@ -0,0 +1,24 @@ +# $Id: Makefile.win,v 1.4.2.1 2007/05/08 21:35:11 carregal Exp $ + +T= lfs +V= 1.2.1 + +include config.win + +SRCS= src\$T.c +OBJS= src\$T.obj + +lib: src\$(LIBNAME) + +.c.obj: + $(CC) /c /Fo$@ $(CFLAGS) $< + +src\$(LIBNAME): $(OBJS) + link /dll /def:src\$T.def /out:src\$(LIBNAME) $(OBJS) $(LUA_LIB) + +install: src\$(LIBNAME) + IF NOT EXIST $(LUA_LIBDIR) mkdir $(LUA_LIBDIR) + copy src\$(LIBNAME) $(LUA_LIBDIR) + +clean: + del src\$(LIBNAME) $(OBJS) src\$T.lib src\$T.exp diff --git a/README b/README new file mode 100644 index 0000000..f82f97d --- /dev/null +++ b/README @@ -0,0 +1,43 @@ +Overview +-------- + +LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution. LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. LuaFileSystem is free software and uses the same license as Lua 5.1 + +Status +------ + +Current version is 1.2.1. It was developed for Lua 5.1. + +Download +-------- + +LuaFileSystem source can be downloaded from its Lua Forge page. If you are using LuaBinaries 5.1.2 a Windows binary version of LuaFileSystem can be found at the same LuaForge page. + +History +------- + +Version 1.2.1 [08/May/2007] +* compatible only with Lua 5.1 (Lua 5.0 support was dropped) + +Version 1.2 [15/Mar/2006] +* added optional argument to lfs.attributes +* added function lfs.rmdir +* bug correction on lfs.dir + +Version 1.1 [30/May/2005] +* added function lfs.touch. + +Version 1.0 [21/Jan/2005] +Version 1.0 Beta [10/Nov/2004] + +Credits +------- + +LuaFileSystem was designed by Roberto Ierusalimschy, André Carregal and Tomás Guisasola as part of the Kepler Project, which holds its copyright. + +Contact us +---------- + +For more information please contact us on (info @ keplerproject.org). Comments are welcome! + +You can also reach other Kepler developers and users on the Kepler Project mailing list. \ No newline at end of file diff --git a/config b/config index 5bbd47a..4506259 100644 --- a/config +++ b/config @@ -1,20 +1,19 @@ # Installation directories # System's libraries directory (where binary libraries are installed) -LUA_LIBDIR= /usr/local/lib/lua/5.0 +LUA_LIBDIR= /usr/local/lib/lua/5.1 # Lua includes directory -LUA_INC= /usr/local/include +LUA_INC= /usr/local/include/lua51 # OS dependent LIB_OPTION= -shared #for Linux #LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X LIBNAME= $T.so.$V -COMPAT_DIR= ../compat/src # Compilation directives WARN= -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -INCS= -I$(LUA_INC) -I$(COMPAT_DIR) +INCS= -I$(LUA_INC) CFLAGS= $(WARN) $(INCS) CC= gcc -# $Id: config,v 1.14 2005/06/24 01:49:16 tomas Exp $ +# $Id: config,v 1.14.2.1 2007/05/08 21:35:10 carregal Exp $ diff --git a/config.win b/config.win new file mode 100644 index 0000000..476434d --- /dev/null +++ b/config.win @@ -0,0 +1,17 @@ +# Installation directories +# System's libraries directory (where binary libraries are installed) +LUA_LIBDIR= c:\lua5.1\lib +# Lua includes directory +LUA_INC= c:\lua5.1\include +# Lua library +LUA_LIB= c:\lua5.1\bin\lua5.1.lib + +LIBNAME= $T.dll + +# Compilation directives +WARN= /O2 +INCS= /I$(LUA_INC) +CFLAGS= $(WARN) $(INCS) +CC= cl + +# $Id: config.win,v 1.3.2.1 2007/05/08 21:35:10 carregal Exp $ diff --git a/doc/us/examples.html b/doc/us/examples.html index 89f7070..6283a88 100644 --- a/doc/us/examples.html +++ b/doc/us/examples.html @@ -39,6 +39,7 @@
LuaFileSystem is free software and uses the same -license as Lua 5.0.
+license as Lua 5.1.Current version is 1.2. It was developed for Lua 5.0.
- -Version 1.2 follows the -package model -for Lua 5.1 (see section Installation -for more details).
- +Current version is 1.2.1. It was developed for Lua 5.1.
LuaFileSystem source can be downloaded from its Lua Forge page. If you are using -LuaBinaries Release 2 -a Windows binary version of LuaFileSystem can also be found at the -LuaForge page.
- +LuaBinaries 5.1.2 a Windows binary +version of LuaFileSystem can be found at the same LuaForge page.$Id: index.html,v 1.30 2006/03/15 16:44:04 carregal Exp $
+$Id: index.html,v 1.30.2.1 2007/05/08 21:35:11 carregal Exp $
Copyright © 2004-2006 The Kepler Project.
+Copyright © 2004-2007 The Kepler Project.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -113,7 +114,7 @@ SOFTWARE.
diff --git a/doc/us/manual.html b/doc/us/manual.html index 281c06e..23c0104 100644 --- a/doc/us/manual.html +++ b/doc/us/manual.html @@ -37,6 +37,7 @@LuaFileSystem offers a portable way to access the underlying directory structure and file attributes.
++LuaFileSystem should be built with Lua 5.1 so the language library +and header files for the target version must be installed properly. +
+ +
+LuaFileSystem offers a Makefile and a separate configuration file,
+config,
+which should be edited to suit your installation before runnig
+make.
+The file has some definitions like paths to the external libraries,
+compiler options and the like.
+
LuaFileSystem follows the
-package model
-for Lua 5.1, therefore it should be "installed". Refer to
-
-Compat-5.1 configuration section about how to install the compiled
-binary properly.
-The compiled binary should be copied to a directory in your
-LUA_CPATH.
The LuaFileSystem compiled binary should be copied to a directory in your +C path.
Windows users can use the binary version of LuaFileSystem
(lfs.dll) available at
@@ -96,7 +107,7 @@ LuaFileSystem offers the following functions:
The attributes are described as follows;
attribute mode is a string, all the others are numbers,
and the time related attributes use the same time reference of
- os.time:
+ os.time:
dev$Id: manual.html,v 1.30.2.1 2006/03/15 20:30:53 carregal Exp $
+$Id: manual.html,v 1.30.2.2 2007/05/08 21:35:11 carregal Exp $