annotate buildsys.mk.in @ 3571:cfb56cc47f9f trunk

append rpath on linking audacious when prefix is specified.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Wed, 19 Sep 2007 18:41:39 +0900
parents 1f75259a1cac
children 625af2797f35
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 #
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
2 # Copyright (c) 2007, Jonathan Schleifer <js@h3c.de>
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
3 #
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
4 # Permission to use, copy, modify, and/or distribute this software for any
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
5 # purpose with or without fee is hereby granted, provided that the above
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
6 # copyright notice and this permission notice is present in all copies.
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
7 #
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
8 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
9 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
10 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
11 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
12 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
13 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
14 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
15 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
16 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
17 # 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
18 # POSSIBILITY OF SUCH DAMAGE.
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
19 #
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
20
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
21 PACKAGE = @PACKAGE@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
22 CC = @CC@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
23 CXX = @CXX@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
24 CPP = @CPP@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
25 DC = @DC@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
26 ERLC = @ERLC@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
27 OBJC = @OBJC@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
28 AR = @AR@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
29 LD = ${CC}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
30 CFLAGS = @CFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
31 CXXFLAGS = @CXXFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
32 CPPFLAGS = @CPPFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
33 DFLAGS = @DFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
34 ERLCFLAGS = @ERLCFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
35 OBJCFLAGS = @OBJCFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
36 LDFLAGS = @LDFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
37 LIBS = @LIBS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
38 LIB_CPPFLAGS = @LIB_CPPFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
39 LIB_CFLAGS = @LIB_CFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
40 LIB_LDFLAGS = @LIB_LDFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
41 LIB_PREFIX = @LIB_PREFIX@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
42 LIB_SUFFIX = @LIB_SUFFIX@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
43 PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
44 PLUGIN_CFLAGS = @PLUGIN_CFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
45 PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
46 PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
47 INSTALL_LIB = @INSTALL_LIB@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
48 UNINSTALL_LIB = @UNINSTALL_LIB@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
49 LN_S = @LN_S@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
50 MKDIR_P = mkdir -p
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
51 INSTALL = @INSTALL@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
52 SHELL = @SHELL@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
53 prefix = @prefix@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
54 exec_prefix = @exec_prefix@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
55 bindir = @bindir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
56 libdir = @libdir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
57 plugindir ?= ${PACKAGE}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
58 datarootdir = @datarootdir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
59 datadir = @datadir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
60 includedir = @includedir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
61 includesubdir ?= ${PACKAGE}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
62 mandir = @mandir@
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
63 mansubdir ?= man1
3538
1f75259a1cac define pkgdatadir.
William Pitcock <nenolod@atheme.org>
parents: 3535
diff changeset
64 pkgdatadir = ${datadir}/${PACKAGE}
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
65
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
66 OBJS1 = ${SRCS:.c=.o}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
67 OBJS2 = ${OBJS1:.cc=.o}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
68 OBJS3 = ${OBJS2:.cxx=.o}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
69 OBJS4 = ${OBJS3:.d=.o}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
70 OBJS5 = ${OBJS4:.erl=.beam}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
71 OBJS += ${OBJS5:.m=.o}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
72
3571
cfb56cc47f9f append rpath on linking audacious when prefix is specified.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3538
diff changeset
73 ifneq ($(strip $(prefix)),)
cfb56cc47f9f append rpath on linking audacious when prefix is specified.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3538
diff changeset
74 RPATH = -Wl,-rpath=${libdir}
cfb56cc47f9f append rpath on linking audacious when prefix is specified.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3538
diff changeset
75 endif
cfb56cc47f9f append rpath on linking audacious when prefix is specified.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3538
diff changeset
76
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
77 .SILENT:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
78 .SUFFIXES: .beam .c .cc .cxx .d .erl .m
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
79 .PHONY: all subdirs depend install uninstall clean distclean
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
80
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
81 all: subdirs depend ${OBJS} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
82
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
83 subdirs:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
84 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
85 ${DIR_ENTER}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
86 ${MAKE} || exit 1; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
87 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
88 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
89
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
90 depend-hook:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
91
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
92 depend: depend-hook
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
93 regen=0; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
94 for i in ${SRCS}; do [ $$i -nt .deps ] && regen=1; done; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
95 if [ $$regen = 1 ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
96 rm -f .deps; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
97 for i in ${SRCS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
98 case $${i##*.} in \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
99 c|cc|cxx|m) \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
100 ${CPP} ${CPPFLAGS} -M $$i >>.deps; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
101 esac; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
102 done; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
103 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
104
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
105 ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
106 ${LINK_STATUS}
3571
cfb56cc47f9f append rpath on linking audacious when prefix is specified.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3538
diff changeset
107 if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS} ${RPATH}; then \
3535
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
108 ${LINK_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
109 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
110 ${LINK_FAILED}; \
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
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
113 ${LIB} ${LIB_NOINST}: ${EXT_DEPS} ${OBJS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
114 ${LINK_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
115 if ${LD} -o $@ ${OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
116 ${LINK_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
117 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
118 ${LINK_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
119 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
120
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
121 ${PLUGIN} ${PLUGIN_NONST}: ${EXT_DEPS} ${OBJS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
122 ${LINK_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
123 if ${LD} -o $@ ${OBJS} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
124 ${LINK_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
125 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
126 ${LINK_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
127 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
128
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
129 ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
130 ${LINK_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
131 if ${AR} cq $@ ${OBJS}; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
132 ${LINK_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
133 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
134 ${LINK_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
135 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
136
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
137 ${EXT_DEPS}: subdirs
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
138
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
139 .c.o:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
140 ${COMPILE_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
141 if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
142 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
143 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
144 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
145 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
146
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
147 .cc.o .cxx.o:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
148 ${COMPILE_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
149 if ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
150 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
151 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
152 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
153 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
154
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
155 .d.o:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
156 ${COMPILE_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
157 if test x"$(basename ${DC})" = x"dmd"; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
158 if ${DC} ${DFLAGS} -c -of$@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
159 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
160 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
161 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
162 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
163 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
164 if ${DC} ${DFLAGS} -c -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
165 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
166 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
167 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
168 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
169 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
170
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
171 .erl.beam:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
172 ${COMPILE_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
173 if ${ERLC} ${ERLCFLAGS} -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
174 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
175 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
176 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
177 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
178
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
179 .m.o:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
180 ${COMPILE_STATUS}
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
181 if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
182 ${COMPILE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
183 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
184 ${COMPILE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
185 fi
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
186
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
187 install: ${LIB} ${STATIC_LIB} ${PLUGIN} ${PROG} install-extra
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
188 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
189 ${DIR_ENTER}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
190 ${MAKE} install || exit 1; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
191 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
192 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
193
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
194 for i in ${LIB}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
195 ${INSTALL_STATUS}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
196 if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL_LIB}; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
197 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
198 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
199 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
200 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
201 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
202
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
203 for i in ${STATIC_LIB}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
204 ${INSTALL_STATUS}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
205 if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
206 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
207 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
208 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
209 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
210 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
211
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
212 for i in ${PLUGIN}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
213 ${INSTALL_STATUS}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
214 if ${MKDIR_P} ${DESTDIR}${libdir}/${plugindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/${plugindir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
215 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
216 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
217 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
218 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
219 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
220
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
221 for i in ${DATA}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
222 ${INSTALL_STATUS}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
223 if ${MKDIR_P} ${DESTDIR}${datadir} && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
224 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
225 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
226 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
227 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
228 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
229
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
230 for i in ${PROG}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
231 ${INSTALL_STATUS}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
232 if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 -s $$i ${DESTDIR}${bindir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
233 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
234 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
235 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
236 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
237 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
238
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
239 for i in ${INCLUDES}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
240 ${INSTALL_STATUS}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
241 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
242 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
243 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
244 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
245 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
246 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
247
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
248 for i in ${MAN}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
249 ${INSTALL_STATUS}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
250 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
251 ${INSTALL_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
252 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
253 ${INSTALL_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
254 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
255 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
256
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
257 install-extra:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
258
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
259 uninstall: uninstall-extra
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
260 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
261 ${DIR_ENTER}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
262 ${MAKE} uninstall || exit 1; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
263 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
264 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
265
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
266 for i in ${LIB}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
267 if [ -f ${DESTDIR}${libdir}/$$i ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
268 if ${UNINSTALL_LIB}; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
269 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
270 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
271 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
272 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
273 fi; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
274 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
275
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
276 for i in ${STATIC_LIB}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
277 if [ -f ${DESTDIR}${libdir}/$$i ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
278 if rm -f ${DESTDIR}${libdir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
279 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
280 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
281 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
282 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
283 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
284 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
285
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
286 for i in ${PLUGIN}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
287 if [ -f ${DESTDIR}${libdir}/${plugindir}/$$i ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
288 if rm -f ${DESTDIR}${libdir}/${plugindir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
289 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
290 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
291 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
292 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
293 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
294 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
295 -rmdir ${DESTDIR}${libdir}/${plugindir} >/dev/null 2>&1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
296
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
297 for i in ${DATA}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
298 if [ -f ${DESTDIR}${datadir}/${PACKAGE}/$$i ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
299 if rm -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
300 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
301 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
302 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
303 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
304 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
305 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
306
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
307 for i in ${PROG}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
308 if [ -f ${DESTDIR}${bindir}/$$i ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
309 if rm -f ${DESTDIR}${bindir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
310 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
311 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
312 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
313 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
314 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
315 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
316
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
317 for i in ${INCLUDES}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
318 if [ -f ${DESTDIR}${includedir}/${includesubdir}/$$i ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
319 if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
320 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
321 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
322 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
323 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
324 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
325 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
326 -rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
327
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
328 for i in ${MAN}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
329 if [ -f ${DESTDIR}${mandir}/${mansubdir}/$$i ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
330 if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
331 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
332 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
333 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
334 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
335 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
336 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
337
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
338 uninstall-extra:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
339
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
340 clean:
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
341 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
342 ${DIR_ENTER}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
343 ${MAKE} clean || exit 1; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
344 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
345 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
346
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
347 for i in ${OBJS} ${CLEAN} .deps *~; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
348 if [ -f $$i -o -d $$i ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
349 if rm -fr $$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
350 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
351 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
352 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
353 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
354 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
355 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
356
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
357 distclean: clean
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
358 for i in ${SUBDIRS}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
359 ${DIR_ENTER}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
360 ${MAKE} distclean || exit 1; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
361 ${DIR_LEAVE}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
362 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
363
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
364 for i in ${PROG} ${PROG_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${DISTCLEAN}; do \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
365 if [ -f $$i -o -d $$i ]; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
366 if rm -fr $$i; then \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
367 ${DELETE_OK}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
368 else \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
369 ${DELETE_FAILED}; \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
370 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
371 fi \
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
372 done
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
373
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
374 DIR_ENTER = printf "\033[0;36mEntering directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd $$i || exit 1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
375 DIR_LEAVE = printf "\033[0;36mLeaving directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd .. || exit 1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
376 LINK_STATUS = printf "\033[0;33mLinking \033[1;33m$@\033[0;33m...\033[0m\r"
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
377 LINK_OK = printf "\033[0;32mSuccessfully linked \033[1;32m$@\033[0;32m.\033[0m\n"
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
378 LINK_FAILED = printf "\033[0;31mFailed to link \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
379 COMPILE_STATUS = printf "\033[0;33mCompiling \033[1;33m$<\033[0;33m...\033[0m\r"
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
380 COMPILE_OK = printf "\033[0;32mSuccessfully compiled \033[1;32m$<\033[0;32m.\033[0m\n"
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
381 COMPILE_FAILED = printf "\033[0;31mFailed to compile \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
382 INSTALL_STATUS = printf "\033[0;33mInstalling \033[1;33m$$i\033[0;33m...\033[0m\r"
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
383 INSTALL_OK = printf "\033[0;32mSuccessfully installed \033[1;32m$$i\033[0;32m.\033[0m\n"
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
384 INSTALL_FAILED = printf "\033[0;31mFailed to install \033[1;31m$$i\033[0;31m!\033[0m\n"; exit 1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
385 DELETE_OK = printf "\033[0;34mDeleted \033[1;34m$$i\033[0;34m.\033[0m\n"
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
386 DELETE_FAILED = printf "\033[0;31mFailed to delete \033[1;31m$$i\033[0;31m!\033[0m\n"; exit 1
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
387
9ddf21ab5c84 Transit to Mk2.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
388 -include .deps