annotate buildsys.mk.in @ 1836:1adfd05736a5

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