luci/Makefile

105 lines
2.8 KiB
Makefile
Raw Normal View History

include build/config.mk
2008-11-30 13:19:45 +00:00
MODULES = contrib/* applications/* libs/* modules/* themes/* i18n/*
Squashed commit of the following: commit d45d1757d24d8214f730af1a3401dd2bef4a434f Author: Steven <steven@cyrus.homeunix.org> Date: Wed May 28 17:23:27 2008 +0200 * libs/core: Removed dummymode checks in sys * libs/sgi-webuci: Fixes commit b870e8d345bc8912fd8ab61d463b9d68b924a6f4 Author: Felix Fietkau <nbd@openwrt.org> Date: Wed May 28 15:40:10 2008 +0200 fix path to theme commit e3732926bd98db4cc38de6eb8018cd4e55176699 Author: Felix Fietkau <nbd@openwrt.org> Date: Wed May 28 14:56:03 2008 +0200 set the proper path to the config in dummy mode commit a75aecf46f037c98bd6e49b9e48adb735d76d150 Author: Felix Fietkau <nbd@openwrt.org> Date: Wed May 28 14:50:42 2008 +0200 add some dummy mode support commit 12bb39ef606bca6b403cc982213a6597b76dc1b3 Author: Felix Fietkau <nbd@openwrt.org> Date: Wed May 28 14:41:56 2008 +0200 normalize paths commit 7aaad1103fd2bdc75aca158baa6ef191f9a961c6 Author: Felix Fietkau <nbd@openwrt.org> Date: Wed May 28 14:27:26 2008 +0200 add missing require statement commit 5766274bd2511b00c42b474aeeeb3efaca6ded9b Author: Felix Fietkau <nbd@openwrt.org> Date: Wed May 28 14:19:54 2008 +0200 add optional luaposix package (patched for darwin support) commit 9e257a76d03722fc0ce8312aa9952641b21424bd Author: Felix Fietkau <nbd@openwrt.org> Date: Tue May 27 20:21:59 2008 +0200 add missing files, more integration for the boa plugin, fix path to lua modules commit dacc1a98ec946975fcb19f87076dfa7db865fca6 Author: Felix Fietkau <nbd@openwrt.org> Date: Tue May 27 19:42:37 2008 +0200 use "compile" instead of "source" and rename the old version of compile to "compile-all" commit eb14777c4fee1eb5740aba1e5603e481320da7b1 Author: Felix Fietkau <nbd@openwrt.org> Date: Tue May 27 19:41:59 2008 +0200 more boa integration commit df0afb965bf0a987b653e9d0acadf3151179a596 Author: Felix Fietkau <nbd@openwrt.org> Date: Tue May 27 18:33:42 2008 +0200 build boa and the webuci.so plugin along with sgi-webuci commit 878161dabf32066631103d199e2cbaf3f5a7fb07 Author: Felix Fietkau <nbd@openwrt.org> Date: Tue May 27 18:03:16 2008 +0200 add .gitignore
2008-05-28 15:28:13 +00:00
OS:=$(shell uname)
export OS
.PHONY: all build gccbuild luabuild clean host gcchost luahost hostcopy hostclean
all: build
build: gccbuild luabuild
gccbuild:
make -C libs/lmo CC="cc" CFLAGS="" LDFLAGS="" SDK="$(shell test -f .running-sdk && echo 1)" host-install
for i in $(MODULES); do \
make -C$$i SDK="$(shell test -f .running-sdk && echo 1)" compile || { \
echo "*** Compilation of $$i failed!"; \
exit 1; \
}; \
done
luabuild: i18nbuild
for i in $(MODULES); do HOST=$(realpath host) \
SDK="$(shell test -f .running-sdk && echo 1)" make -C$$i luabuild; done
i18nbuild:
mkdir -p host/lua-po
./build/i18n-po2lua.pl ./po host/lua-po
clean:
rm -f .running-sdk
2009-07-09 15:26:23 +00:00
rm -rf docs
2009-07-09 15:05:02 +00:00
make -C libs/lmo host-clean
for i in $(MODULES); do make -C$$i clean; done
host: build hostcopy
gcchost: gccbuild hostcopy
luahost: luabuild hostcopy
hostcopy:
2008-09-16 19:50:53 +00:00
mkdir -p host/tmp
mkdir -p host/var/state
2008-09-24 22:02:11 +00:00
for i in $(MODULES); do cp -pR $$i/dist/* host/ 2>/dev/null || true; done
for i in $(MODULES); do cp -pR $$i/hostfiles/* host/ 2>/dev/null || true; done
2008-06-02 15:34:59 +00:00
rm -f host/luci
ln -s .$(LUCI_MODULEDIR) host/luci
rm -rf /tmp/luci-* || true
2008-06-02 15:34:26 +00:00
hostenv: sdk host ucidefaults
sdk:
touch .running-sdk
ucidefaults:
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/bin/uci-defaults --exclude luci-freifunk-*"
runhttpd: hostenv
2009-06-20 07:20:56 +00:00
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua build/lucid.lua"
2010-04-16 13:38:27 +00:00
runuhttpd: hostenv
cp $(realpath build)/luci.cgi $(realpath host)/www/cgi-bin/luci
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/usr/sbin/uhttpd -p 8080 -h $(realpath host)/www -f"
runlua: hostenv
2009-05-23 17:21:36 +00:00
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "lua -i build/setup.lua"
runshell: hostenv
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) $$SHELL
hostclean: clean
rm -rf host
apidocs: hostenv
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh host/luci/ docs"
2008-09-11 00:50:19 +00:00
uvldocs: hostenv
build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) \
"build/uvldoc $(realpath host) $(UVL_SCHEMEDIR) uvldocs $(DOCS)"
po: host
2009-05-14 21:10:40 +00:00
for L in $${LANGUAGE:-$$(find i18n/ -path 'i18n/*/luasrc/i18n/*' -name 'default.*.lua' | \
sed -e 's!.*/default\.\(.*\)\.lua!\1!')}; do \
build/i18n-lua2po.pl . $(realpath host)/po $$L; \
done
run:
# make run is deprecated #
# Please use: #
# #
2008-11-30 13:19:45 +00:00
# To run LuCI WebUI using LuCIttpd #
# make runhttpd #
# #
# To run LuCI WebUI using Boa/Webuci #
# make runboa #
# #
# To start a shell in the LuCI environment #
# make runshell #
# #
# To run Lua CLI in the LuCI environment #
# make runlua #