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