diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-08-28 13:24:22 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-08-28 13:24:22 +0000 |
commit | e00c6618b182d516b14856b2101f3b30f4f6ea84 (patch) | |
tree | 59e7e56f19b53adaa588f00bf54a28b4b2fa4513 | |
parent | 75a68c8a8d1381252db64db52c5263837c7d1fd2 (diff) |
Allow splice make regress to run with and without obj directory.
-rw-r--r-- | regress/sys/kern/splice/Makefile | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/regress/sys/kern/splice/Makefile b/regress/sys/kern/splice/Makefile index 579808ad19e..232fb0ed1c0 100644 --- a/regress/sys/kern/splice/Makefile +++ b/regress/sys/kern/splice/Makefile @@ -1,12 +1,12 @@ -# $OpenBSD: Makefile,v 1.2 2011/04/22 02:06:00 bluhm Exp $ +# $OpenBSD: Makefile,v 1.3 2011/08/28 13:24:21 bluhm Exp $ # The following ports must be installed for the regression tests: # p5-BSD-Socket-Splice perl interface to OpenBSD socket splicing # p5-IO-Socket-INET6 object interface for AF_INET and AF_INET6 domain sockets # p5-Socket6 Perl defines relating to AF_INET6 sockets -ERRS != ls error-*.pl -ARGS != ls args-*.pl +ERRS != cd ${.CURDIR} && ls error-*.pl +ARGS != cd ${.CURDIR} && ls args-*.pl TARGETS ?= ${ERRS} ${ARGS} REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/} CLEANFILES = *.log ktrace.out @@ -20,12 +20,23 @@ LOCAL_ADDR ?= REMOTE_ADDR ?= REMOTE_SSH ?= +# Set variables so that make runs with and without obj directory. +# Only do that if necessary to keep visible output short. + +.if ${.CURDIR} == ${.OBJDIR} +PERLINC = +PERLPATH = +.else +PERLINC = -I${.CURDIR} +PERLPATH = ${.CURDIR}/ +.endif + # The error tests try to splice unsuitable sockets and check the # kernel error code. .for e in ${ERRS} run-regress-$e: $e - time perl $e + time perl ${PERLINC} ${PERLPATH}$e .endfor # The arg tests take a perl hash with arguments controlling the @@ -39,14 +50,14 @@ run-regress-$e: $e .for a in ${ARGS} run-regress-$a: $a - time perl relay.pl copy $a - time perl relay.pl splice $a + time perl ${PERLINC} ${PERLPATH}relay.pl copy ${PERLPATH}$a + time perl ${PERLINC} ${PERLPATH}relay.pl splice ${PERLPATH}$a .if ! empty (REMOTE_SSH) - time perl remote.pl copy ${LOCAL_ADDR} ${REMOTE_ADDR} ${REMOTE_SSH} $a - time perl remote.pl splice ${LOCAL_ADDR} ${REMOTE_ADDR} ${REMOTE_SSH} $a + time perl ${PERLINC} ${PERLPATH}remote.pl copy ${LOCAL_ADDR} ${REMOTE_ADDR} ${REMOTE_SSH} ${PERLPATH}$a + time perl ${PERLINC} ${PERLPATH}remote.pl splice ${LOCAL_ADDR} ${REMOTE_ADDR} ${REMOTE_SSH} ${PERLPATH}$a .endif - time perl echo.pl copy $a - time perl echo.pl splice $a + time perl ${PERLINC} ${PERLPATH}echo.pl copy ${PERLPATH}$a + time perl ${PERLINC} ${PERLPATH}echo.pl splice ${PERLPATH}$a .endfor .include <bsd.regress.mk> |