6 # ------------------------------------------------------------------------
9 .PHONY
: all help deb debi libs luaixp luaeventloop docs man
clean distclean tags install install-user install-variable-check install-user-variable-check
15 @echo
" general targets"
16 @echo
" all - build everything"
17 @echo
" libs - build libraries"
18 @echo
" docs - build documentation"
19 @echo
" clean - clean up build"
20 @echo
" distclean - clean even more"
21 @echo
" install - install in system dir"
22 @echo
" install-user - install in user home dir"
24 @echo
" development targets"
25 @echo
" tags - build ctags index"
26 @echo
" cscope - build cscope index"
28 @echo
" Debian targets"
29 @echo
" deb - build the .deb"
30 @echo
" debi - install the deb"
38 config.mk
: config.mk.
dist
39 if
test -f
$@
; then \
45 # ------------------------------------------------------------------------
48 libs
: luaeventloop luaixp
57 --center
="WMII Lua Integration" \
59 --release
="wmii 3.6" \
62 # ------------------------------------------------------------------------
68 -rm -f cscope.files cscope.out
tags
69 -${MAKE} -C luaixp
clean
70 -${MAKE} -C luaeventloop
clean
75 # ------------------------------------------------------------------------
81 install: ${MAN} install-variable-check
83 ${INSTALL} -d
${ALL_INSTALL_DIRS}
86 ${MAKE} -C luaixp
install
87 ${MAKE} -C luaeventloop
install
89 # install core and plugin lua scripts
90 ${INSTALL} -m
0644 -t
${CORE_LUA_DIR} core
/*.lua
91 ${INSTALL} -m
0644 -t
${PLUGIN_LUA_DIR} plugins
/*.lua
93 # install new config file
94 ${INSTALL} -m
0755 -t
${RC_DIR} wmiirc.lua
95 ${INSTALL} -m
0644 -t
${XS_DIR} wmii-lua.desktop
98 ${INSTALL} -m
0644 -t
${MAN_DIR} ${MAN}
101 ${INSTALL} -m
0755 -t
${BIN_DIR} install-wmiirc-lua
102 ${INSTALL} -m
0755 -t
${BIN_DIR} wmii-lua
104 install-variable-check
:
105 $(if
${ALL_INSTALL_DIRS},,$(error ALL_INSTALL_DIRS variable is empty
; check config.mk
))
106 $(if
${CORE_LUA_DIR},, $(error CORE_LUA_DIR variable is empty
; check config.mk
))
107 $(if
${PLUGIN_LUA_DIR},, $(error PLUGIN_LUA_DIR variable is empty
; check config.mk
))
108 $(if
${RC_DIR},, $(error RC_DIR variable is empty
; check config.mk
))
109 $(if
${XS_DIR},, $(error XS_DIR variable is empty
; check config.mk
))
110 $(if
${MAN_DIR},, $(error MAN_DIR variable is empty
; check config.mk
))
111 $(if
${BIN_DIR},, $(error BIN_DIR variable is empty
; check config.mk
))
112 @echo Config vars OK.
115 # install in user directory
117 install-user
: install-user-variable-check
118 ifeq ($(shell pwd
),$(wildcard ~
/.wmii-3.5
))
119 @echo
"You're already in the ~/.wmii-3.5/ directory"
121 ${INSTALL} -d
${ALL_HOME_DIRS}
122 @if
test -f
${HOME_WMII}/wmiirc
; then \
123 echo
"NOTE: you might want to look at ${HOME_WMII}/wmiirc.dist" ; \
124 ${INSTALL} -T
-m
0744 -b wmiirc.lua
${HOME_WMII}/wmiirc.
dist ; \
126 echo
"Installing new ${HOME_WMII}/wmiirc" ; \
127 ${INSTALL} -T
-m
0744 -b wmiirc.lua
${HOME_WMII}/wmiirc
; \
129 ${INSTALL} -m
0644 -b
-t
${HOME_CORE} core
/*.lua
130 ${INSTALL} -m
0644 -b
-t
${HOME_PLUGINS} plugins
/*.lua
131 ${INSTALL} -m
0644 -b
-t
${HOME_WMII} ${MAN}
132 ${INSTALL} -m
0744 -t
${HOME_BIN_DIR} wmii-lua
133 ${MAKE} -C luaixp install-user
134 ${MAKE} -C luaeventloop install-user
139 install-user-variable-check
:
140 $(if
${ALL_HOME_DIRS},,$(error ALL_HOME_DIRS variable is empty
; check config.mk
))
141 $(if
${HOME_WMII},, $(error HOME_WMII variable is empty
; check config.mk
))
142 $(if
${HOME_CORE},, $(error HOME_CORE variable is empty
; check config.mk
))
143 $(if
${HOME_PLUGINS},, $(error HOME_PLUGINS variable is empty
; check config.mk
))
144 $(if
${HOME_WMII},, $(error HOME_WMII variable is empty
; check config.mk
))
145 $(if
${HOME_BIN_DIR},, $(error HOME_BIN_DIR variable is empty
; check config.mk
))
146 @echo Config vars OK.
151 sudo
${MAKE} install PREFIX
=/usr
154 # ------------------------------------------------------------------------
158 find .
-name
'*.[ch]' -o
-name
'*.lua' | grep
-v
-e CVS
-e SCCS
> cscope.files
160 cscope.out
: cscope.files
165 xargs
-n
50 ctags
-a
< cscope.files