xref: /openbsd-src/regress/gnu/usr.bin/perl/Makefile (revision 51a90f2d037ad603acf6f493c5cb3be8a13056c3)
1# $OpenBSD: Makefile,v 1.6 2025/01/28 13:12:48 anton Exp $
2
3.if ! (make(clean) || make(cleandir) || make(obj))
4NCPU !=		/sbin/sysctl -n hw.ncpuonline
5.endif
6
7REGRESS_SETUP_ONCE +=	build
8build:
9	# Makefile and Perl tree must exist in obj directory for testing.
10	${MAKE} -C ${BSDSRCDIR}/gnu/usr.bin/perl -f Makefile.bsd-wrapper obj
11	${MAKE} -C ${BSDSRCDIR}/gnu/usr.bin/perl -f Makefile.bsd-wrapper -j ${NCPU} all
12
13REGRESS_SETUP += permissions
14permissions:
15	# Permissions in CVS src tree are not as in the Perl distribution.
16	# Match expectations of cpan/Test-Harness/t/source_handler.t for
17	# cpan/Test-Harness/t/source_tests/source*.sh executalbe bits.
18	# Remove symlink and fix permissions of copy in obj directory.
19	# cpan/autodie/t/chmod.t and cpan/autodie/t/chown.t modify themself.
20	# Replace symlink.
21.for f in \
22    cpan/Test-Harness/t/source_tests/source.sh \
23    cpan/Test-Harness/t/source_tests/source_args.sh \
24    cpan/autodie/t/chmod.t \
25    cpan/autodie/t/chown.t
26	rm -f ${BSDOBJDIR}/gnu/usr.bin/perl/$f
27	cp ${BSDSRCDIR}/gnu/usr.bin/perl/$f ${BSDOBJDIR}/gnu/usr.bin/perl/$f
28	chmod +x ${BSDOBJDIR}/gnu/usr.bin/perl/$f
29.endfor
30
31REGRESS_TARGETS +=	test
32test:
33	${MAKE} -C ${BSDSRCDIR}/gnu/usr.bin/perl -f Makefile.bsd-wrapper test
34
35.include <bsd.regress.mk>
36