summaryrefslogtreecommitdiffstats
path: root/share/mk/plain.test.mk
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2014-12-30 20:46:01 +0000
committerngie <ngie@FreeBSD.org>2014-12-30 20:46:01 +0000
commitb7c609250bb56ecd416c82894f0f4018f1d6af24 (patch)
tree42042f28b011e96398613ec882e9f145f1937485 /share/mk/plain.test.mk
parent28d09f6c088f73690fb82e3fb1941fe68615a610 (diff)
downloadFreeBSD-src-b7c609250bb56ecd416c82894f0f4018f1d6af24.zip
FreeBSD-src-b7c609250bb56ecd416c82894f0f4018f1d6af24.tar.gz
MFC r274077:
As an optimization (in simple, well used cases) only call cat ${.ALLSRC} when generating files from various sources instead of calling cat ${.ALLSRC} | sed The perl case was skipped because it's not being used in the tree at this time
Diffstat (limited to 'share/mk/plain.test.mk')
-rw-r--r--share/mk/plain.test.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/share/mk/plain.test.mk b/share/mk/plain.test.mk
index f26bab3..03c27f0 100644
--- a/share/mk/plain.test.mk
+++ b/share/mk/plain.test.mk
@@ -57,8 +57,12 @@ CLEANFILES+= ${_T} ${_T}.tmp
PLAIN_TESTS_SH_SED_${_T}?= # empty
PLAIN_TESTS_SH_SRC_${_T}?= ${_T}.sh
${_T}: ${PLAIN_TESTS_SH_SRC_${_T}}
+.if empty(PLAIN_TESTS_SH_SED_${_T})
+ cat ${.ALLSRC:N*Makefile*} >${.TARGET}.tmp
+.else
cat ${.ALLSRC:N*Makefile*} \
| sed ${PLAIN_TESTS_SH_SED_${_T}} >${.TARGET}.tmp
+.endif
chmod +x ${.TARGET}.tmp
mv ${.TARGET}.tmp ${.TARGET}
.endfor
OpenPOWER on IntegriCloud