6 # ------------------------------------------------------------------------
9 .PHONY
: all help deb debi libs luaixp luaeventloop docs man
clean 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
" install - install in system dir"
21 @echo
" install-user - install in user home dir"
23 @echo
" development targets"
24 @echo
" tags - build ctags index"
25 @echo
" cscope - build cscope index"
27 @echo
" Debian targets"
28 @echo
" deb - build the .deb"
29 @echo
" debi - install the deb"
37 config.mk
: config.mk.
dist
38 if
test -f
$@
; then \
44 # ------------------------------------------------------------------------
47 libs
: luaeventloop luaixp
56 --center
="WMII Lua Integration" \
58 --release
="wmii 3.6" \
61 # ------------------------------------------------------------------------
67 -rm -f cscope.files cscope.out
tags
68 -${MAKE} -C luaixp
clean
69 -${MAKE} -C luaeventloop
clean
71 # ------------------------------------------------------------------------
77 install: ${MAN} install-variable-check
79 ${INSTALL} -d
${ALL_INSTALL_DIRS}
82 ${MAKE} -C luaixp
install
83 ${MAKE} -C luaeventloop
install
85 # install core and plugin lua scripts
86 ${INSTALL} -m
0644 -t
${CORE_LUA_DIR} core
/*.lua
87 ${INSTALL} -m
0644 -t
${PLUGIN_LUA_DIR} plugins
/*.lua
89 # install new config file
90 ${INSTALL} -m
0755 -t
${RC_DIR} wmiirc.lua
91 ${INSTALL} -m
0644 -t
${XS_DIR} wmii-lua.desktop
94 ${INSTALL} -m
0644 -t
${MAN_DIR} ${MAN}
97 ${INSTALL} -m
0755 -t
${BIN_DIR} install-wmiirc-lua
98 ${INSTALL} -m
0755 -t
${BIN_DIR} wmii-lua
100 install-variable-check
:
101 $(if
${ALL_INSTALL_DIRS},,$(error ALL_INSTALL_DIRS variable is empty
; check config.mk
))
102 $(if
${CORE_LUA_DIR},, $(error CORE_LUA_DIR variable is empty
; check config.mk
))
103 $(if
${PLUGIN_LUA_DIR},, $(error PLUGIN_LUA_DIR variable is empty
; check config.mk
))
104 $(if
${RC_DIR},, $(error RC_DIR variable is empty
; check config.mk
))
105 $(if
${XS_DIR},, $(error XS_DIR variable is empty
; check config.mk
))
106 $(if
${MAN_DIR},, $(error MAN_DIR variable is empty
; check config.mk
))
107 $(if
${BIN_DIR},, $(error BIN_DIR variable is empty
; check config.mk
))
108 @echo Config vars OK.
111 # install in user directory
113 install-user
: install-user-variable-check
114 ifeq ($(shell pwd
),$(wildcard ~
/.wmii-3.5
))
115 @echo
"You're already in the ~/.wmii-3.5/ directory"
117 ${INSTALL} -d
${ALL_HOME_DIRS}
118 @if
test -f
${HOME_WMII}/wmiirc
; then \
119 echo
"NOTE: you might want to look at ${HOME_WMII}/wmiirc.dist" ; \
120 ${INSTALL} -T
-m
0744 -b wmiirc.lua
${HOME_WMII}/wmiirc.
dist ; \
122 echo
"Installing new ${HOME_WMII}/wmiirc" ; \
123 ${INSTALL} -T
-m
0744 -b wmiirc.lua
${HOME_WMII}/wmiirc
; \
125 ${INSTALL} -m
0644 -b
-t
${HOME_CORE} core
/*.lua
126 ${INSTALL} -m
0644 -b
-t
${HOME_PLUGINS} plugins
/*.lua
127 ${INSTALL} -m
0644 -b
-t
${HOME_WMII} ${MAN}
128 ${INSTALL} -m
0744 -t
${HOME_BIN_DIR} wmii-lua
129 ${MAKE} -C luaixp install-user
130 ${MAKE} -C luaeventloop install-user
135 install-user-variable-check
:
136 $(if
${ALL_HOME_DIRS},,$(error ALL_HOME_DIRS variable is empty
; check config.mk
))
137 $(if
${HOME_WMII},, $(error HOME_WMII variable is empty
; check config.mk
))
138 $(if
${HOME_CORE},, $(error HOME_CORE variable is empty
; check config.mk
))
139 $(if
${HOME_PLUGINS},, $(error HOME_PLUGINS variable is empty
; check config.mk
))
140 $(if
${HOME_WMII},, $(error HOME_WMII variable is empty
; check config.mk
))
141 $(if
${HOME_BIN_DIR},, $(error HOME_BIN_DIR variable is empty
; check config.mk
))
142 @echo Config vars OK.
147 sudo
${MAKE} install PREFIX
=/usr
150 # ------------------------------------------------------------------------
154 find .
-name
'*.[ch]' -o
-name
'*.lua' | grep
-v
-e CVS
-e SCCS
> cscope.files
156 cscope.out
: cscope.files
161 xargs
-n
50 ctags
-a
< cscope.files