annotate buildsys.mk.in @ 3142:81e1f5769e85

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