From: afresh1 Date: Tue, 12 Apr 2022 02:54:51 +0000 (+0000) Subject: Improve test and clean targets X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e705afe4d9e0bbe3d6f58e043e75ddd3c85ecb0a;p=openbsd Improve test and clean targets They failed if there was nothing to clean. The test target now depends on the all target so we have something to run tests against. They still don't like to pass in-tree, but that is a separate issue. Noticed by deraadt@, suggestions and improvements from geunther@ and bluhm@ --- diff --git a/gnu/usr.bin/perl/Makefile.bsd-wrapper b/gnu/usr.bin/perl/Makefile.bsd-wrapper index 29d03fbd530..f0b44ceca00 100644 --- a/gnu/usr.bin/perl/Makefile.bsd-wrapper +++ b/gnu/usr.bin/perl/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.111 2020/07/01 00:08:06 afresh1 Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.112 2022/04/12 02:54:51 afresh1 Exp $ # # Build wrapper for Perl # @@ -21,17 +21,17 @@ config.sh: ${.CURDIR}/config.over ${.CURDIR}/hints/openbsd.sh depend: @: -test: - -@test -e Makefile && ${MAKE} test +test: all + ${MAKE} test clean: - -@test -e Makefile && ${MAKE} realclean + -@test ! -e Makefile || ${MAKE} realclean cleandir: -@if [ ${.CURDIR} != ${.OBJDIR} ]; then \ rm -rf *; \ else \ - test -e Makefile && ${MAKE} distclean; \ + test ! -e Makefile || ${MAKE} distclean; \ rm -f ${CLEANFILES}; \ fi cd ${.CURDIR} && ${MAKE} -f Makefile.bsd-wrapper1 cleandir