summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-08 16:52:51 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-01-08 16:52:51 +0100
commitb348413fb23962e28fd5158e3ba21ea933feb8f3 (patch)
treeb375b105f48d24476ea765667a412bee6d4f34f6
parenteb25d532a88b140431c20077edf56bb40663c8fc (diff)
build: remove remainders of old build system
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
-rw-r--r--build/config.mk16
-rw-r--r--build/gccconfig.mk22
-rwxr-xr-xbuild/hostenv.sh8
-rwxr-xr-xbuild/luci.cgi8
-rw-r--r--build/lucid.lua2
-rw-r--r--build/module.mk46
-rw-r--r--build/setup.lua46
7 files changed, 0 insertions, 148 deletions
diff --git a/build/config.mk b/build/config.mk
deleted file mode 100644
index 31279ba7d..000000000
--- a/build/config.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-LUAC = luac
-LUAC_OPTIONS = -s
-LUA_TARGET ?= source
-
-LUA_MODULEDIR = /usr/lib/lua
-LUA_LIBRARYDIR = /usr/lib/lua
-
-LUCI_MODULEDIR = $(LUA_MODULEDIR)/luci
-LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci
-LUCI_I18NDIR = $(LUA_MODULEDIR)/luci/i18n
-
-UVL_SCHEMEDIR = host/lib/uci/schema
-
-HTDOCS = /www
-
-LUA=$(shell which lua)
diff --git a/build/gccconfig.mk b/build/gccconfig.mk
deleted file mode 100644
index 97d19bde3..000000000
--- a/build/gccconfig.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-OS ?= $(shell uname)
-
-LUA_SHLIBS = $(shell pkg-config --silence-errors --libs lua5.1 || pkg-config --silence-errors --libs lua-5.1 || pkg-config --silence-errors --libs lua)
-LUA_LIBS = $(if $(LUA_SHLIBS),$(LUA_SHLIBS),$(firstword $(wildcard /usr/lib/liblua.a /usr/local/lib/liblua.a /opt/local/lib/liblua.a)))
-LUA_CFLAGS = $(shell pkg-config --silence-errors --cflags lua5.1 || pkg-config --silence-errors --cflags lua-5.1 || pkg-config --silence-errors --cflags lua)
-
-CC = gcc
-AR = ar
-RANLIB = ranlib
-CFLAGS = -O2
-FPIC = -fPIC
-EXTRA_CFLAGS = --std=gnu99
-WFLAGS = -Wall -pedantic
-CPPFLAGS =
-COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) $(WFLAGS)
-ifeq ($(OS),Darwin)
- SHLIB_FLAGS = -bundle -undefined dynamic_lookup
-else
- SHLIB_FLAGS = -shared
-endif
-LINK = $(CC) $(LDFLAGS)
-
diff --git a/build/hostenv.sh b/build/hostenv.sh
deleted file mode 100755
index 0f2fc27d1..000000000
--- a/build/hostenv.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-export LD_LIBRARY_PATH="$1/usr/lib:$LD_LIBRARY_PATH"
-[ `uname -s` = "Darwin" ] && export DYLD_LIBRARY_PATH="$1/usr/lib:$DYLD_LIBRARY_PATH"
-export PATH="$1/bin:$1/usr/bin:$PATH"
-export LUA_PATH="$1/$2/?.lua;$1/$2/?/init.lua;;"
-export LUA_CPATH="$1/$3/?.so;;"
-export LUCI_SYSROOT="$1"
-$4
diff --git a/build/luci.cgi b/build/luci.cgi
deleted file mode 100755
index f4b590044..000000000
--- a/build/luci.cgi
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/lua
-
-dofile "../../build/setup.lua"
-
-require "luci.cacheloader"
-require "luci.sgi.cgi"
-luci.dispatcher.indexcache = "/tmp/luci-indexcache"
-luci.sgi.cgi.run()
diff --git a/build/lucid.lua b/build/lucid.lua
deleted file mode 100644
index 71e4fd258..000000000
--- a/build/lucid.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-dofile "build/setup.lua"
-require "luci.lucid".start()
diff --git a/build/module.mk b/build/module.mk
deleted file mode 100644
index b69019c56..000000000
--- a/build/module.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-MAKEPATH:=$(dir $(lastword $(MAKEFILE_LIST)))
--include $(MAKEPATH)config.mk
--include $(MAKEPATH)gccconfig.mk
-
-.PHONY: all build compile luacompile luasource clean luaclean
-
-all: build
-
-build: luabuild gccbuild
-
-luabuild: lua$(LUA_TARGET)
-
-gccbuild: compile
-compile:
-
-clean: luaclean
-
-luasource:
- mkdir -p dist$(LUA_MODULEDIR)
- mkdir -p dist$(LUCI_MODULEDIR)
- mkdir -p dist$(HTDOCS)
- cp -pR root/* dist 2>/dev/null || true
- cp -pR luasrc/* dist$(LUCI_MODULEDIR) 2>/dev/null || true
- cp -pR lua/* dist$(LUA_MODULEDIR) 2>/dev/null || true
- cp -pR htdocs/* dist$(HTDOCS) 2>/dev/null || true
- for i in $$(find dist -name .svn -o -name .gitignore); do rm -rf $$i || true; done
- ifneq ($(PO),)
- mkdir -p dist$(LUCI_I18NDIR)
- for file in $(PO); do \
- cp $(HOST)/lua-po/$$file.$(if $(PO_LANG),$(PO_LANG),*).* dist$(LUCI_I18NDIR)/ 2>/dev/null || true; \
- done
- endif
-
-
-luadiet: luasource
- for i in $$(find dist -type f -name '*.lua'); do LUA_PATH="../../contrib/luasrcdiet/lua/?.lua" $(LUA) ../../contrib/luasrcdiet/lua/LuaSrcDiet.lua --maximum $$i -o $$i.diet && mv $$i.diet $$i; done
-
-luastrip: luasource
- for i in $$(find dist -type f -name '*.lua'); do perl -e 'undef $$/; open( F, "< $$ARGV[0]" ) || die $$!; $$src = <F>; close F; $$src =~ s/--\[\[.*?\]\](--)?//gs; $$src =~ s/^\s*--.*?\n//gm; open( F, "> $$ARGV[0]" ) || die $$!; print F $$src; close F' $$i; done
-
-luacompile: luasource
- for i in $$(find dist -name *.lua -not -name debug.lua| sort); do if ! $(LUAC) $(LUAC_OPTIONS) -o $$i $$i; then echo "Error compiling $$i"; exit 1; fi; done
-
-luaclean:
- rm -rf dist
-
diff --git a/build/setup.lua b/build/setup.lua
deleted file mode 100644
index f4ed76954..000000000
--- a/build/setup.lua
+++ /dev/null
@@ -1,46 +0,0 @@
-local SYSROOT = os.getenv("LUCI_SYSROOT")
-
--- override uci access
-local uci_core = require "uci"
-local uci_model = require "luci.model.uci"
-
-uci_model.cursor = function(config, save)
- return uci_core.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci")
-end
-
-uci_model.cursor_state = function()
- return uci_core.cursor(SYSROOT .. "/etc/config", SYSROOT .. "/var/state")
-end
-
-uci_model.inst = uci_model.cursor()
-uci_model.inst_state = uci_model.cursor_state()
-
--- allow any password in local sdk
-local sys = require "luci.sys"
-sys.user.checkpasswd = function() return true end
-sys.user.getpasswd = function() return "x" end
-
--- dummy sysinfo on Darwin
-require "nixio"
-
-if not nixio.sysinfo then
- function nixio.sysinfo()
- return {
- bufferram = 0,
- freehigh = 0,
- freeram = 0,
- freeswap = 0,
- loads = { 0.0, 0.0, 0.0 },
- mem_unit = 1024,
- procs = 0,
- sharedram = 0,
- totalhigh = 0
- }
- end
-end
-
--- override nixio.fs.access() to check sysroot first
-local _access = nixio.fs.access
-function nixio.fs.access(file)
- return _access(SYSROOT .. "/" .. file) or _access(file)
-end