summaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2002-06-13 18:20:40 +0000
committersobomax <sobomax@FreeBSD.org>2002-06-13 18:20:40 +0000
commit04719aec803a7a8d3ddbd1063d70146ebdfac5b0 (patch)
treea52b6c43ae19fef4e97c91d73f7a1c37dca8fe15 /Mk
parenta1ed31883a0510f8408d919f958be48b044be8f8 (diff)
downloadFreeBSD-ports-04719aec803a7a8d3ddbd1063d70146ebdfac5b0.zip
FreeBSD-ports-04719aec803a7a8d3ddbd1063d70146ebdfac5b0.tar.gz
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
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index bd8676c..7b46611 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
OpenPOWER on IntegriCloud