2 CONFIG_MK
= ${TOP}/config.mk
5 include ${TOP}/Makefile.rules
9 # ------------------------------------------------------------------------
12 .PHONY
: all help generate libs luaixp luaeventloop docs man
clean distclean install install-user
13 all: generate libs man
18 @echo
" general targets"
19 @echo
" all - build everything"
20 @echo
" libs - build libraries"
21 @echo
" docs - build documentation"
22 @echo
" clean - clean up build"
23 @echo
" distclean - clean even more"
24 @echo
" install - install in system dir"
25 @echo
" install-user - install in user home dir"
27 @echo
" development targets"
28 @echo
" tags - build ctags index"
29 @echo
" cscope - build cscope index"
31 # ------------------------------------------------------------------------
32 # generating files from templates
34 GEN_SRC
= core
/wmii.lua.in install-wmiirc-lua.in wmii-lua.in wmiirc.lua.in
35 GEN_DST
= ${GEN_SRC
:%.in
=%}
38 ${GEN_DST}: ${CONFIG_MK}
40 ifeq (${LOADED_CONFIG_MK},)
45 ${Q} sed
-e
's:%DESTDIR%:${DESTDIR}:' \
46 -e
's:%PREFIX%:${PREFIX}:' \
47 -e
's:%RC_DIR%:${RC_DIR}:' \
48 -e
's:%LUA_BIN%:${LUA_BIN}:' \
49 -e
's:%HOME_WMII%:${HOME_WMII}:' \
53 # ------------------------------------------------------------------------
56 libs
: luaeventloop luaixp
65 --center
="WMII Lua Integration" \
67 --release
="wmii 3.6" \
70 # ------------------------------------------------------------------------
76 -${Q} rm -f cscope.files cscope.out
tags
77 -${Q} ${MAKE} -C luaixp
clean
78 -${Q} ${MAKE} -C luaeventloop
clean
81 -${Q} rm -f
${GEN_DST}
83 # ------------------------------------------------------------------------
89 install: ${MAN} ${GEN_DST} install-variable-check
91 ${Q} ${INSTALL} -d
${ALL_INSTALL_DIRS}
94 ${Q} ${MAKE} -C luaixp
install
95 ${Q} ${MAKE} -C luaeventloop
install
97 # install core and plugin lua scripts
98 ${Q} ${INSTALL} -m
0644 -t
${CORE_LUA_DIR} core
/*.lua
99 ${Q} ${INSTALL} -m
0644 -t
${PLUGIN_LUA_DIR} plugins
/*.lua
101 # install new config file
102 ${Q} ${INSTALL} -m
0755 -t
${RC_DIR} wmiirc.lua
103 ${Q} ${INSTALL} -m
0644 -t
${XS_DIR} wmii-lua.desktop
106 ${Q} ${INSTALL} -m
0644 -t
${MAN_DIR} ${MAN}
109 ${Q} ${INSTALL} -m
0755 -t
${BIN_DIR} install-wmiirc-lua
110 ${Q} ${INSTALL} -m
0755 -t
${BIN_DIR} wmii-lua
113 # install in user directory
115 install-user
: ${MAN} ${GEN_DST} install-user-variable-check
116 ifeq ($(shell pwd
),$(wildcard ${HOME_WMII}))
117 @echo
"You're already in the ${HOME_WMII} directory"
119 ${Q} ${INSTALL} -d
${ALL_HOME_DIRS}
120 ${Q} if
test -f
${HOME_WMII}/wmiirc
; then \
121 echo
"NOTE: you might want to look at ${HOME_WMII}/wmiirc.dist" ; \
122 ${INSTALL} -T
-m
0744 -b wmiirc.lua
${HOME_WMII}/wmiirc.
dist ; \
124 echo
"Installing new ${HOME_WMII}/wmiirc" ; \
125 ${INSTALL} -T
-m
0744 -b wmiirc.lua
${HOME_WMII}/wmiirc
; \
127 ${Q} ${INSTALL} -m
0644 -b
-t
${HOME_CORE} core
/*.lua
128 ${Q} ${INSTALL} -m
0644 -b
-t
${HOME_PLUGINS} plugins
/*.lua
129 ${Q} ${INSTALL} -m
0644 -b
-t
${HOME_WMII} ${MAN}
130 ${Q} ${INSTALL} -m
0744 -t
${HOME_BIN_DIR} wmii-lua
131 ${Q} ${MAKE} -C luaixp install-user
132 ${Q} ${MAKE} -C luaeventloop install-user
138 # ------------------------------------------------------------------------
139 # helpers from ${TOP} dir
141 .PHONY
: install-variable-check install-user-variable-check
tags cscope
144 ${Q} ${MAKE} -C
$(dir ${CONFIG_MK}) $(notdir ${CONFIG_MK})
146 install-variable-check install-user-variable-check
tags cscope
:
147 ${Q} ${MAKE} -C
${TOP} $@