From: Jo-Philipp Wich Date: Wed, 29 Oct 2008 19:40:15 +0000 (+0000) Subject: * luci-0.8: backport build system fixes X-Git-Tag: 0.8.2~73 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=4b20e8113257c56dc12ae8fe685f035e8143ea66;p=project%2Fluci.git * luci-0.8: backport build system fixes --- diff --git a/build/cbi2uvl.lua b/build/cbi2uvl.lua index 9207bf816f..10d956738a 100755 --- a/build/cbi2uvl.lua +++ b/build/cbi2uvl.lua @@ -1,4 +1,19 @@ #!/usr/bin/lua +--[[ +LuCI - Lua Configuration Interface + +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id: index.lua 3548 2008-10-09 20:28:07Z Cyrus $ +]]-- + local cbi = require "luci.cbi" local i18n = require "luci.i18n" local util = require "luci.util" @@ -34,47 +49,47 @@ for i, sec in pairs(map.children) do if util.instanceof(sec, cbi.TypedSection) t print ("\nconfig section") print (" option name '%s'" % sec.sectiontype) print (" option package '%s'" % map.config) - + if #sec.title > 0 then print (" option title '%s'" % util.striptags(sec.title)) end - + if #sec.description > 0 then print (" option description '%s'" % util.striptags(sec.description)) end - + if not sec.addremove then print (" option unique true") print (" option required true") end - + if not sec.anonymous then print (" option named true") end - + if sec.dynamic then print (" option dynamic true") end - + for j, opt in ipairs(sec.children) do - if opt.option:sub(1,1) ~= "_" or util.instanceof(opt, cbi.Value) then + if opt.option:sub(1,1) ~= "_" or util.instanceof(opt, cbi.Value) then print ("\nconfig variable") print (" option name '%s'" % opt.option) print (" option section '%s.%s'" % {map.config, sec.sectiontype}) if #opt.title > 0 then print (" option title '%s'" % util.striptags(opt.title)) end - + if #opt.description > 0 then print (" option description '%s'" % util.striptags(opt.description)) end - + if not opt.rmempty and not opt.optional then print (" option required true") end - + if util.instanceof(opt, cbi.Flag) then - print (" option type boolean") + print (" option datatype boolean") elseif util.instanceof(opt, cbi.DynamicList) then print (" option type list") elseif util.instanceof(opt, cbi.ListValue) then @@ -82,20 +97,20 @@ for i, sec in pairs(map.children) do if util.instanceof(sec, cbi.TypedSection) t util.perror("*** Warning: Please verify '%s.%s.%s' ***" % {map.config, sec.sectiontype, opt.option} ) end - + for i, dep in ipairs(opt.deps) do if not dep.add or dep.add == "" then local depstring for k, v in pairs(dep.deps) do depstring = (depstring and depstring .. "," or "") .. "%s=%s" % {k, v} - end + end print (" list depends '%s'" % depstring) else util.perror("*** Warning: Unable to decode dependency '%s' in '%s.%s.%s[%s]' ***" % {util.serialize_data(dep.deps), map.config, sec.sectiontype, opt.option, dep.add}) end end - + if util.instanceof(opt, cbi.ListValue) then for k, key in ipairs(opt.keylist) do print ("\nconfig enum") @@ -108,4 +123,4 @@ for i, sec in pairs(map.children) do if util.instanceof(sec, cbi.TypedSection) t end end end -end end \ No newline at end of file +end end diff --git a/build/config.mk b/build/config.mk index 6f54ce591e..bac250d728 100644 --- a/build/config.mk +++ b/build/config.mk @@ -8,6 +8,9 @@ LUA_LIBRARYDIR = /usr/lib/lua LUCI_MODULEDIR = $(LUA_MODULEDIR)/luci LUCI_LIBRARYDIR = $(LUA_LIBRARYDIR)/luci +UVL_SCHEMEDIR = host/lib/uci/schema + HTDOCS = /www +LUA=$(shell which lua) XSLTPROC=$(shell which xsltproc)