Mercurial > audlegacy-plugins
annotate buildsys.mk.in @ 2948:b4046e5c478e
Please don't use GNU-only stuff without providing an alternative?
author | Jonathan Schleifer <js-audacious@webkeks.org> |
---|---|
date | Fri, 03 Oct 2008 00:23:27 +0200 |
parents | c79e239a816f |
children | d116c0d61dd2 |
rev | line source |
---|---|
1763 | 1 # |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
2 # Copyright (c) 2007 - 2008, Jonathan Schleifer <js-buildsys@webkeks.org> |
1763 | 3 # |
2378
e7d59a6ed443
Added HG repo URL to buildsys as a comment.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2374
diff
changeset
|
4 # https://webkeks.org/hg/buildsys/ |
e7d59a6ed443
Added HG repo URL to buildsys as a comment.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2374
diff
changeset
|
5 # |
1763 | 6 # Permission to use, copy, modify, and/or distribute this software for any |
7 # purpose with or without fee is hereby granted, provided that the above | |
8 # copyright notice and this permission notice is present in all copies. | |
9 # | |
10 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
11 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
12 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
13 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | |
14 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
15 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
16 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
17 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
18 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
19 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
20 # POSSIBILITY OF SUCH DAMAGE. | |
21 # | |
22 | |
23 PACKAGE = @PACKAGE@ | |
24 CC = @CC@ | |
25 CXX = @CXX@ | |
26 CPP = @CPP@ | |
27 DC = @DC@ | |
28 ERLC = @ERLC@ | |
29 OBJC = @OBJC@ | |
30 AR = @AR@ | |
31 LD = ${CC} | |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
32 RANLIB = @RANLIB@ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
33 PYTHON = @PYTHON@ |
1763 | 34 CFLAGS = @CFLAGS@ |
35 CXXFLAGS = @CXXFLAGS@ | |
36 CPPFLAGS = @CPPFLAGS@ | |
37 DFLAGS = @DFLAGS@ | |
38 ERLCFLAGS = @ERLCFLAGS@ | |
39 OBJCFLAGS = @OBJCFLAGS@ | |
40 LDFLAGS = @LDFLAGS@ | |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
41 PYTHON_FLAGS = @PYTHON_FLAGS@ |
1763 | 42 LIBS = @LIBS@ |
1909 | 43 PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@ |
44 PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@ | |
1879
81cdc01db60e
Update buildsys (adds ${PROG_SUFFIX}).
Jonathan Schleifer <js@h3c.de>
parents:
1877
diff
changeset
|
45 PROG_SUFFIX = @EXEEXT@ |
1763 | 46 LIB_CPPFLAGS = @LIB_CPPFLAGS@ |
47 LIB_CFLAGS = @LIB_CFLAGS@ | |
48 LIB_LDFLAGS = @LIB_LDFLAGS@ | |
49 LIB_PREFIX = @LIB_PREFIX@ | |
50 LIB_SUFFIX = @LIB_SUFFIX@ | |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
51 PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@ |
1763 | 52 PLUGIN_CFLAGS = @PLUGIN_CFLAGS@ |
53 PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@ | |
54 PLUGIN_SUFFIX = @PLUGIN_SUFFIX@ | |
55 INSTALL_LIB = @INSTALL_LIB@ | |
56 UNINSTALL_LIB = @UNINSTALL_LIB@ | |
57 CLEAN_LIB = @CLEAN_LIB@ | |
58 LN_S = @LN_S@ | |
59 MKDIR_P = mkdir -p | |
1863 | 60 INSTALL = install |
1763 | 61 SHELL = @SHELL@ |
62 prefix = @prefix@ | |
63 exec_prefix = @exec_prefix@ | |
64 bindir = @bindir@ | |
65 libdir = @libdir@ | |
2034
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
66 plugindir ?= ${libdir}/${PACKAGE} |
1763 | 67 datarootdir = @datarootdir@ |
68 datadir = @datadir@ | |
69 includedir = @includedir@ | |
70 includesubdir ?= ${PACKAGE} | |
71 mandir = @mandir@ | |
72 mansubdir ?= man1 | |
73 | |
74 OBJS1 = ${SRCS:.c=.o} | |
75 OBJS2 = ${OBJS1:.cc=.o} | |
76 OBJS3 = ${OBJS2:.cxx=.o} | |
77 OBJS4 = ${OBJS3:.d=.o} | |
78 OBJS5 = ${OBJS4:.erl=.beam} | |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
79 OBJS6 = ${OBJS5:.m=.o} |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
80 OBJS7 = ${OBJS6:.py=.pyc} |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
81 OBJS += ${OBJS7:.xpm=.o} |
1763 | 82 |
83 .SILENT: | |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
84 .SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m .py .pyc .xpm |
1909 | 85 .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean |
1763 | 86 |
1826
d7709de0882c
Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents:
1815
diff
changeset
|
87 all: |
1868 | 88 for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \ |
1845 | 89 ${MAKE} ${MFLAGS} $$i || exit 1; \ |
1826
d7709de0882c
Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents:
1815
diff
changeset
|
90 done |
1763 | 91 |
92 subdirs: | |
93 for i in ${SUBDIRS}; do \ | |
94 ${DIR_ENTER}; \ | |
95 ${MAKE} ${MFLAGS} || exit 1; \ | |
96 ${DIR_LEAVE}; \ | |
97 done | |
98 | |
99 depend: pre-depend ${SRCS} | |
100 regen=0; \ | |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
101 deps=""; \ |
2034
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
102 test -f .deps || regen=1; \ |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
103 for i in ${SRCS}; do \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
104 case $$i in \ |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
105 *.c) \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
106 test $$i -nt .deps && regen=1; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
107 deps="$$deps $${i%.c}.dep"; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
108 ;; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
109 *.cc) \ |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
110 test $$i -nt .deps && regen=1; \ |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
111 deps="$$deps $${i%.cc}.dep"; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
112 ;; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
113 *.cxx) \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
114 test $$i -nt .deps && regen=1; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
115 deps="$$deps $${i%.cxx}.dep"; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
116 ;; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
117 *.m) \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
118 test $$i -nt .deps && regen=1; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
119 deps="$$deps $${i%.m}.dep"; \ |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
120 ;; \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
121 esac; \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
122 done; \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
123 if test x"$$regen" = x"1" -a x"$$deps" != "x"; then \ |
1815 | 124 ${DEPEND_STATUS}; \ |
2372
3799c5a932a9
Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2148
diff
changeset
|
125 rm -f .deps; \ |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
126 if ${MAKE} ${MFLAGS} $$deps; then \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
127 cat $$deps >.deps; \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
128 rm -f $$deps; \ |
2372
3799c5a932a9
Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2148
diff
changeset
|
129 ${DEPEND_OK}; \ |
3799c5a932a9
Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2148
diff
changeset
|
130 else \ |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
131 rm -f .deps $$deps; \ |
2372
3799c5a932a9
Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2148
diff
changeset
|
132 ${DEPEND_FAILED}; \ |
1826
d7709de0882c
Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents:
1815
diff
changeset
|
133 fi; \ |
1763 | 134 fi |
135 | |
2372
3799c5a932a9
Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2148
diff
changeset
|
136 .c.dep .cc.dep .cxx.dep .m.dep: |
2374
179821cb7dca
Fix a possible bug in dependency generation.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2373
diff
changeset
|
137 ${CPP} ${CPPFLAGS} -M $< >$@ |
2372
3799c5a932a9
Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2148
diff
changeset
|
138 |
3799c5a932a9
Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2148
diff
changeset
|
139 .d.dep: |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
140 .xpm.dep: |
2372
3799c5a932a9
Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2148
diff
changeset
|
141 |
1763 | 142 pre-depend: |
143 | |
1815 | 144 ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} |
1763 | 145 ${LINK_STATUS} |
146 if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \ | |
147 ${LINK_OK}; \ | |
148 else \ | |
149 ${LINK_FAILED}; \ | |
150 fi | |
151 | |
152 ${LIB} ${LIB_NOINST}: ${EXT_DEPS} ${OBJS} | |
153 ${LINK_STATUS} | |
154 if ${LD} -o $@ ${OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \ | |
155 ${LINK_OK}; \ | |
156 else \ | |
157 ${LINK_FAILED}; \ | |
158 fi | |
159 | |
2529
0bd07451d1d1
buildsys.mk.in: Fixed typo.
Jonathan Schleifer <js@webkeks.org>
parents:
2378
diff
changeset
|
160 ${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${OBJS} |
1763 | 161 ${LINK_STATUS} |
162 if ${LD} -o $@ ${OBJS} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}; then \ | |
163 ${LINK_OK}; \ | |
164 else \ | |
165 ${LINK_FAILED}; \ | |
166 fi | |
167 | |
168 ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} | |
169 ${LINK_STATUS} | |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
170 if ${AR} cr $@ ${OBJS} && ${RANLIB} ${@}; then \ |
1763 | 171 ${LINK_OK}; \ |
172 else \ | |
173 ${LINK_FAILED}; \ | |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
174 rm -f $@; \ |
1763 | 175 fi |
176 | |
177 .c.o: | |
178 ${COMPILE_STATUS} | |
179 if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ | |
180 ${COMPILE_OK}; \ | |
181 else \ | |
182 ${COMPILE_FAILED}; \ | |
183 fi | |
184 | |
185 .cc.o .cxx.o: | |
186 ${COMPILE_STATUS} | |
187 if ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ | |
188 ${COMPILE_OK}; \ | |
189 else \ | |
190 ${COMPILE_FAILED}; \ | |
191 fi | |
192 | |
193 .d.o: | |
194 ${COMPILE_STATUS} | |
1865 | 195 if test x"$(basename ${DC})" = x"dmd"; then \ |
1763 | 196 if ${DC} ${DFLAGS} -c -of$@ $<; then \ |
197 ${COMPILE_OK}; \ | |
198 else \ | |
199 ${COMPILE_FAILED}; \ | |
200 fi \ | |
201 else \ | |
202 if ${DC} ${DFLAGS} -c -o $@ $<; then \ | |
203 ${COMPILE_OK}; \ | |
204 else \ | |
205 ${COMPILE_FAILED}; \ | |
206 fi \ | |
207 fi | |
208 | |
209 .erl.beam: | |
210 ${COMPILE_STATUS} | |
211 if ${ERLC} ${ERLCFLAGS} -o $@ $<; then \ | |
212 ${COMPILE_OK}; \ | |
213 else \ | |
214 ${COMPILE_FAILED}; \ | |
215 fi | |
216 | |
217 .m.o: | |
218 ${COMPILE_STATUS} | |
219 if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ | |
220 ${COMPILE_OK}; \ | |
221 else \ | |
222 ${COMPILE_FAILED}; \ | |
223 fi | |
224 | |
2947
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
225 .py.pyc: |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
226 ${COMPILE_STATUS} |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
227 if ${PYTHON} ${PYTHON_FLAGS} -c "import py_compile; py_compile.compile('$<')"; then \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
228 ${COMPILE_OK}; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
229 else \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
230 ${COMPILE_FAILED}; \ |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
231 fi |
c79e239a816f
Same as for audacious.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2932
diff
changeset
|
232 |
2852
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
233 .xpm.o: |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
234 ${COMPILE_STATUS} |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
235 if ${CC} ${CFLAGS} ${CPPFLAGS} -x c -c -o $@ $<; then \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
236 ${COMPILE_OK}; \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
237 else \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
238 ${COMPILE_FAILED}; \ |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
239 fi |
f2bec2d589d6
Parallel dependency resolution by Jonathan Schleifer.
Tony Vroon <chainsaw@gentoo.org>
parents:
2803
diff
changeset
|
240 |
1763 | 241 install: ${LIB} ${STATIC_LIB} ${PLUGIN} ${PROG} install-extra |
242 for i in ${SUBDIRS}; do \ | |
243 ${DIR_ENTER}; \ | |
244 ${MAKE} ${MFLAGS} install || exit 1; \ | |
245 ${DIR_LEAVE}; \ | |
246 done | |
247 | |
248 for i in ${LIB}; do \ | |
249 ${INSTALL_STATUS}; \ | |
250 if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL_LIB}; then \ | |
251 ${INSTALL_OK}; \ | |
252 else \ | |
253 ${INSTALL_FAILED}; \ | |
254 fi \ | |
255 done | |
256 | |
257 for i in ${STATIC_LIB}; do \ | |
258 ${INSTALL_STATUS}; \ | |
1909 | 259 if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \ |
1763 | 260 ${INSTALL_OK}; \ |
261 else \ | |
262 ${INSTALL_FAILED}; \ | |
263 fi \ | |
264 done | |
265 | |
266 for i in ${PLUGIN}; do \ | |
267 ${INSTALL_STATUS}; \ | |
2006
a56a26a5f233
Revised the plugindir logic.
Eugene Paskevich <eugene@raptor.kiev.ua>
parents:
2003
diff
changeset
|
268 if ${MKDIR_P} ${DESTDIR}${plugindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i; then \ |
1763 | 269 ${INSTALL_OK}; \ |
270 else \ | |
271 ${INSTALL_FAILED}; \ | |
272 fi \ | |
273 done | |
274 | |
275 for i in ${DATA}; do \ | |
276 ${INSTALL_STATUS}; \ | |
277 if ${MKDIR_P} $$(dirname ${DESTDIR}${datadir}/${PACKAGE}/$$i) && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \ | |
278 ${INSTALL_OK}; \ | |
279 else \ | |
280 ${INSTALL_FAILED}; \ | |
281 fi \ | |
282 done | |
283 | |
284 for i in ${PROG}; do \ | |
285 ${INSTALL_STATUS}; \ | |
1877 | 286 if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \ |
1763 | 287 ${INSTALL_OK}; \ |
288 else \ | |
289 ${INSTALL_FAILED}; \ | |
290 fi \ | |
291 done | |
292 | |
293 for i in ${INCLUDES}; do \ | |
294 ${INSTALL_STATUS}; \ | |
295 if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \ | |
296 ${INSTALL_OK}; \ | |
297 else \ | |
298 ${INSTALL_FAILED}; \ | |
299 fi \ | |
300 done | |
301 | |
302 for i in ${MAN}; do \ | |
303 ${INSTALL_STATUS}; \ | |
304 if ${MKDIR_P} ${DESTDIR}${mandir}/${mansubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${mandir}/${mansubdir}/$$i; then \ | |
305 ${INSTALL_OK}; \ | |
306 else \ | |
307 ${INSTALL_FAILED}; \ | |
308 fi \ | |
309 done | |
310 | |
311 install-extra: | |
312 | |
313 uninstall: uninstall-extra | |
314 for i in ${SUBDIRS}; do \ | |
315 ${DIR_ENTER}; \ | |
316 ${MAKE} ${MFLAGS} uninstall || exit 1; \ | |
317 ${DIR_LEAVE}; \ | |
318 done | |
319 | |
320 for i in ${LIB}; do \ | |
1865 | 321 if test -f ${DESTDIR}${libdir}/$$i; then \ |
1763 | 322 if ${UNINSTALL_LIB}; then \ |
323 ${DELETE_OK}; \ | |
324 else \ | |
325 ${DELETE_FAILED}; \ | |
326 fi \ | |
327 fi; \ | |
328 done | |
329 | |
330 for i in ${STATIC_LIB}; do \ | |
1865 | 331 if test -f ${DESTDIR}${libdir}/$$i; then \ |
1763 | 332 if rm -f ${DESTDIR}${libdir}/$$i; then \ |
333 ${DELETE_OK}; \ | |
334 else \ | |
335 ${DELETE_FAILED}; \ | |
336 fi \ | |
337 fi \ | |
338 done | |
339 | |
340 for i in ${PLUGIN}; do \ | |
2006
a56a26a5f233
Revised the plugindir logic.
Eugene Paskevich <eugene@raptor.kiev.ua>
parents:
2003
diff
changeset
|
341 if test -f ${DESTDIR}${plugindir}/$$i; then \ |
a56a26a5f233
Revised the plugindir logic.
Eugene Paskevich <eugene@raptor.kiev.ua>
parents:
2003
diff
changeset
|
342 if rm -f ${DESTDIR}${plugindir}/$$i; then \ |
1763 | 343 ${DELETE_OK}; \ |
344 else \ | |
345 ${DELETE_FAILED}; \ | |
346 fi \ | |
347 fi \ | |
348 done | |
2034
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
349 -rmdir ${DESTDIR}${plugindir} >/dev/null 2>&1 |
1763 | 350 |
351 for i in ${DATA}; do \ | |
1865 | 352 if test -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \ |
1763 | 353 if rm -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \ |
354 ${DELETE_OK}; \ | |
355 else \ | |
356 ${DELETE_FAILED}; \ | |
357 fi \ | |
358 fi \ | |
359 done | |
360 | |
361 for i in ${PROG}; do \ | |
1865 | 362 if test -f ${DESTDIR}${bindir}/$$i; then \ |
1763 | 363 if rm -f ${DESTDIR}${bindir}/$$i; then \ |
364 ${DELETE_OK}; \ | |
365 else \ | |
366 ${DELETE_FAILED}; \ | |
367 fi \ | |
368 fi \ | |
369 done | |
370 | |
371 for i in ${INCLUDES}; do \ | |
1865 | 372 if test -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \ |
1763 | 373 if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \ |
374 ${DELETE_OK}; \ | |
375 else \ | |
376 ${DELETE_FAILED}; \ | |
377 fi \ | |
378 fi \ | |
379 done | |
380 -rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1 | |
381 | |
382 for i in ${MAN}; do \ | |
1865 | 383 if test -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \ |
1763 | 384 if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \ |
385 ${DELETE_OK}; \ | |
386 else \ | |
387 ${DELETE_FAILED}; \ | |
388 fi \ | |
389 fi \ | |
390 done | |
391 | |
392 uninstall-extra: | |
393 | |
394 clean: | |
395 for i in ${SUBDIRS}; do \ | |
396 ${DIR_ENTER}; \ | |
397 ${MAKE} ${MFLAGS} clean || exit 1; \ | |
398 ${DIR_LEAVE}; \ | |
399 done | |
400 | |
2374
179821cb7dca
Fix a possible bug in dependency generation.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
2373
diff
changeset
|
401 for i in ${OBJS} ${CLEAN} ${CLEAN_LIB} .deps ${DEPS}; do \ |
1865 | 402 if test -f $$i -o -d $$i; then \ |
1763 | 403 if rm -fr $$i; then \ |
404 ${DELETE_OK}; \ | |
405 else \ | |
406 ${DELETE_FAILED}; \ | |
407 fi \ | |
408 fi \ | |
409 done | |
410 | |
411 distclean: clean | |
412 for i in ${SUBDIRS}; do \ | |
413 ${DIR_ENTER}; \ | |
414 ${MAKE} ${MFLAGS} distclean || exit 1; \ | |
415 ${DIR_LEAVE}; \ | |
416 done | |
417 | |
1973
f86cb7fc1d4f
Add -pipe -Wall if gcc and fix a few warnings.
Jonathan Schleifer <js@h3c.de>
parents:
1918
diff
changeset
|
418 for i in ${PROG} ${PROG_NOINST} ${LIB} ${LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${DISTCLEAN} *~; do \ |
1865 | 419 if test -f $$i -o -d $$i; then \ |
1763 | 420 if rm -fr $$i; then \ |
421 ${DELETE_OK}; \ | |
422 else \ | |
423 ${DELETE_FAILED}; \ | |
424 fi \ | |
425 fi \ | |
426 done | |
427 | |
2034
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
428 DIR_ENTER = printf "\033[K\033[0;36mEntering directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd $$i || exit 1 |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
429 DIR_LEAVE = printf "\033[K\033[0;36mLeaving directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd .. || exit 1 |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
430 DEPEND_STATUS = printf "\033[K\033[0;33mGenerating dependencies...\033[0m\r" |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
431 DEPEND_OK = printf "\033[K\033[0;32mSuccessfully generated dependencies.\033[0m\n" |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
432 DEPEND_FAILED = printf "\033[K\033[0;31mFailed to generate dependencies!\033[0m\n"; exit 1 |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
433 COMPILE_STATUS = printf "\033[K\033[0;33mCompiling \033[1;33m$<\033[0;33m...\033[0m\r" |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
434 COMPILE_OK = printf "\033[K\033[0;32mSuccessfully compiled \033[1;32m$<\033[0;32m.\033[0m\n" |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
435 COMPILE_FAILED = printf "\033[K\033[0;31mFailed to compile \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1 |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
436 LINK_STATUS = printf "\033[K\033[0;33mLinking \033[1;33m$@\033[0;33m...\033[0m\r" |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
437 LINK_OK = printf "\033[K\033[0;32mSuccessfully linked \033[1;32m$@\033[0;32m.\033[0m\n" |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
438 LINK_FAILED = printf "\033[K\033[0;31mFailed to link \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1 |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
439 INSTALL_STATUS = printf "\033[K\033[0;33mInstalling \033[1;33m$$i\033[0;33m...\033[0m\r" |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
440 INSTALL_OK = printf "\033[K\033[0;32mSuccessfully installed \033[1;32m$$i\033[0;32m.\033[0m\n" |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
441 INSTALL_FAILED = printf "\033[K\033[0;31mFailed to install \033[1;31m$$i\033[0;31m!\033[0m\n"; exit 1 |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
442 DELETE_OK = printf "\033[K\033[0;34mDeleted \033[1;34m$$i\033[0;34m.\033[0m\n" |
a21cc1e45080
Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents:
2015
diff
changeset
|
443 DELETE_FAILED = printf "\033[K\033[0;31mFailed to delete \033[1;31m$$i\033[0;31m!\033[0m\n"; exit 1 |
1763 | 444 |
445 -include .deps |