From 1c411ca96d5210baac780f876c0eb5dbd4d2dcb6 Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Thu, 13 Jun 2002 18:20:40 +0000 Subject: [PATCH] Add ${REINPLACE_CMD}, which will be used to get rid of depencency on perl in current. Use it like the following: ${REINPLACE_CMD} -e "foo" -e "bar" ${WRKSRC}/somefile Approved by: portmgr --- Mk/bsd.port.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index bd8676c091f4..7b466115e154 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -623,6 +623,13 @@ OSVERSION!= /usr/sbin/sysctl -n kern.osreldate .endif .endif +# Special macro for doing in-place file editing using regexps +.if ${OSVERSION} <= 500033 +REINPLACE_CMD?= ${PERL} -p -i.bak +.else +REINPLACE_CMD?= ${SED} -i.bak +.endif + # Get the object format. .if !defined(PORTOBJFORMAT) PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout