]> git.e2factory.org Git - e2factory.git/commitdiff
Remove e2local and compiled lua libs
authorTobias Ulmer <tu@emlix.com>
Fri, 10 Aug 2012 07:30:30 +0000 (09:30 +0200)
committerTobias Ulmer <tu@emlix.com>
Mon, 13 Aug 2012 10:22:07 +0000 (12:22 +0200)
Finally get rid of compiled lua libs, an artifact from the past.  Also
remove the confusion around "e2local" which was just e2lib and other
modules bunched together in the past.

Following the removal of e2local, we can also get rid of loading
compiled lua bytecode, except where needed for backwards compatibility.

Signed-off-by: Tobias Ulmer <tu@emlix.com>
16 files changed:
.gitignore
example/Makefile
generic/Makefile
global/Makefile
global/e2-root.lua.in
global/e2.lua.in
local/Makefile
local/build-numbers.lua
local/build.lua
local/cf.lua
local/dlist.lua
local/dsort.lua
local/fetch-sources.lua
local/ls-project.lua
local/new-source.lua
local/playground.lua

index 4744a51cd7c3b6a60215ce6cb7a32ca3f345cec4..767d5b4e90302ad95b553c03d1d0f7517cc8b0d7 100644 (file)
@@ -1,4 +1,3 @@
 *~
 *.so
-*.lc
 tags
index f0875b62ef1c44a5f1b2f5a2439da7dc0447e8ae..16eb5bd75d6c6024642c4aa305aef011aa185d6c 100644 (file)
@@ -29,7 +29,7 @@ TOPLEVEL = ..
 
 include $(TOPLEVEL)/make.vars
 
-CLEAN_FILES = *~ *.lc *.so
+CLEAN_FILES = *~ *.so
 
 DOWNLOAD = http://www.e2factory.org/source/example
 E2FACTORY_GIT = http://git.e2factory.org/git/e2factory/e2factory.git
index f5e5a2d1f2c6db1bcd98f3df3eb973e77f1f8dab..95c2e1c3896e674de508ae4e2f40cfbe8f453d6b 100644 (file)
@@ -32,7 +32,7 @@ TOPLEVEL = ..
 
 include $(TOPLEVEL)/make.vars
 
-CLEAN_FILES = *~ *.lc *.o *.so
+CLEAN_FILES = *~ *.o *.so
 
 
 .PHONY: all install uninstall local install-local clean
index 2f13db308ccc13f856c8031c049e7f64dbc781ff..167579bbe629c4175190c6e7a455f511fe40b8bf 100644 (file)
@@ -35,7 +35,7 @@ SCRIPTS =
 GLOBALLUATOOLS = e2-create-project e2-fetch-project e2-install-e2 e2-root
 GLOBALSHTOOLS = e2-locate-project-root e2ssh
 GLOBALTOOLS = $(GLOBALLUATOOLS) $(GLOBALSHTOOLS)
-CLEAN_FILES = *~ $(GLOBALTOOLS) *.lc e2 $(SCRIPTS) *.lua e2-su *.sh e2.conf
+CLEAN_FILES = *~ $(GLOBALTOOLS) e2 $(SCRIPTS) *.lua e2-su *.sh e2.conf
 LUA_LIBS = strict.lua plugin.lua e2lib.lua
 LUA_LIBS += e2option.lua hash.lua tools.lua transport.lua cache.lua url.lua
 LUA_LIBS += generic_git.lua luafile.lua err.lua lock.lua
@@ -43,7 +43,7 @@ LUA_LIBS += buildconfig.lua
 
 .PHONY: all install uninstall clean
 
-all: e2 e2-root $(SCRIPTS) e2-su $(GLOBALLUATOOLS:=.lc) \
+all: e2 e2-root $(SCRIPTS) e2-su \
        $(GLOBALSHTOOLS:=.sh) e2.conf sha1.so e2-su-2.2 \
        luafile_ll.so e2util.so
 
@@ -62,7 +62,7 @@ install-lua: $(LUA_LIBS)
 
 install: all install-dirs install-lua
        for i in $(GLOBALLUATOOLS) ; do \
-               install -m 755 $$i.lc $(DESTDIR)$(TOOLDIR)/$$i ; \
+               install -m 755 $$i.lua $(DESTDIR)$(TOOLDIR)/$$i ; \
                ln -sf e2 $(DESTDIR)$(BINDIR)/$$i ; \
        done
        for i in $(GLOBALSHTOOLS) ; do \
@@ -112,20 +112,17 @@ clean:
 %.lua: %.lua.in
        $(TOPLEVEL)/scripts/genscript.sh $< $@
 
-%.lc: %.lua
-       $(BUILD_LUAC) -o $@ $<
-
 e2-su: e2-su.c
        $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@
 
 %.sh: %.sh.in
        $(TOPLEVEL)/scripts/genscript.sh $< $@
 
-e2: e2.lc
+e2: e2.lua
        echo "#!$(LIBEXECDIR)/e2-lua-$(LUA_VERSION)" >$@
        cat $< >>$@
 
-e2-root: e2-root.lc
+e2-root: e2-root.lua
        echo "#!$(LIBEXECDIR)/e2-lua-$(LUA_VERSION)" >$@
        cat $< >>$@
 
index 10ef077305f98a01132ed172122a4e058e1ccbe6..d72dae8b2d121db9367931ee8592281f86115050 100644 (file)
@@ -25,7 +25,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ]]
 
-package.path  = "@LIBDIR@/?.lc;@LIBDIR@/?.lua"
+package.path  = "@LIBDIR@/?.lua"
 package.cpath = "@LIBDIR@/?.so"
 
 env_tool = "@ENV_TOOL@"
index da412af90ea6929586f1fd047cc4dd7dc9ef6c73..5228eacc5893ddcdd77d8c93b28a685b179eb515 100644 (file)
@@ -25,7 +25,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ]]
 
-package.path  = "@LIBDIR@/?.lc;@LIBDIR@/?.lua"
+package.path  = "@LIBDIR@/?.lua"
 package.cpath = "@LIBDIR@/?.so"
 
 require("buildconfig")
@@ -82,9 +82,8 @@ end
 
 if e2util.stat(e2call.globaltool) then
   e2call.tool = e2call.globaltool
-  env = string.format("LUA_PATH='%s/?.lc;%s/?.lua' " ..
-        "LUA_CPATH='%s/?.so'", buildconfig.LIBDIR, buildconfig.LIBDIR,
-       buildconfig.LIBDIR)
+  env = string.format("LUA_PATH='%s/?.lua' LUA_CPATH='%s/?.so'",
+       buildconfig.LIBDIR, buildconfig.LIBDIR)
   lua = buildconfig.LUA
   cmd = string.format("%s %s %s %s", env, lua, e2call.tool, e2call.arg_string)
 elseif not root then
@@ -92,6 +91,7 @@ elseif not root then
        " is not a global tool and we're not in a project environment")
 elseif root and e2util.stat(e2call.localtool) then
   e2call.tool = e2call.localtool
+  -- Search for .lc files, the local e2 may be of an older version
   env = "LUA_PATH='" .. root .. "/.e2/lib/e2/?.lc;" ..
                         root .. "/.e2/lib/e2/?.lua' " ..
         "LUA_CPATH=" .. root .. "/.e2/lib/e2/?.so"
index 005f237951c4439b3d331435408af74394afe79b..2bf66fc124acc6f2189d97d8ba42f7ca7053448f 100644 (file)
@@ -34,7 +34,7 @@ include $(TOPLEVEL)/make.vars
 
 VPATH = .:$(TOPLEVEL)/generic:$(TOPLEVEL)
 
-CLEAN_FILES = *~ *.so linux32 *.lc *.o
+CLEAN_FILES = *~ *.so linux32 *.o
 CFLAGS += -I. -I$(DESTDIR)$(INCDIR) -I$(DESTDIR)$(INCDIR)/lua-$(LUA_VERSION) \
        -I../lua/lua-$(LUA_VERSION)/src -fPIC
 LDFLAGS += -L. -L../lua/lua-$(LUA_VERSION)/src -Wl,-R$(LIBDIR)
@@ -56,7 +56,7 @@ SYMLINKS_2_1 = lookup-server use-source prepare-cargo sync-results cleanup \
 .PHONY: all install uninstall install install-local doc install-doc
 
 
-all: linux32 e2local.lc $(LOCALLUATOOLS:=.lc) sha1.so luafile_ll.so e2util.so
+all: linux32 sha1.so luafile_ll.so e2util.so
 
 install:
        # install symlinks for e2-2.1 compatibility
@@ -76,9 +76,8 @@ install-local-lua: $(LUA_LIBS)
 install-local: all install-local-dirs install-local-lua install-local-sourcefiles
        test -n "$(PROJECTDIR)"
        install -m 755 -d $(LOCALPLUGINDIR)
-       install -m644 e2local.lc $(LOCALLIBDIR)/
        for i in $(LOCALLUATOOLS); do \
-               install -m 755 $$i.lc $(LOCALBINDIR)/e2-$$i; \
+               install -m 755 $$i.lua $(LOCALBINDIR)/e2-$$i; \
        done
        for i in $(LOCALSHTOOLS); do \
                install -m 755 $$i $(LOCALBINDIR)/e2-$$i; \
@@ -117,13 +116,6 @@ clean:
 %: %.in
        $(TOPLEVEL)/scripts/genscript.sh $< $@
 
-%.lc: %.lua
-       $(LUAC) -o $@ $<
-
-e2local.lc: \
-               e2lib.lua
-       $(LUAC) -o $@ $^
-
 linux32: linux32.c
 
 sha1.so: sha1.o lsha1.o
index 2c67265c3fb4f84f8ba604f5f06524b308a92f33..6cf404f5027d531498a4f3ad2211b97d58fe1593 100644 (file)
@@ -27,7 +27,7 @@
 
 -- e2-buildnumbers -*- Lua -*-
 
-require("e2local")
+require("e2lib")
 require("e2tool")
 e2lib.init()
 local info, re = e2tool.local_init(nil, "build-numbers")
index 1719d27161e403b0877e34226261794c01a88184..e61f6b2f0de9b55824feaecc8bbe78c295471831 100644 (file)
@@ -27,7 +27,7 @@
 
 -- e2-build -*- Lua -*-
 
-require("e2local")
+require("e2lib")
 require("e2tool")
 require("e2build")
 local err = require("err")
index ca36a312d76d3e90ead4fadb46bbaaffd7b21222..c197ea9a2326d16e790e4b7d25431959d4c009fa 100644 (file)
@@ -27,7 +27,7 @@
 
 -- e2-cf -*- Lua -*-
 
-require("e2local")
+require("e2lib")
 require("e2tool")
 local err = require("err")
 
index a6a2dd28dc30606f428b5faee94dc4895e090dfb..d7935db2bd36eb183ff104e123db839ebe780f81 100644 (file)
@@ -27,7 +27,7 @@
 
 -- dlist - list sorted dependencies -*- Lua -*-
 
-require("e2local")
+require("e2lib")
 require("e2tool")
 require("e2build")
 e2lib.init()
index 7585bddf6d9afd47cbee83e4a1849b71e32d8761..97e8ce1774bd638dff663b1dc7f9b242d4c41373 100644 (file)
@@ -27,7 +27,7 @@
 
 -- dsort -*- Lua -*-
 
-require("e2local")
+require("e2lib")
 require("e2tool")
 require("e2build")
 e2lib.init()
index c82a5241adc6372d411b18d260419fa43e0f3e86..7f1cf4214d16adf8b959e688827b8737e61db730 100644 (file)
@@ -27,7 +27,7 @@
 
 -- fetch-sources - Retrieve sources for project -*- Lua -*-
 
-require("e2local")
+require("e2lib")
 require("e2tool")
 require("e2build")
 local err = require("err")
index 60a372ec8b72837b557837fe1d5a82152bde7300..104e4208ba9e53dd2bd7ed3f5b0f735d338b5ab8 100644 (file)
@@ -27,7 +27,7 @@
 
 -- ls-project - show project information -*- Lua -*-
 
-require("e2local")
+require("e2lib")
 require("e2tool")
 local err = require("err")
 
index c3e47801b9ebceb57d2c7e2847be90e147e52a56..ac8dca5b21eddfecb72deb76ada7634ef8eb5ce8 100644 (file)
@@ -28,7 +28,7 @@
 -- e2-new-source - add new source onto an existing server -*- Lua -*-
 
 
-require("e2local")
+require("e2lib")
 require("e2tool")
 local generic_git = require("generic_git")
 local cache = require("cache")
index 9e7b90034a596e21557ee2b7c4f3e1c79833baa1..4b5393a99c5f7f99b70813abdd098bc5fd60ff57 100644 (file)
@@ -27,7 +27,7 @@
 
 -- playground - enter existing chroot(1) environment -*- Lua -*-
 
-require("e2local")
+require("e2lib")
 require("e2tool")
 require("e2build")
 local err = require("err")