xref: /unit/pkg/deb/Makefile (revision 1753)
1373Sdefan@nginx.com#!/usr/bin/make
2373Sdefan@nginx.com
3953Salexander.borisov@nginx.cominclude ../../version
4373Sdefan@nginx.com
5821Svbart@nginx.comDEFAULT_RELEASE := 1
6373Sdefan@nginx.com
7953Salexander.borisov@nginx.comVERSION ?= $(NXT_VERSION)
8373Sdefan@nginx.comRELEASE ?= $(DEFAULT_RELEASE)
9373Sdefan@nginx.com
10373Sdefan@nginx.comSRCDIR=	unit-$(VERSION)
11373Sdefan@nginx.com
12373Sdefan@nginx.comCODENAME = $(shell lsb_release -cs)
13373Sdefan@nginx.com
14778Sdefan@nginx.comBUILD_DEPENDS_unit = build-essential debhelper devscripts fakeroot libxml2-utils lintian lsb-release xsltproc libssl-dev
15489Sdefan@nginx.comBUILD_DEPENDS = $(BUILD_DEPENDS_unit)
16373Sdefan@nginx.com
17373Sdefan@nginx.comMODULES=
18373Sdefan@nginx.com
191694Sdefan@nginx.com# Ubuntu 20.10
201694Sdefan@nginx.comifeq ($(CODENAME),groovy)
211694Sdefan@nginx.cominclude Makefile.php
221694Sdefan@nginx.cominclude Makefile.python27
231694Sdefan@nginx.cominclude Makefile.python38
241694Sdefan@nginx.cominclude Makefile.go
251694Sdefan@nginx.cominclude Makefile.perl
261694Sdefan@nginx.cominclude Makefile.ruby
271694Sdefan@nginx.cominclude Makefile.jsc-common
281694Sdefan@nginx.cominclude Makefile.jsc11
291694Sdefan@nginx.cominclude Makefile.jsc13
301694Sdefan@nginx.cominclude Makefile.jsc14
311694Sdefan@nginx.cominclude Makefile.jsc15
321694Sdefan@nginx.comendif
331694Sdefan@nginx.com
341466Sdefan@nginx.com# Ubuntu 20.04
351466Sdefan@nginx.comifeq ($(CODENAME),focal)
361466Sdefan@nginx.cominclude Makefile.php
371466Sdefan@nginx.cominclude Makefile.python27
381466Sdefan@nginx.cominclude Makefile.python38
391466Sdefan@nginx.cominclude Makefile.go
401466Sdefan@nginx.cominclude Makefile.perl
411466Sdefan@nginx.cominclude Makefile.ruby
421466Sdefan@nginx.cominclude Makefile.jsc-common
431466Sdefan@nginx.cominclude Makefile.jsc11
441466Sdefan@nginx.comendif
451466Sdefan@nginx.com
461290Sdefan@nginx.com# Ubuntu 19.10
471290Sdefan@nginx.comifeq ($(CODENAME),eoan)
481290Sdefan@nginx.cominclude Makefile.php
491290Sdefan@nginx.cominclude Makefile.python27
501290Sdefan@nginx.cominclude Makefile.python37
511290Sdefan@nginx.cominclude Makefile.python38
521314Smax.romanov@nginx.cominclude Makefile.go
531290Sdefan@nginx.cominclude Makefile.perl
541290Sdefan@nginx.cominclude Makefile.ruby
551290Sdefan@nginx.cominclude Makefile.jsc-common
561290Sdefan@nginx.cominclude Makefile.jsc11
571290Sdefan@nginx.comendif
581290Sdefan@nginx.com
591040Sdefan@nginx.com# Ubuntu 19.04
601040Sdefan@nginx.comifeq ($(CODENAME),disco)
611040Sdefan@nginx.cominclude Makefile.php
621040Sdefan@nginx.cominclude Makefile.python27
631040Sdefan@nginx.cominclude Makefile.python37
641289Sdefan@nginx.cominclude Makefile.python38
651314Smax.romanov@nginx.cominclude Makefile.go
661040Sdefan@nginx.cominclude Makefile.perl
671040Sdefan@nginx.cominclude Makefile.ruby
681040Sdefan@nginx.cominclude Makefile.jsc-common
691040Sdefan@nginx.cominclude Makefile.jsc11
701040Sdefan@nginx.comendif
711040Sdefan@nginx.com
72902Sdefan@nginx.com# Ubuntu 18.10
73902Sdefan@nginx.comifeq ($(CODENAME),cosmic)
74902Sdefan@nginx.cominclude Makefile.php
75902Sdefan@nginx.cominclude Makefile.python27
76902Sdefan@nginx.cominclude Makefile.python36
77902Sdefan@nginx.cominclude Makefile.python37
781314Smax.romanov@nginx.cominclude Makefile.go
79902Sdefan@nginx.cominclude Makefile.perl
80902Sdefan@nginx.cominclude Makefile.ruby
81980Sdefan@nginx.cominclude Makefile.jsc-common
82980Sdefan@nginx.cominclude Makefile.jsc8
83980Sdefan@nginx.cominclude Makefile.jsc11
84902Sdefan@nginx.comendif
85902Sdefan@nginx.com
86672Sdefan@nginx.com# Ubuntu 18.04
87672Sdefan@nginx.comifeq ($(CODENAME),bionic)
88672Sdefan@nginx.cominclude Makefile.php
89672Sdefan@nginx.cominclude Makefile.python27
90672Sdefan@nginx.cominclude Makefile.python36
911074Sdefan@nginx.cominclude Makefile.python37
921289Sdefan@nginx.cominclude Makefile.python38
931314Smax.romanov@nginx.cominclude Makefile.go
94672Sdefan@nginx.cominclude Makefile.perl
95672Sdefan@nginx.cominclude Makefile.ruby
96980Sdefan@nginx.cominclude Makefile.jsc-common
97980Sdefan@nginx.cominclude Makefile.jsc8
981076Sdefan@nginx.cominclude Makefile.jsc11
99672Sdefan@nginx.comendif
100672Sdefan@nginx.com
101373Sdefan@nginx.com# Ubuntu 16.04
102373Sdefan@nginx.comifeq ($(CODENAME),xenial)
103373Sdefan@nginx.cominclude Makefile.php
104373Sdefan@nginx.cominclude Makefile.python27
105373Sdefan@nginx.cominclude Makefile.python35
106373Sdefan@nginx.cominclude Makefile.go
107524Sdefan@nginx.cominclude Makefile.perl
108600Sdefan@nginx.cominclude Makefile.ruby
109980Sdefan@nginx.cominclude Makefile.jsc-common
110980Sdefan@nginx.cominclude Makefile.jsc8
111373Sdefan@nginx.comendif
112373Sdefan@nginx.com
113373Sdefan@nginx.com# Ubuntu 14.04
114373Sdefan@nginx.comifeq ($(CODENAME),trusty)
115373Sdefan@nginx.cominclude Makefile.php
116373Sdefan@nginx.cominclude Makefile.python
117524Sdefan@nginx.cominclude Makefile.perl
118373Sdefan@nginx.comendif
119373Sdefan@nginx.com
1201094Sdefan@nginx.com# Debian 10
1211094Sdefan@nginx.comifeq ($(CODENAME),buster)
1221094Sdefan@nginx.cominclude Makefile.php
1231094Sdefan@nginx.cominclude Makefile.python27
1241094Sdefan@nginx.cominclude Makefile.python37
1251314Smax.romanov@nginx.cominclude Makefile.go
1261094Sdefan@nginx.cominclude Makefile.perl
1271094Sdefan@nginx.cominclude Makefile.ruby
1281094Sdefan@nginx.cominclude Makefile.jsc-common
1291094Sdefan@nginx.cominclude Makefile.jsc11
1301094Sdefan@nginx.comendif
1311094Sdefan@nginx.com
132373Sdefan@nginx.com# Debian 9
133373Sdefan@nginx.comifeq ($(CODENAME),stretch)
134373Sdefan@nginx.cominclude Makefile.php
135373Sdefan@nginx.cominclude Makefile.python27
136373Sdefan@nginx.cominclude Makefile.python35
1371314Smax.romanov@nginx.cominclude Makefile.go
138524Sdefan@nginx.cominclude Makefile.perl
139600Sdefan@nginx.cominclude Makefile.ruby
140980Sdefan@nginx.cominclude Makefile.jsc-common
141980Sdefan@nginx.cominclude Makefile.jsc8
142373Sdefan@nginx.comendif
143373Sdefan@nginx.com
144373Sdefan@nginx.com# Debian 8
145373Sdefan@nginx.comifeq ($(CODENAME),jessie)
146373Sdefan@nginx.cominclude Makefile.php
147373Sdefan@nginx.cominclude Makefile.python27
148440Sdefan@nginx.cominclude Makefile.python34
149524Sdefan@nginx.cominclude Makefile.perl
150600Sdefan@nginx.cominclude Makefile.ruby
151373Sdefan@nginx.comendif
152373Sdefan@nginx.com
153373Sdefan@nginx.comCONFIGURE_ARGS=\
154373Sdefan@nginx.com	--prefix=/usr \
155373Sdefan@nginx.com	--state=/var/lib/unit \
156373Sdefan@nginx.com	--control="unix:/var/run/control.unit.sock" \
157373Sdefan@nginx.com	--pid=/var/run/unit.pid \
158373Sdefan@nginx.com	--log=/var/log/unit.log \
1591403Smax.romanov@nginx.com	--tmp=/var/tmp \
160*1753Sdefan@nginx.com	--user=unit \
161*1753Sdefan@nginx.com	--group=unit \
162778Sdefan@nginx.com	--tests \
163778Sdefan@nginx.com	--openssl
164373Sdefan@nginx.com
165373Sdefan@nginx.comexport CR=\\n
166373Sdefan@nginx.com
167373Sdefan@nginx.comdefault:
168501Sdefan@nginx.com	@echo "valid targets: all modules unit $(addprefix unit-, $(MODULES)) test test-debug clean"
169373Sdefan@nginx.com
170559Sdefan@nginx.comall: check-build-depends-all unit modules
171373Sdefan@nginx.com
172373Sdefan@nginx.commodules: $(addprefix unit-, $(MODULES))
173373Sdefan@nginx.com
174559Sdefan@nginx.comcheck-build-depends-%:
175373Sdefan@nginx.com	@{ \
176559Sdefan@nginx.com	case "$*" in \
177559Sdefan@nginx.com		all) pkgs="$(BUILD_DEPENDS)" ;; \
178559Sdefan@nginx.com		unit) pkgs="$(BUILD_DEPENDS_unit)" ;; \
179559Sdefan@nginx.com		*) pkgs="$(BUILD_DEPENDS_unit) $(BUILD_DEPENDS_$*)" ;; \
180559Sdefan@nginx.com	esac ; \
181373Sdefan@nginx.com	not_installed= ; \
182559Sdefan@nginx.com	for pkg in $${pkgs}; do \
183373Sdefan@nginx.com		dpkg -s $${pkg} >/dev/null 2>&1 ; \
184373Sdefan@nginx.com		if [ $$? -ne 0 ]; then \
185373Sdefan@nginx.com			not_installed="$${not_installed} $${pkg}" ; \
186373Sdefan@nginx.com		fi ; \
187373Sdefan@nginx.com	done ; \
188373Sdefan@nginx.com	if test -n "$${not_installed}" ; then \
189373Sdefan@nginx.com		echo "" >&2 ; \
190373Sdefan@nginx.com		echo "The following packages are required in order to proceed:" >&2 ; \
191373Sdefan@nginx.com		echo "" >&2 ; \
192373Sdefan@nginx.com		echo $${not_installed} >&2 ; \
193373Sdefan@nginx.com		echo "" >&2 ; \
194373Sdefan@nginx.com		exit 1 ; \
195373Sdefan@nginx.com	fi \
196373Sdefan@nginx.com	}
197559Sdefan@nginx.com	touch $@
198489Sdefan@nginx.com
199373Sdefan@nginx.comdebuild/$(SRCDIR)/debian:
200373Sdefan@nginx.com	@{ \
201373Sdefan@nginx.com	set -e ; \
202373Sdefan@nginx.com	mkdir -p debuild/$(SRCDIR) ; \
203373Sdefan@nginx.com	cp -pr debian debuild/$(SRCDIR) ; \
204373Sdefan@nginx.com	echo '9' > debuild/$(SRCDIR)/debian/compat ; \
205373Sdefan@nginx.com	mkdir -p debuild/$(SRCDIR)/debian/source ; \
206373Sdefan@nginx.com	echo '3.0 (quilt)' > debuild/$(SRCDIR)/debian/source/format ; \
207373Sdefan@nginx.com        cat debian/rules.in | sed \
208373Sdefan@nginx.com                -e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS)#g" \
209373Sdefan@nginx.com        > debuild/$(SRCDIR)/debian/rules ; \
2101750Sdefan@nginx.com	chmod +x debuild/$(SRCDIR)/debian/rules ; \
211373Sdefan@nginx.com	}
212373Sdefan@nginx.com
213373Sdefan@nginx.comdebuild/$(SRCDIR)/debian/changelog: ../../docs/changes.xml | debuild/$(SRCDIR)/debian
214373Sdefan@nginx.com	cd ../../docs && make ../build/unit.deb-changelog
215373Sdefan@nginx.comifneq ($(DEFAULT_VERSION)$(DEFAULT_RELEASE), $(VERSION)$(RELEASE))
216373Sdefan@nginx.com	cat ../../build/unit.deb-changelog | sed \
217373Sdefan@nginx.com		-e "s/unit ($(DEFAULT_VERSION)-$(DEFAULT_RELEASE)~/unit ($(VERSION)-$(RELEASE)~/" \
218373Sdefan@nginx.com		-e "s#%%CODENAME%%#$(CODENAME)#g" \
219373Sdefan@nginx.com		> debuild/$(SRCDIR)/debian/changelog
220373Sdefan@nginx.comelse
221373Sdefan@nginx.com	cat ../../build/unit.deb-changelog | sed \
222373Sdefan@nginx.com		-e "s#%%CODENAME%%#$(CODENAME)#g" \
223373Sdefan@nginx.com		> debuild/$(SRCDIR)/debian/changelog
224373Sdefan@nginx.comendif
225373Sdefan@nginx.com
226373Sdefan@nginx.comdebuild/unit_$(VERSION).orig.tar.gz: | debuild/$(SRCDIR)/debian
227373Sdefan@nginx.com	cd ../.. && tar -czf pkg/deb/debuild/$(SRCDIR).tar.gz \
228373Sdefan@nginx.com		--transform "s#^#$(SRCDIR)/#" \
2291316Smax.romanov@nginx.com		LICENSE NOTICE CHANGES README configure auto src test version go
230373Sdefan@nginx.com	mv debuild/$(SRCDIR).tar.gz debuild/unit_$(VERSION).orig.tar.gz
231373Sdefan@nginx.com	cd debuild && tar zxf unit_$(VERSION).orig.tar.gz
232373Sdefan@nginx.com
233489Sdefan@nginx.comunit: check-build-depends-unit debuild/unit_$(VERSION).orig.tar.gz debuild/$(SRCDIR)/debian/changelog
234373Sdefan@nginx.com	@echo "===> Building $@ package"
235373Sdefan@nginx.com	cd debuild/$(SRCDIR) && debuild -us -uc
236373Sdefan@nginx.com	mkdir -p debs
237373Sdefan@nginx.com	find debuild/ -maxdepth 1 -type f -exec cp {} debs/ \;
238373Sdefan@nginx.com	ln -s debuild/$(SRCDIR)/build $@
239373Sdefan@nginx.com
240373Sdefan@nginx.comdebuild-%: debuild/unit_$(VERSION).orig.tar.gz ../../docs/changes.xml
241373Sdefan@nginx.com	mkdir $@
242373Sdefan@nginx.com	cp debuild/unit_$(VERSION).orig.tar.gz debuild-$*/unit-$(MODULE_SUFFIX_$*)_$(VERSION).orig.tar.gz
243373Sdefan@nginx.com	cd $@ && tar zxf unit-$(MODULE_SUFFIX_$*)_$(VERSION).orig.tar.gz
244373Sdefan@nginx.com	mkdir $@/$(SRCDIR)/debian
245373Sdefan@nginx.com	echo '9' > $@/$(SRCDIR)/debian/compat
246373Sdefan@nginx.com	mkdir $@/$(SRCDIR)/debian/source
247373Sdefan@nginx.com	echo '3.0 (quilt)' > $@/$(SRCDIR)/debian/source/format
248373Sdefan@nginx.com	cd ../../docs && make ../build/unit-$(MODULE_SUFFIX_$*).deb-changelog
249525Sdefan@nginx.comifneq ($(DEFAULT_VERSION)$(DEFAULT_RELEASE), $(VERSION)$(RELEASE))
250525Sdefan@nginx.com	cat ../../build/unit-$(MODULE_SUFFIX_$*).deb-changelog | sed \
251525Sdefan@nginx.com		-e "s/unit-$* ($(DEFAULT_VERSION)-$(DEFAULT_RELEASE)~/unit-$* ($(VERSION)-$(RELEASE)~/" \
252525Sdefan@nginx.com		-e "s#%%CODENAME%%#$(CODENAME)#g" \
253525Sdefan@nginx.com		> $@/$(SRCDIR)/debian/changelog
254525Sdefan@nginx.comelse
255373Sdefan@nginx.com	cat ../../build/unit-$(MODULE_SUFFIX_$*).deb-changelog | sed \
256373Sdefan@nginx.com		-e "s#%%CODENAME%%#$(CODENAME)#g" \
257373Sdefan@nginx.com		> $@/$(SRCDIR)/debian/changelog
258525Sdefan@nginx.comendif
259980Sdefan@nginx.com	if [ -f debian.module/copyright.unit-$(MODULE_SUFFIX_$*) ]; then \
260980Sdefan@nginx.com		cp debian.module/copyright.unit-$(MODULE_SUFFIX_$*) debuild-$*/$(SRCDIR)/debian/copyright ; \
261980Sdefan@nginx.com	else \
262980Sdefan@nginx.com		cp debian/copyright debuild-$*/$(SRCDIR)/debian/ ; \
263980Sdefan@nginx.com	fi
264373Sdefan@nginx.com	@{ \
265399Smax.romanov@nginx.com	set -e ; \
266373Sdefan@nginx.com	for src in $(MODULE_SOURCES_$*); do \
267373Sdefan@nginx.com		cp debian.module/$${src} $@/$(SRCDIR)/debian/ ; \
268373Sdefan@nginx.com	done ; \
269373Sdefan@nginx.com	definitions=`echo "$$MODULE_DEFINITIONS_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \
270373Sdefan@nginx.com	prebuild=`echo "$$MODULE_PREBUILD_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \
271373Sdefan@nginx.com	preinstall=`echo "$$MODULE_PREINSTALL_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \
272980Sdefan@nginx.com	postinstall=`echo "$$MODULE_POSTINSTALL_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \
273373Sdefan@nginx.com	post=`echo "$$MODULE_POST_$*" | sed -e ':a' -e 'N' -e '$$!ba' -e "s/\n/\$$CR/g"` ; \
274980Sdefan@nginx.com	cat debian.module/$(if $(MODULE_NOARCH_$*),control-noarch.in,control.in) | sed \
275373Sdefan@nginx.com                -e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \
276373Sdefan@nginx.com                -e "s#%%SUMMARY%%#$(MODULE_SUMMARY_$*)#g" \
277373Sdefan@nginx.com                -e "s#%%CODENAME%%#$(CODENAME)#g" \
278373Sdefan@nginx.com                -e "s#%%UNIT_VERSION%%#$(VERSION)#g" \
279373Sdefan@nginx.com                -e "s#%%UNIT_RELEASE%%#$(RELEASE)#g" \
280373Sdefan@nginx.com                -e "s#%%VERSION%%#$(MODULE_VERSION_$*)#g" \
281373Sdefan@nginx.com                -e "s#%%RELEASE%%#$(MODULE_RELEASE_$*)#g" \
282373Sdefan@nginx.com                -e "s#%%MODULE_BUILD_DEPENDS%%#$(MODULE_BUILD_DEPENDS_$*)#g" \
283373Sdefan@nginx.com                -e "s#%%MODULE_DEPENDS%%#$(MODULE_DEPENDS_$*)#g" \
284373Sdefan@nginx.com        > $@/$(SRCDIR)/debian/control ; \
285980Sdefan@nginx.com        cat debian.module/$(if $(MODULE_NOARCH_$*),rules-noarch.in,rules.in) | sed \
286373Sdefan@nginx.com                -e "s#%%NAME%%#unit-$(MODULE_SUFFIX_$*)#g" \
287373Sdefan@nginx.com                -e "s#%%CODENAME%%#$(CODENAME)#g" \
288373Sdefan@nginx.com                -e "s#%%UNIT_VERSION%%#$(VERSION)#g" \
289373Sdefan@nginx.com                -e "s#%%UNIT_RELEASE%%#$(RELEASE)#g" \
290373Sdefan@nginx.com                -e "s#%%CONFIGURE_ARGS%%#$(CONFIGURE_ARGS)#g" \
291373Sdefan@nginx.com                -e "s#%%MODULE_CONFARGS%%#$(MODULE_CONFARGS_$*)#g" \
292373Sdefan@nginx.com                -e "s#%%MODULE_MAKEARGS%%#$(MODULE_MAKEARGS_$*)#g" \
293373Sdefan@nginx.com                -e "s#%%MODULE_INSTARGS%%#$(MODULE_INSTARGS_$*)#g" \
294373Sdefan@nginx.com                -e "s#%%MODULE_DEFINITIONS%%#$${definitions}#g" \
295373Sdefan@nginx.com                -e "s#%%MODULE_PREBUILD%%#$${prebuild}#g" \
296373Sdefan@nginx.com                -e "s#%%MODULE_PREINSTALL%%#$${preinstall}#g" \
297980Sdefan@nginx.com                -e "s#%%MODULE_POSTINSTALL%%#$${postinstall}#g" \
298373Sdefan@nginx.com        > $@/$(SRCDIR)/debian/rules ; \
299373Sdefan@nginx.com        cat debian.module/preinst.in | sed \
300373Sdefan@nginx.com                -e "s#%%MODULE_POST%%#$$post#g" \
301373Sdefan@nginx.com        > $@/$(SRCDIR)/debian/preinst ; \
302373Sdefan@nginx.com        chmod +x $@/$(SRCDIR)/debian/rules ; \
303373Sdefan@nginx.com	}
304373Sdefan@nginx.com
305489Sdefan@nginx.comunit-%: check-build-depends-% | debuild-%
306373Sdefan@nginx.com	@echo "===> Building $@ package"
307373Sdefan@nginx.com	cd debuild-$*/$(SRCDIR) && debuild -us -uc
308373Sdefan@nginx.com	mkdir -p debs
309373Sdefan@nginx.com	find debuild-$*/ -maxdepth 1 -type f -exec cp {} debs/ \;
310373Sdefan@nginx.com	ln -s debuild-$*/$(SRCDIR)/build $@
311373Sdefan@nginx.com
312501Sdefan@nginx.comtest: unit modules
313501Sdefan@nginx.com	@{ \
314980Sdefan@nginx.com	for so in `find debuild-*/unit-$(VERSION)/debian/build-unit/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \
315501Sdefan@nginx.com		soname=`basename $${so}` ; \
316980Sdefan@nginx.com		test "$${soname}" = "java.unit.so" && continue ; \
317501Sdefan@nginx.com		test -h debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} || \
318501Sdefan@nginx.com		ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit/build/$${soname} ; \
319501Sdefan@nginx.com	done ; \
3201748Sdefan@nginx.com	( cd debuild/unit-$(VERSION)/debian/build-unit && env python3 -m pytest $(PYTEST_ARGS) ) ; \
321501Sdefan@nginx.com	}
322501Sdefan@nginx.com
323501Sdefan@nginx.comtest-debug: unit modules
324501Sdefan@nginx.com	@{ \
325980Sdefan@nginx.com	for so in `find debuild-*/unit-$(VERSION)/debian/build-unit-debug/ -type f \( -name "*.so" -o -name "*.jar" \)`; do \
326501Sdefan@nginx.com		soname=`basename $${so}` ; \
327980Sdefan@nginx.com		test "$${soname}" = "java.unit.so" && continue ; \
328501Sdefan@nginx.com		test -h debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} || \
329501Sdefan@nginx.com		ln -fs `pwd`/$${so} debuild/unit-$(VERSION)/debian/build-unit-debug/build/$${soname} ; \
330501Sdefan@nginx.com	done ; \
3311748Sdefan@nginx.com	( cd debuild/unit-$(VERSION)/debian/build-unit-debug && env python3 -m pytest $(PYTEST_ARGS) ) ; \
332501Sdefan@nginx.com	}
333501Sdefan@nginx.com
334373Sdefan@nginx.comclean:
335373Sdefan@nginx.com	rm -rf debuild debuild-* debs ../../build
336559Sdefan@nginx.com	rm -f check-build-depends-*
337373Sdefan@nginx.com	find . -maxdepth 1 -type l -delete
338373Sdefan@nginx.com
339559Sdefan@nginx.com.PHONY: default all modules test test-debug clean
340373Sdefan@nginx.com
341559Sdefan@nginx.com.SECONDARY: $(addprefix check-build-depends-, $(MODULES)) $(addprefix debuild-, $(MODULES))
342