1# $OpenBSD: Makefile.inc,v 1.3 2013/08/09 19:51:11 bluhm Exp $ 2 3# The following ports must be installed for the regression tests: 4# p5-BSD-Socket-Splice perl interface to OpenBSD socket splicing 5# p5-IO-Socket-INET6 object interface for AF_INET and AF_INET6 domain sockets 6# p5-Socket6 Perl defines relating to AF_INET6 sockets 7# 8# Check wether all required perl packages are installed. If some 9# are missing print a warning and skip the tests, but do not fail. 10 11PERL_REQUIRE != perl -Mstrict -Mwarnings -e ' \ 12 eval { require BSD::Socket::Splice } or print $@; \ 13 eval { require IO::Socket::INET6 } or print $@; \ 14 eval { require Socket6 } or print $@; \ 15' 16.if ! empty (PERL_REQUIRE) && ! defined (TARGETS) 17regress: 18 @echo "${PERL_REQUIRE}" 19 @echo install these perl packages for additional tests 20.endif 21 22# Fill out these variables if you want to test socket splicing with 23# the relay process running on a remote machine. You have to specify 24# a local and remote ip address for the tcp connections. To control 25# the remote machine you need a hostname for ssh to log in. All the 26# test files must be in the same directory local and remote. 27 28LOCAL_ADDR ?= 29REMOTE_ADDR ?= 30REMOTE_SSH ?= 31 32# Automatically generate regress targets from test cases in directory. 33 34.if ! defined (TARGETS) 35ARGS != cd ${.CURDIR} && ls args-*.pl 36TARGETS ?= ${ARGS} 37.endif 38REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/} 39CLEANFILES += *.log ktrace.out stamp-* 40 41# Set variables so that make runs with and without obj directory. 42# Only do that if necessary to keep visible output short. 43 44.if ${.CURDIR} == ${.OBJDIR} 45PERLINC = -I.. 46PERLPATH = 47.else 48PERLINC = -I${.CURDIR}/.. 49PERLPATH = ${.CURDIR}/ 50.endif 51 52# make perl syntax check for all args files 53 54.PHONY: syntax 55 56syntax: stamp-syntax 57 58stamp-syntax: ${ARGS} 59.for a in ${ARGS} 60 @perl -c ${PERLPATH}$a 61.endfor 62 @date >$@ 63