* luci/contrib: update uci to v0.5.0
[project/luci.git] / Makefile
1 include build/config.mk
2
3 MODULES = applications/* libs/* modules/* themes/* i18n/* contrib/*
4
5 OS:=$(shell uname)
6 export OS
7
8 .PHONY: all build gccbuild luabuild clean host gcchost luahost hostcopy hostclean
9
10 all: build
11
12 build: gccbuild luabuild
13
14 gccbuild:
15 for i in $(MODULES); do make -C$$i compile; done
16
17 luabuild:
18 for i in $(MODULES); do make -C$$i luabuild; done
19
20 clean:
21 rm -rf docs
22 for i in $(MODULES); do make -C$$i clean; done
23
24
25 host: build hostcopy
26
27 gcchost: gccbuild hostcopy
28
29 luahost: luabuild hostcopy
30
31 hostcopy:
32 mkdir -p host
33 for i in $(MODULES); do cp -a $$i/dist/* host/ -R 2>/dev/null || true; done
34 for i in $(MODULES); do cp -a $$i/hostfiles/* host/ -R 2>/dev/null || true; done
35 rm -f host/luci
36 ln -s .$(LUCI_MODULEDIR) host/luci
37
38 hostenv: host ucidefaults
39
40 ucidefaults:
41 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host)/bin/uci-defaults --exclude luci-community-*"
42
43 runboa: hostenv
44 libs/sgi-webuci/host/buildconfig.sh $(realpath host) > host/etc/boa/boa.conf
45 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath host/usr/bin/boa) -c $(realpath host/etc/boa) -d"
46
47 runhttpd: hostenv
48 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath libs/httpd/host/runluci) $(realpath host) $(HTDOCS)"
49
50 runluci: luahost
51 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "$(realpath libs/httpd/host/runluci) $(realpath host) $(HTDOCS)"
52
53 runlua: hostenv
54 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) lua
55
56 runshell: hostenv
57 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) $$SHELL
58
59 hostclean: clean
60 rm -rf host
61
62 apidocs: hostenv
63 build/hostenv.sh $(realpath host) $(LUA_MODULEDIR) $(LUA_LIBRARYDIR) "build/makedocs.sh host/luci/ docs"
64
65 run:
66 # make run is deprecated #
67 # Please use: #
68 # #
69 # To run LuCI WebUI using LuCI HTTPD #
70 # make runhttpd #
71 # #
72 # To run LuCI WebUI using Boa/Webuci #
73 # make runboa #
74 # #
75 # To start a shell in the LuCI environment #
76 # make runshell #
77 # #
78 # To run Lua CLI in the LuCI environment #
79 # make runlua #