annotate buildsys.mk.in @ 4277:879109b7ea8b

Updated French translation.
author Stany HENRY <StrassBoy@gmail.com>
date Mon, 11 Feb 2008 05:35:58 +0100
parents 3e0a2cce15f6
children 6ab8237fcce4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
1 #
3877
b5c8a7e2215d Change my mail.
Jonathan Schleifer <js@h3c.de>
parents: 3861
diff changeset
2 # Copyright (c) 2007, Jonathan Schleifer <js-buildsys@webkeks.org>
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
3 #
4275
3e0a2cce15f6 Added HG repo URL to buildsys as a comment.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 4265
diff changeset
4 # https://webkeks.org/hg/buildsys/
3e0a2cce15f6 Added HG repo URL to buildsys as a comment.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 4265
diff changeset
5 #
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
6 # Permission to use, copy, modify, and/or distribute this software for any
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
7 # purpose with or without fee is hereby granted, provided that the above
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
8 # copyright notice and this permission notice is present in all copies.
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
9 #
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
10 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
11 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
12 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
13 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
14 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
15 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
16 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
17 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
18 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9ddf21ab5c84 Transit to Mk2.
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
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
20 # POSSIBILITY OF SUCH DAMAGE.
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
21 #
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
22
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
23 PACKAGE = @PACKAGE@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
24 CC = @CC@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
25 CXX = @CXX@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
26 CPP = @CPP@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
27 DC = @DC@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
28 ERLC = @ERLC@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
29 OBJC = @OBJC@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
30 AR = @AR@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
31 LD = ${CC}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
32 CFLAGS = @CFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
33 CXXFLAGS = @CXXFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
34 CPPFLAGS = @CPPFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
35 DFLAGS = @DFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
36 ERLCFLAGS = @ERLCFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
37 OBJCFLAGS = @OBJCFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
38 LDFLAGS = @LDFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
39 LIBS = @LIBS@
3656
db04d0916c22 implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents: 3653
diff changeset
40 PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@
db04d0916c22 implib for ${PROG} should finally work.
Jonathan Schleifer <js@h3c.de>
parents: 3653
diff changeset
41 PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@
3641
12500701b6dd Update buildsys (adds ${PROG_SUFFIX}).
Jonathan Schleifer <js@h3c.de>
parents: 3632
diff changeset
42 PROG_SUFFIX = @EXEEXT@
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
43 LIB_CPPFLAGS = @LIB_CPPFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
44 LIB_CFLAGS = @LIB_CFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
45 LIB_LDFLAGS = @LIB_LDFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
46 LIB_PREFIX = @LIB_PREFIX@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
47 LIB_SUFFIX = @LIB_SUFFIX@
3861
1902ce57b333 Fix installation of libaudid3tag in ${plugindir}.
Vitaly Lipatov <lav@etersoft.ru>
parents: 3795
diff changeset
48 LIBDIR ?= ${libdir}
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
49 PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
50 PLUGIN_CFLAGS = @PLUGIN_CFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
51 PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
52 PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
53 INSTALL_LIB = @INSTALL_LIB@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
54 UNINSTALL_LIB = @UNINSTALL_LIB@
3594
fa49ef305f59 Some buildsys fixes for Windows.
Jonathan Schleifer <js@h3c.de>
parents: 3593
diff changeset
55 CLEAN_LIB = @CLEAN_LIB@
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
56 LN_S = @LN_S@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
57 MKDIR_P = mkdir -p
3616
7d146509516b install-sh doesn't work.
Jonathan Schleifer <js@h3c.de>
parents: 3614
diff changeset
58 INSTALL = install
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
59 SHELL = @SHELL@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
60 prefix = @prefix@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
61 exec_prefix = @exec_prefix@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
62 bindir = @bindir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
63 libdir = @libdir@
3725
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
64 plugindir ?= ${libdir}/${PACKAGE}
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
65 datarootdir = @datarootdir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
66 datadir = @datadir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
67 includedir = @includedir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
68 includesubdir ?= ${PACKAGE}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
69 mandir = @mandir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
70 mansubdir ?= man1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
71
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
72 OBJS1 = ${SRCS:.c=.o}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
73 OBJS2 = ${OBJS1:.cc=.o}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
74 OBJS3 = ${OBJS2:.cxx=.o}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
75 OBJS4 = ${OBJS3:.d=.o}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
76 OBJS5 = ${OBJS4:.erl=.beam}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
77 OBJS += ${OBJS5:.m=.o}
4263
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
78 DEPS += ${OBJS:.o=.dep}
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
79
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
80 .SILENT:
4263
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
81 .SUFFIXES: .beam .c .cc .cxx .d .dep .erl .m
3660
c54dfcdc839e Add missing targets to .PHONY.
Jonathan Schleifer <js@h3c.de>
parents: 3657
diff changeset
82 .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
83
3611
6d055449020a Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents: 3610
diff changeset
84 all:
3630
773f69be3d14 Oops. Fix parallel build.
Jonathan Schleifer <js@h3c.de>
parents: 3620
diff changeset
85 for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \
3614
ddf207fc7d8e Abort on error.
Jonathan Schleifer <js@h3c.de>
parents: 3613
diff changeset
86 ${MAKE} ${MFLAGS} $$i || exit 1; \
3611
6d055449020a Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents: 3610
diff changeset
87 done
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
88
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
89 subdirs:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
90 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
91 ${DIR_ENTER}; \
3575
021005bfab68 Add ${MFLAGS}.
Jonathan Schleifer <js@h3c.de>
parents: 3572
diff changeset
92 ${MAKE} ${MFLAGS} || exit 1; \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
93 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
94 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
95
3593
85a49369c95f Actually, the last patch was wrong. depend has to depend on ${SRCS}.
Jonathan Schleifer <js@h3c.de>
parents: 3586
diff changeset
96 depend: pre-depend ${SRCS}
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
97 regen=0; \
3725
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
98 test -f .deps || regen=1; \
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
99 for i in ${SRCS}; do test $$i -nt .deps && regen=1; done; \
4264
49740df2ccca Fix possible infinite loop in dependency generation.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 4263
diff changeset
100 if test x"$$regen" = x"1" -a x"${DEPS}" != "x"; then \
3610
a51873dc4052 Add depend status.
Jonathan Schleifer <js@h3c.de>
parents: 3598
diff changeset
101 ${DEPEND_STATUS}; \
4263
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
102 rm -f .deps; \
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
103 if ${MAKE} ${MFLAGS} ${DEPS}; then \
4265
7410b81a3362 Fix a possible bug in dependency generation.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 4264
diff changeset
104 cat ${DEPS} >.deps; \
7410b81a3362 Fix a possible bug in dependency generation.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 4264
diff changeset
105 rm -f ${DEPS}; \
4263
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
106 ${DEPEND_OK}; \
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
107 else \
4265
7410b81a3362 Fix a possible bug in dependency generation.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 4264
diff changeset
108 rm -f .deps ${DEPS}; \
4263
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
109 ${DEPEND_FAILED}; \
3611
6d055449020a Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents: 3610
diff changeset
110 fi; \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
111 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
112
4263
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
113 .c.dep .cc.dep .cxx.dep .m.dep:
4265
7410b81a3362 Fix a possible bug in dependency generation.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 4264
diff changeset
114 ${CPP} ${CPPFLAGS} -M $< >$@
4263
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
115
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
116 .d.dep:
efb49258f4f0 Make dependency generation threaded.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3877
diff changeset
117
3586
ddb15c329985 Update audacious to latest rev of build system.
Jonathan Schleifer <js@h3c.de>
parents: 3575
diff changeset
118 pre-depend:
ddb15c329985 Update audacious to latest rev of build system.
Jonathan Schleifer <js@h3c.de>
parents: 3575
diff changeset
119
3610
a51873dc4052 Add depend status.
Jonathan Schleifer <js@h3c.de>
parents: 3598
diff changeset
120 ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS}
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
121 ${LINK_STATUS}
3586
ddb15c329985 Update audacious to latest rev of build system.
Jonathan Schleifer <js@h3c.de>
parents: 3575
diff changeset
122 if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
123 ${LINK_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
124 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
125 ${LINK_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
126 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
127
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
128 ${LIB} ${LIB_NOINST}: ${EXT_DEPS} ${OBJS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
129 ${LINK_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
130 if ${LD} -o $@ ${OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
131 ${LINK_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
132 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
133 ${LINK_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
134 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
135
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
136 ${PLUGIN} ${PLUGIN_NONST}: ${EXT_DEPS} ${OBJS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
137 ${LINK_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
138 if ${LD} -o $@ ${OBJS} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
139 ${LINK_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
140 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
141 ${LINK_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
142 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
143
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
144 ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
145 ${LINK_STATUS}
3595
c72f82b2182b Use ar cr instead of ar cq.
Jonathan Schleifer <js@h3c.de>
parents: 3594
diff changeset
146 if ${AR} cr $@ ${OBJS}; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
147 ${LINK_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
148 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
149 ${LINK_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
150 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
151
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
152 .c.o:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
153 ${COMPILE_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
154 if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
155 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
156 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
157 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
158 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
159
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
160 .cc.o .cxx.o:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
161 ${COMPILE_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
162 if ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
163 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
164 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
165 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
166 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
167
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
168 .d.o:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
169 ${COMPILE_STATUS}
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
170 if test x"$(basename ${DC})" = x"dmd"; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
171 if ${DC} ${DFLAGS} -c -of$@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
172 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
173 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
174 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
175 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
176 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
177 if ${DC} ${DFLAGS} -c -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
178 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
179 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
180 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
181 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
182 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
183
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
184 .erl.beam:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
185 ${COMPILE_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
186 if ${ERLC} ${ERLCFLAGS} -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
187 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
188 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
189 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
190 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
191
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
192 .m.o:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
193 ${COMPILE_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
194 if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
195 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
196 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
197 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
198 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
199
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
200 install: ${LIB} ${STATIC_LIB} ${PLUGIN} ${PROG} install-extra
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
201 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
202 ${DIR_ENTER}; \
3575
021005bfab68 Add ${MFLAGS}.
Jonathan Schleifer <js@h3c.de>
parents: 3572
diff changeset
203 ${MAKE} ${MFLAGS} install || exit 1; \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
204 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
205 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
206
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
207 for i in ${LIB}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
208 ${INSTALL_STATUS}; \
3861
1902ce57b333 Fix installation of libaudid3tag in ${plugindir}.
Vitaly Lipatov <lav@etersoft.ru>
parents: 3795
diff changeset
209 if ${MKDIR_P} ${DESTDIR}${LIBDIR} && ${INSTALL_LIB}; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
210 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
211 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
212 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
213 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
214 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
215
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
216 for i in ${STATIC_LIB}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
217 ${INSTALL_STATUS}; \
3657
e83412963c51 More implib stuff.
Jonathan Schleifer <js@h3c.de>
parents: 3656
diff changeset
218 if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
219 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
220 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
221 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
222 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
223 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
224
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
225 for i in ${PLUGIN}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
226 ${INSTALL_STATUS}; \
3725
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
227 if ${MKDIR_P} ${DESTDIR}${plugindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
228 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
229 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
230 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
231 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
232 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
233
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
234 for i in ${DATA}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
235 ${INSTALL_STATUS}; \
3572
625af2797f35 Clean up Makefiles.
Jonathan Schleifer <js@h3c.de>
parents: 3571
diff changeset
236 if ${MKDIR_P} $$(dirname ${DESTDIR}${datadir}/${PACKAGE}/$$i) && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
237 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
238 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
239 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
240 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
241 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
242
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
243 for i in ${PROG}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
244 ${INSTALL_STATUS}; \
3632
ffe7a2346055 Seems like I forgot to remove -s for ${PROG}.
Jonathan Schleifer <js@h3c.de>
parents: 3630
diff changeset
245 if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
246 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
247 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
248 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
249 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
250 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
251
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
252 for i in ${INCLUDES}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
253 ${INSTALL_STATUS}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
254 if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
255 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
256 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
257 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
258 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
259 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
260
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
261 for i in ${MAN}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
262 ${INSTALL_STATUS}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
263 if ${MKDIR_P} ${DESTDIR}${mandir}/${mansubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
264 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
265 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
266 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
267 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
268 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
269
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
270 install-extra:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
271
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
272 uninstall: uninstall-extra
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
273 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
274 ${DIR_ENTER}; \
3575
021005bfab68 Add ${MFLAGS}.
Jonathan Schleifer <js@h3c.de>
parents: 3572
diff changeset
275 ${MAKE} ${MFLAGS} uninstall || exit 1; \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
276 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
277 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
278
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
279 for i in ${LIB}; do \
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
280 if test -f ${DESTDIR}${libdir}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
281 if ${UNINSTALL_LIB}; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
282 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
283 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
284 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
285 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
286 fi; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
287 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
288
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
289 for i in ${STATIC_LIB}; do \
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
290 if test -f ${DESTDIR}${libdir}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
291 if rm -f ${DESTDIR}${libdir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
292 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
293 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
294 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
295 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
296 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
297 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
298
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
299 for i in ${PLUGIN}; do \
3725
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
300 if test -f ${DESTDIR}${plugindir}/$$i; then \
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
301 if rm -f ${DESTDIR}${plugindir}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
302 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
303 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
304 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
305 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
306 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
307 done
3725
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
308 -rmdir ${DESTDIR}${plugindir} >/dev/null 2>&1
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
309
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
310 for i in ${DATA}; do \
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
311 if test -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
312 if rm -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
313 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
314 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
315 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
316 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
317 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
318 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
319
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
320 for i in ${PROG}; do \
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
321 if test -f ${DESTDIR}${bindir}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
322 if rm -f ${DESTDIR}${bindir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
323 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
324 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
325 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
326 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
327 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
328 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
329
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
330 for i in ${INCLUDES}; do \
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
331 if test -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
332 if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
333 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
334 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
335 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
336 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
337 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
338 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
339 -rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
340
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
341 for i in ${MAN}; do \
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
342 if test -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
343 if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
344 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
345 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
346 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
347 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
348 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
349 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
350
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
351 uninstall-extra:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
352
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
353 clean:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
354 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
355 ${DIR_ENTER}; \
3575
021005bfab68 Add ${MFLAGS}.
Jonathan Schleifer <js@h3c.de>
parents: 3572
diff changeset
356 ${MAKE} ${MFLAGS} clean || exit 1; \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
357 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
358 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
359
4265
7410b81a3362 Fix a possible bug in dependency generation.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 4264
diff changeset
360 for i in ${OBJS} ${CLEAN} ${CLEAN_LIB} .deps ${DEPS}; do \
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
361 if test -f $$i -o -d $$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
362 if rm -fr $$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
363 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
364 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
365 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
366 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
367 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
368 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
369
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
370 distclean: clean
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
371 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
372 ${DIR_ENTER}; \
3575
021005bfab68 Add ${MFLAGS}.
Jonathan Schleifer <js@h3c.de>
parents: 3572
diff changeset
373 ${MAKE} ${MFLAGS} distclean || exit 1; \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
374 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
375 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
376
3725
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
377 for i in ${PROG} ${PROG_NOINST} ${LIB} ${LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${DISTCLEAN} *~; do \
3619
1033e592161c Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 3616
diff changeset
378 if test -f $$i -o -d $$i; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
379 if rm -fr $$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
380 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
381 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
382 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
383 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
384 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
385 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
386
3725
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
387 DIR_ENTER = printf "\033[K\033[0;36mEntering directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd $$i || exit 1
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
388 DIR_LEAVE = printf "\033[K\033[0;36mLeaving directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd .. || exit 1
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
389 DEPEND_STATUS = printf "\033[K\033[0;33mGenerating dependencies...\033[0m\r"
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
390 DEPEND_OK = printf "\033[K\033[0;32mSuccessfully generated dependencies.\033[0m\n"
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
391 DEPEND_FAILED = printf "\033[K\033[0;31mFailed to generate dependencies!\033[0m\n"; exit 1
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
392 COMPILE_STATUS = printf "\033[K\033[0;33mCompiling \033[1;33m$<\033[0;33m...\033[0m\r"
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
393 COMPILE_OK = printf "\033[K\033[0;32mSuccessfully compiled \033[1;32m$<\033[0;32m.\033[0m\n"
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
394 COMPILE_FAILED = printf "\033[K\033[0;31mFailed to compile \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
395 LINK_STATUS = printf "\033[K\033[0;33mLinking \033[1;33m$@\033[0;33m...\033[0m\r"
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
396 LINK_OK = printf "\033[K\033[0;32mSuccessfully linked \033[1;32m$@\033[0;32m.\033[0m\n"
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
397 LINK_FAILED = printf "\033[K\033[0;31mFailed to link \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
398 INSTALL_STATUS = printf "\033[K\033[0;33mInstalling \033[1;33m$$i\033[0;33m...\033[0m\r"
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
399 INSTALL_OK = printf "\033[K\033[0;32mSuccessfully installed \033[1;32m$$i\033[0;32m.\033[0m\n"
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
400 INSTALL_FAILED = printf "\033[K\033[0;31mFailed to install \033[1;31m$$i\033[0;31m!\033[0m\n"; exit 1
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
401 DELETE_OK = printf "\033[K\033[0;34mDeleted \033[1;34m$$i\033[0;34m.\033[0m\n"
b0f65f70467d Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 3715
diff changeset
402 DELETE_FAILED = printf "\033[K\033[0;31mFailed to delete \033[1;31m$$i\033[0;31m!\033[0m\n"; exit 1
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
403
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
404 -include .deps