annotate buildsys.mk.in @ 2284:d19b53359b24

cleaned up the sndfile wav plugin, currently limiting it ONLY TO WAV PLAYBACK. if somebody is more experienced with it and wants to restore the other formats, go ahead (maybe change the name of the plugin too?).
author mf0102 <0102@gmx.at>
date Wed, 09 Jan 2008 15:41:22 +0100
parents 5b5c450a6a37
children 3799c5a932a9
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 #
2147
e49d9b0ee308 Change my mail.
Jonathan Schleifer <js@h3c.de>
parents: 2034
diff changeset
2 # Copyright (c) 2007, Jonathan Schleifer <js-buildsys@webkeks.org>
1763
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@
1909
81b524aa7fcd implib.
Jonathan Schleifer <js@h3c.de>
parents: 1902
diff changeset
38 PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@
81b524aa7fcd implib.
Jonathan Schleifer <js@h3c.de>
parents: 1902
diff changeset
39 PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@
1879
81cdc01db60e Update buildsys (adds ${PROG_SUFFIX}).
Jonathan Schleifer <js@h3c.de>
parents: 1877
diff changeset
40 PROG_SUFFIX = @EXEEXT@
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
41 LIB_CPPFLAGS = @LIB_CPPFLAGS@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
42 LIB_CFLAGS = @LIB_CFLAGS@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
43 LIB_LDFLAGS = @LIB_LDFLAGS@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
44 LIB_PREFIX = @LIB_PREFIX@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
45 LIB_SUFFIX = @LIB_SUFFIX@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
46 PLUGIN_CPPFLAGS = @PLUGIN_CPPFLAGS@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
47 PLUGIN_CFLAGS = @PLUGIN_CFLAGS@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
48 PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
49 PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
50 INSTALL_LIB = @INSTALL_LIB@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
51 UNINSTALL_LIB = @UNINSTALL_LIB@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
52 CLEAN_LIB = @CLEAN_LIB@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
53 LN_S = @LN_S@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
54 MKDIR_P = mkdir -p
1863
0e92506c1805 install-sh doesn't work.
Jonathan Schleifer <js@h3c.de>
parents: 1845
diff changeset
55 INSTALL = install
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
56 SHELL = @SHELL@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
57 prefix = @prefix@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
58 exec_prefix = @exec_prefix@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
59 bindir = @bindir@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
60 libdir = @libdir@
2034
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
61 plugindir ?= ${libdir}/${PACKAGE}
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
62 datarootdir = @datarootdir@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
63 datadir = @datadir@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
64 includedir = @includedir@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
65 includesubdir ?= ${PACKAGE}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
66 mandir = @mandir@
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
67 mansubdir ?= man1
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
68
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
69 OBJS1 = ${SRCS:.c=.o}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
70 OBJS2 = ${OBJS1:.cc=.o}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
71 OBJS3 = ${OBJS2:.cxx=.o}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
72 OBJS4 = ${OBJS3:.d=.o}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
73 OBJS5 = ${OBJS4:.erl=.beam}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
74 OBJS += ${OBJS5:.m=.o}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
75
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
76 .SILENT:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
77 .SUFFIXES: .beam .c .cc .cxx .d .erl .m
1909
81b524aa7fcd implib.
Jonathan Schleifer <js@h3c.de>
parents: 1902
diff changeset
78 .PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
79
1826
d7709de0882c Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents: 1815
diff changeset
80 all:
1868
00738dd0dce6 Oops. Fix parallel build.
Jonathan Schleifer <js@h3c.de>
parents: 1866
diff changeset
81 for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \
1845
eaa979be9b89 Abort on error.
Jonathan Schleifer <js@h3c.de>
parents: 1836
diff changeset
82 ${MAKE} ${MFLAGS} $$i || exit 1; \
1826
d7709de0882c Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents: 1815
diff changeset
83 done
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
84
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
85 subdirs:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
86 for i in ${SUBDIRS}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
87 ${DIR_ENTER}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
88 ${MAKE} ${MFLAGS} || exit 1; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
89 ${DIR_LEAVE}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
90 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
91
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
92 depend: pre-depend ${SRCS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
93 regen=0; \
2034
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
94 test -f .deps || regen=1; \
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
95 for i in ${SRCS}; do test $$i -nt .deps && regen=1; done; \
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
96 if test x"$$regen" = x"1"; then \
1881
8bdede3414cd Optimize dependency generation.
Jonathan Schleifer <js@h3c.de>
parents: 1879
diff changeset
97 list=""; \
1815
b7d43348245d Add depend status.
Jonathan Schleifer <js@h3c.de>
parents: 1763
diff changeset
98 ${DEPEND_STATUS}; \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
99 for i in ${SRCS}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
100 case $${i##*.} in \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
101 c|cc|cxx|m) \
1881
8bdede3414cd Optimize dependency generation.
Jonathan Schleifer <js@h3c.de>
parents: 1879
diff changeset
102 list="$$list $$i"; \
1826
d7709de0882c Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents: 1815
diff changeset
103 ;; \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
104 esac; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
105 done; \
1909
81b524aa7fcd implib.
Jonathan Schleifer <js@h3c.de>
parents: 1902
diff changeset
106 if test x"$$list" != "x"; then \
2105
f8dc3d94186d Use ${CC} -M, not ${CPP} -M, as cpp is not required to respect -M, but gcc will always handle -M properly.
William Pitcock <nenolod@atheme.org>
parents: 2034
diff changeset
107 if ${CC} ${CPPFLAGS} -M $$list >.deps; then \
1909
81b524aa7fcd implib.
Jonathan Schleifer <js@h3c.de>
parents: 1902
diff changeset
108 ${DEPEND_OK}; \
81b524aa7fcd implib.
Jonathan Schleifer <js@h3c.de>
parents: 1902
diff changeset
109 else \
81b524aa7fcd implib.
Jonathan Schleifer <js@h3c.de>
parents: 1902
diff changeset
110 ${DEPEND_FAILED}; \
81b524aa7fcd implib.
Jonathan Schleifer <js@h3c.de>
parents: 1902
diff changeset
111 fi; \
1826
d7709de0882c Fix dependencies and other parallel stuff.
Jonathan Schleifer <js@h3c.de>
parents: 1815
diff changeset
112 fi; \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
113 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
114
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
115 pre-depend:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
116
1815
b7d43348245d Add depend status.
Jonathan Schleifer <js@h3c.de>
parents: 1763
diff changeset
117 ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS}
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
118 ${LINK_STATUS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
119 if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
120 ${LINK_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
121 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
122 ${LINK_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
123 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
124
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
125 ${LIB} ${LIB_NOINST}: ${EXT_DEPS} ${OBJS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
126 ${LINK_STATUS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
127 if ${LD} -o $@ ${OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
128 ${LINK_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
129 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
130 ${LINK_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
131 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
132
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
133 ${PLUGIN} ${PLUGIN_NONST}: ${EXT_DEPS} ${OBJS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
134 ${LINK_STATUS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
135 if ${LD} -o $@ ${OBJS} ${PLUGIN_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
136 ${LINK_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
137 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
138 ${LINK_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
139 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
140
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
141 ${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
142 ${LINK_STATUS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
143 if ${AR} cr $@ ${OBJS}; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
144 ${LINK_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
145 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
146 ${LINK_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
147 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
148
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
149 .c.o:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
150 ${COMPILE_STATUS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
151 if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
152 ${COMPILE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
153 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
154 ${COMPILE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
155 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
156
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
157 .cc.o .cxx.o:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
158 ${COMPILE_STATUS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
159 if ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
160 ${COMPILE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
161 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
162 ${COMPILE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
163 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
164
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
165 .d.o:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
166 ${COMPILE_STATUS}
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
167 if test x"$(basename ${DC})" = x"dmd"; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
168 if ${DC} ${DFLAGS} -c -of$@ $<; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
169 ${COMPILE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
170 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
171 ${COMPILE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
172 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
173 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
174 if ${DC} ${DFLAGS} -c -o $@ $<; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
175 ${COMPILE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
176 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
177 ${COMPILE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
178 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
179 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
180
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
181 .erl.beam:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
182 ${COMPILE_STATUS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
183 if ${ERLC} ${ERLCFLAGS} -o $@ $<; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
184 ${COMPILE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
185 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
186 ${COMPILE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
187 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
188
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
189 .m.o:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
190 ${COMPILE_STATUS}
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
191 if ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
192 ${COMPILE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
193 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
194 ${COMPILE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
195 fi
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
196
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
197 install: ${LIB} ${STATIC_LIB} ${PLUGIN} ${PROG} install-extra
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
198 for i in ${SUBDIRS}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
199 ${DIR_ENTER}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
200 ${MAKE} ${MFLAGS} install || exit 1; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
201 ${DIR_LEAVE}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
202 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
203
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
204 for i in ${LIB}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
205 ${INSTALL_STATUS}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
206 if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL_LIB}; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
207 ${INSTALL_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
208 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
209 ${INSTALL_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
210 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
211 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
212
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
213 for i in ${STATIC_LIB}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
214 ${INSTALL_STATUS}; \
1909
81b524aa7fcd implib.
Jonathan Schleifer <js@h3c.de>
parents: 1902
diff changeset
215 if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
216 ${INSTALL_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
217 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
218 ${INSTALL_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
219 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
220 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
221
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
222 for i in ${PLUGIN}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
223 ${INSTALL_STATUS}; \
2006
a56a26a5f233 Revised the plugindir logic.
Eugene Paskevich <eugene@raptor.kiev.ua>
parents: 2003
diff changeset
224 if ${MKDIR_P} ${DESTDIR}${plugindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${plugindir}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
225 ${INSTALL_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
226 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
227 ${INSTALL_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
228 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
229 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
230
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
231 for i in ${DATA}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
232 ${INSTALL_STATUS}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
233 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
234 ${INSTALL_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
235 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
236 ${INSTALL_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
237 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
238 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
239
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
240 for i in ${PROG}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
241 ${INSTALL_STATUS}; \
1877
28d360594d3a Update buildsys.
Jonathan Schleifer <js@h3c.de>
parents: 1868
diff changeset
242 if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
243 ${INSTALL_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
244 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
245 ${INSTALL_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
246 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
247 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
248
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
249 for i in ${INCLUDES}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
250 ${INSTALL_STATUS}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
251 if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
252 ${INSTALL_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
253 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
254 ${INSTALL_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
255 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
256 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
257
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
258 for i in ${MAN}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
259 ${INSTALL_STATUS}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
260 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
261 ${INSTALL_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
262 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
263 ${INSTALL_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
264 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
265 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
266
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
267 install-extra:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
268
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
269 uninstall: uninstall-extra
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
270 for i in ${SUBDIRS}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
271 ${DIR_ENTER}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
272 ${MAKE} ${MFLAGS} uninstall || exit 1; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
273 ${DIR_LEAVE}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
274 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
275
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
276 for i in ${LIB}; do \
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
277 if test -f ${DESTDIR}${libdir}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
278 if ${UNINSTALL_LIB}; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
279 ${DELETE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
280 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
281 ${DELETE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
282 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
283 fi; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
284 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
285
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
286 for i in ${STATIC_LIB}; do \
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
287 if test -f ${DESTDIR}${libdir}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
288 if rm -f ${DESTDIR}${libdir}/$$i; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
289 ${DELETE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
290 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
291 ${DELETE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
292 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
293 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
294 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
295
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
296 for i in ${PLUGIN}; do \
2006
a56a26a5f233 Revised the plugindir logic.
Eugene Paskevich <eugene@raptor.kiev.ua>
parents: 2003
diff changeset
297 if test -f ${DESTDIR}${plugindir}/$$i; then \
a56a26a5f233 Revised the plugindir logic.
Eugene Paskevich <eugene@raptor.kiev.ua>
parents: 2003
diff changeset
298 if rm -f ${DESTDIR}${plugindir}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
299 ${DELETE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
300 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
301 ${DELETE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
302 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
303 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
304 done
2034
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
305 -rmdir ${DESTDIR}${plugindir} >/dev/null 2>&1
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
306
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
307 for i in ${DATA}; do \
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
308 if test -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
309 if rm -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
310 ${DELETE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
311 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
312 ${DELETE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
313 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
314 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
315 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
316
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
317 for i in ${PROG}; do \
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
318 if test -f ${DESTDIR}${bindir}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
319 if rm -f ${DESTDIR}${bindir}/$$i; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
320 ${DELETE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
321 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
322 ${DELETE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
323 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
324 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
325 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
326
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
327 for i in ${INCLUDES}; do \
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
328 if test -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
329 if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
330 ${DELETE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
331 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
332 ${DELETE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
333 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
334 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
335 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
336 -rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
337
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
338 for i in ${MAN}; do \
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
339 if test -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
340 if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
341 ${DELETE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
342 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
343 ${DELETE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
344 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
345 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
346 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
347
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
348 uninstall-extra:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
349
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
350 clean:
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
351 for i in ${SUBDIRS}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
352 ${DIR_ENTER}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
353 ${MAKE} ${MFLAGS} clean || exit 1; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
354 ${DIR_LEAVE}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
355 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
356
2034
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
357 for i in ${OBJS} ${CLEAN} ${CLEAN_LIB} .deps; do \
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
358 if test -f $$i -o -d $$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
359 if rm -fr $$i; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
360 ${DELETE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
361 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
362 ${DELETE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
363 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
364 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
365 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
366
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
367 distclean: clean
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
368 for i in ${SUBDIRS}; do \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
369 ${DIR_ENTER}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
370 ${MAKE} ${MFLAGS} distclean || exit 1; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
371 ${DIR_LEAVE}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
372 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
373
1973
f86cb7fc1d4f Add -pipe -Wall if gcc and fix a few warnings.
Jonathan Schleifer <js@h3c.de>
parents: 1918
diff changeset
374 for i in ${PROG} ${PROG_NOINST} ${LIB} ${LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${DISTCLEAN} *~; do \
1865
176c29f85678 Use test instead of [ ].
Jonathan Schleifer <js@h3c.de>
parents: 1863
diff changeset
375 if test -f $$i -o -d $$i; then \
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
376 if rm -fr $$i; then \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
377 ${DELETE_OK}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
378 else \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
379 ${DELETE_FAILED}; \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
380 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
381 fi \
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
382 done
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
383
2034
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
384 DIR_ENTER = printf "\033[K\033[0;36mEntering directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd $$i || exit 1
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
385 DIR_LEAVE = printf "\033[K\033[0;36mLeaving directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd .. || exit 1
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
386 DEPEND_STATUS = printf "\033[K\033[0;33mGenerating dependencies...\033[0m\r"
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
387 DEPEND_OK = printf "\033[K\033[0;32mSuccessfully generated dependencies.\033[0m\n"
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
388 DEPEND_FAILED = printf "\033[K\033[0;31mFailed to generate dependencies!\033[0m\n"; exit 1
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
389 COMPILE_STATUS = printf "\033[K\033[0;33mCompiling \033[1;33m$<\033[0;33m...\033[0m\r"
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
390 COMPILE_OK = printf "\033[K\033[0;32mSuccessfully compiled \033[1;32m$<\033[0;32m.\033[0m\n"
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
391 COMPILE_FAILED = printf "\033[K\033[0;31mFailed to compile \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
392 LINK_STATUS = printf "\033[K\033[0;33mLinking \033[1;33m$@\033[0;33m...\033[0m\r"
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
393 LINK_OK = printf "\033[K\033[0;32mSuccessfully linked \033[1;32m$@\033[0;32m.\033[0m\n"
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
394 LINK_FAILED = printf "\033[K\033[0;31mFailed to link \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
395 INSTALL_STATUS = printf "\033[K\033[0;33mInstalling \033[1;33m$$i\033[0;33m...\033[0m\r"
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
396 INSTALL_OK = printf "\033[K\033[0;32mSuccessfully installed \033[1;32m$$i\033[0;32m.\033[0m\n"
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
397 INSTALL_FAILED = printf "\033[K\033[0;31mFailed to install \033[1;31m$$i\033[0;31m!\033[0m\n"; exit 1
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
398 DELETE_OK = printf "\033[K\033[0;34mDeleted \033[1;34m$$i\033[0;34m.\033[0m\n"
a21cc1e45080 Update buildsys. Please test.
Jonathan Schleifer <js@h3c.de>
parents: 2015
diff changeset
399 DELETE_FAILED = printf "\033[K\033[0;31mFailed to delete \033[1;31m$$i\033[0;31m!\033[0m\n"; exit 1
1763
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
400
a99495a865eb Import Mk2 core.
William Pitcock <nenolod@atheme.org>
parents:
diff changeset
401 -include .deps