From 3b7e4eaaf8bb2970c0488c39695e0179d5a78f69 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sat, 19 Jul 2008 10:27:23 +0000 Subject: [PATCH] Added non-stripped debug target for LuCI --- build/module.mk | 2 ++ contrib/luaposix/Makefile | 2 ++ contrib/package/luci/Makefile | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build/module.mk b/build/module.mk index 8e403a0b6..20fdb4376 100644 --- a/build/module.mk +++ b/build/module.mk @@ -20,6 +20,8 @@ luasource: cp -a lua/* dist$(LUA_MODULEDIR) -R 2>/dev/null || true cp -a htdocs/* dist$(HTDOCS) -R 2>/dev/null || true for i in $$(find dist -name .svn); do rm $$i -rf; done + +luastrip: luasource for i in $$(find dist -type f -name '*.lua'); do perl -e 'undef $$/; open( F, "< $$ARGV[0]" ) || die $$!; $$src = ; close F; $$src =~ s/--\[\[.*?\]\](--)?//gs; $$src =~ s/^\s*--.*?\n//gm; open( F, "> $$ARGV[0]" ) || die $$!; print F $$src; close F' $$i; done luacompile: luasource diff --git a/contrib/luaposix/Makefile b/contrib/luaposix/Makefile index a72db3cb6..e9433bf58 100644 --- a/contrib/luaposix/Makefile +++ b/contrib/luaposix/Makefile @@ -38,6 +38,8 @@ compile: $(LUAPOSIX_DIR)/.patched cp $(LUAPOSIX_DIR)/posix.so dist$(LUA_LIBRARYDIR) luasource: +luastrip: +luacompile: compile-all: compile clean: diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile index 495b46d98..5bf07b76c 100644 --- a/contrib/package/luci/Makefile +++ b/contrib/package/luci/Makefile @@ -27,7 +27,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install PKG_BUILD_DEPENDS:=libnotimpl -LUA_TARGET:=source +LUA_TARGET:=strip PKG_SELECTED_MODULES:= -- 2.25.1