1# $OpenBSD: Makefile.inc,v 1.6 2021/05/17 13:13:27 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 11.if ! (make(clean) || make(cleandir) || make(obj)) 12 13PERL_REQUIRE != perl -Mstrict -Mwarnings -e ' \ 14 eval { require BSD::Socket::Splice } or print $@; \ 15 eval { require IO::Socket::INET6 } or print $@; \ 16 eval { require Socket6 } or print $@; \ 17' 18.if ! empty (PERL_REQUIRE) && ! defined (TARGETS) 19regress: 20 @echo "${PERL_REQUIRE}" 21 @echo Install these Perl modules for additional tests. 22 @echo SKIPPED 23.endif 24 25.endif 26 27# Fill out these variables if you want to test socket splicing with 28# the relay process running on a remote machine. You have to specify 29# a local and remote ip address for the tcp connections. To control 30# the remote machine you need a hostname for ssh to log in. All the 31# test files must be in the same directory local and remote. 32 33LOCAL_ADDR ?= 34REMOTE_ADDR ?= 35REMOTE_SSH ?= 36 37# Automatically generate regress targets from test cases in directory. 38 39.if ! defined (TARGETS) 40ARGS != cd ${.CURDIR} && ls args-*.pl 41TARGETS ?= ${ARGS} 42.endif 43REGRESS_TARGETS += ${TARGETS:S/^/run-/} 44CLEANFILES += *.log ktrace.out stamp-* 45 46# Set variables so that make runs with and without obj directory. 47# Only do that if necessary to keep visible output short. 48 49.if ${.CURDIR} == ${.OBJDIR} 50PERLINC = -I.. -I. 51PERLPATH = 52.else 53PERLINC = -I${.CURDIR}/.. 54PERLPATH = ${.CURDIR}/ 55.endif 56 57# make perl syntax check for all args files 58 59.PHONY: syntax 60 61syntax: stamp-syntax 62 63stamp-syntax: ${ARGS} 64.for a in ${ARGS} 65 @perl -c ${PERLPATH}$a 66.endfor 67 @date >$@ 68