buildsys  Diff

Differences From Artifact [4eb32fd7f2]:

To Artifact [454592c0b3]:


1

2

3
4
5
6
7
8
9
1
2

3
4
5
6
7
8
9
10

+
-
+







#
#  Copyright (c) 2007, 2008, 2009, 2010, 2011
#  Copyright (c) 2007 - 2009, Jonathan Schleifer <js@webkeks.org>
#  Jonathan Schleifer <js@webkeks.org>
#
#  https://webkeks.org/hg/buildsys/
#
#  Permission to use, copy, modify, and/or distribute this software for any
#  purpose with or without fee is hereby granted, provided that the above
#  copyright notice and this permission notice is present in all copies.
#
95
96
97
98
99
100
101
102
103
104



105
106
107
108
109
110
111
96
97
98
99
100
101
102



103
104
105
106
107
108
109
110
111
112







-
-
-
+
+
+








.SILENT:
.SUFFIXES:
.SUFFIXES: .beam .c .c.dep .cc .cc.dep .cxx .cxx.dep .d .erl .lib.o .mo .m .m.dep .mm .mm.dep .o .plugin.o .po .py .pyc .xpm .S .S.dep
.PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean locales

all:
	${MAKE} ${MFLAGS} subdirs || exit 1
	${MAKE} ${MFLAGS} depend || exit 1
	${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} locales || exit 1
	${MAKE} ${MFLAGS} subdirs
	${MAKE} ${MFLAGS} depend
	${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} locales

subdirs:
	for i in ${SUBDIRS}; do \
		${DIR_ENTER}; \
		${MAKE} ${MFLAGS} || exit 1; \
		${DIR_LEAVE}; \
	done
170
171
172
173
174
175
176
























177

178
179
180
181
182





183
184
185
186
187
188
189
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201

202
203
204
205
206

207
208
209
210
211
212
213
214
215
216
217
218







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+




-
+
+
+
+
+







		${LINK_OK}; \
	else \
		${LINK_FAILED}; \
	fi

${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS}
	${LINK_STATUS}
	rm -f $@
	objs=""; \
	ars=""; \
	for i in ${OBJS}; do \
		case $$i in \
			*.a) \
				ars="$$ars $$i" \
				;; \
			*.o) \
				objs="$$objs $$i" \
				;; \
		esac \
	done; \
	for i in $$ars; do \
		dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
		rm -fr $$dir; \
		mkdir -p $$dir; \
		cd $$dir; \
		ar x ../$$i; \
		for j in *.o; do \
			objs="$$objs $$dir/$$j"; \
		done; \
		cd ..; \
	done; \
	if ${AR} cr $@ ${OBJS} && ${RANLIB} $@; then \
	if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
		${LINK_OK}; \
	else \
		${LINK_FAILED}; \
		rm -f $@; \
	fi
	fi; \
	for i in $$ars; do \
		dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
		rm -fr $$dir; \
	done

locales: ${MO_FILES}

.c.o:
	${COMPILE_STATUS}
	if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \
		${COMPILE_OK}; \