pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/tools mk: Avoid unnecessary separate shell invocation.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/abefafd73256
branches:  trunk
changeset: 386388:abefafd73256
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Fri Oct 07 11:42:51 2022 +0000

description:
mk: Avoid unnecessary separate shell invocation.

Reduces number of shells invoked during tools phase by around 100, and improves
performance by around 10%.

diffstat:

 mk/tools/create.mk |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r ddd31651ec2f -r abefafd73256 mk/tools/create.mk
--- a/mk/tools/create.mk        Fri Oct 07 11:24:52 2022 +0000
+++ b/mk/tools/create.mk        Fri Oct 07 11:42:51 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: create.mk,v 1.14 2020/05/10 14:36:18 rillig Exp $
+# $NetBSD: create.mk,v 1.15 2022/10/07 11:42:51 jperkin Exp $
 #
 # Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -152,8 +152,8 @@
 # probably adding a program to USE_TOOLS that is not a valid tool name.
 # For instance, "split" is handled outside of the tools framework.
 ${TOOLS_CMD.${_t_}}:
-       ${RUN} ${TEST} -d ${.TARGET:H:Q} || ${MKDIR} ${.TARGET:H:Q}
        ${RUN}                                                          \
+       ${TEST} -d ${.TARGET:H:Q} || ${MKDIR} ${.TARGET:H:Q};           \
        if ${TEST} -n ${TOOLS_SCRIPT.${_t_}:Q}""; then                  \
                create=wrapper;                                         \
                script=${TOOLS_SCRIPT.${_t_}:Q};                        \



Home | Main Index | Thread Index | Old Index