Source-Changes-HG archive

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

[src/trunk]: src/share/mk get rid of old style `` command substitution in she...



details:   https://anonhg.NetBSD.org/src/rev/6c961eb8d794
branches:  trunk
changeset: 364572:6c961eb8d794
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Mar 29 22:48:04 2022 +0000

description:
get rid of old style `` command substitution in shell and use $() instead.

diffstat:

 share/mk/bsd.inc.mk     |  4 ++--
 share/mk/bsd.kinc.mk    |  4 ++--
 share/mk/bsd.kmodule.mk |  8 ++++----
 share/mk/bsd.lib.mk     |  8 ++++----
 share/mk/bsd.links.mk   |  6 +++---
 share/mk/bsd.obj.mk     |  6 +++---
 share/mk/bsd.own.mk     |  4 ++--
 7 files changed, 20 insertions(+), 20 deletions(-)

diffs (173 lines):

diff -r 3764ce59409f -r 6c961eb8d794 share/mk/bsd.inc.mk
--- a/share/mk/bsd.inc.mk       Tue Mar 29 22:30:07 2022 +0000
+++ b/share/mk/bsd.inc.mk       Tue Mar 29 22:48:04 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.inc.mk,v 1.33 2018/12/26 22:57:22 christos Exp $
+#      $NetBSD: bsd.inc.mk,v 1.34 2022/03/29 22:48:04 christos Exp $
 
 .include <bsd.init.mk>
 
@@ -45,7 +45,7 @@
         while test $$# -ge 2; do \
                l=$$1; shift; \
                t=${DESTDIR}$$1; shift; \
-               if  ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
+               if  ttarg=$$(${TOOL_STAT} -qf '%Y' $$t) && \
                    [ "$$l" = "$$ttarg" ]; then \
                        continue ; \
                fi ; \
diff -r 3764ce59409f -r 6c961eb8d794 share/mk/bsd.kinc.mk
--- a/share/mk/bsd.kinc.mk      Tue Mar 29 22:30:07 2022 +0000
+++ b/share/mk/bsd.kinc.mk      Tue Mar 29 22:48:04 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.kinc.mk,v 1.37 2018/12/26 22:57:22 christos Exp $
+#      $NetBSD: bsd.kinc.mk,v 1.38 2022/03/29 22:48:04 christos Exp $
 
 # Variables:
 #
@@ -68,7 +68,7 @@
         while test $$# -ge 2; do \
                l=$$1; shift; \
                t=${DESTDIR}$$1; shift; \
-               if  ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
+               if  ttarg=$$(${TOOL_STAT} -qf '%Y' $$t) && \
                    [ "$$l" = "$$ttarg" ]; then \
                        continue ; \
                fi ; \
diff -r 3764ce59409f -r 6c961eb8d794 share/mk/bsd.kmodule.mk
--- a/share/mk/bsd.kmodule.mk   Tue Mar 29 22:30:07 2022 +0000
+++ b/share/mk/bsd.kmodule.mk   Tue Mar 29 22:48:04 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.kmodule.mk,v 1.76 2021/03/29 05:22:49 simonb Exp $
+#      $NetBSD: bsd.kmodule.mk,v 1.77 2022/03/29 22:48:04 christos Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -149,8 +149,8 @@
        ${_MKTARGET_LINK}
        ${LD} -r -o tmp.o ${OBJS}
        ${LD} -r \
-               `${OBJDUMP} --syms --reloc tmp.o | \
-                       ${TOOL_AWK} -f ${ARCHDIR}/kmodwrap.awk` \
+               $$(${OBJDUMP} --syms --reloc tmp.o | \
+                       ${TOOL_AWK} -f ${ARCHDIR}/kmodwrap.awk) \
                 -o ${.TARGET} tmp.o
 
 ${KMOD}_tramp.S: ${KMOD}_tmp.o ${ARCHDIR}/kmodtramp.awk ${ASM_H}
@@ -166,7 +166,7 @@
        ${LD} -r -Map=${.TARGET}.map \
            -o tmp.o ${KMOD}_tmp.o ${KMOD}_tramp.o
        ${OBJCOPY} \
-               `${NM} tmp.o | ${TOOL_AWK} -f ${ARCHDIR}/kmodhide.awk` \
+               $$(${NM} tmp.o | ${TOOL_AWK} -f ${ARCHDIR}/kmodhide.awk) \
                tmp.o ${.TARGET} && \
        rm tmp.o
 .else
diff -r 3764ce59409f -r 6c961eb8d794 share/mk/bsd.lib.mk
--- a/share/mk/bsd.lib.mk       Tue Mar 29 22:30:07 2022 +0000
+++ b/share/mk/bsd.lib.mk       Tue Mar 29 22:48:04 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.lib.mk,v 1.388 2021/11/28 15:47:33 christos Exp $
+#      $NetBSD: bsd.lib.mk,v 1.389 2022/03/29 22:48:04 christos Exp $
 #      @(#)bsd.lib.mk  8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -534,7 +534,7 @@
 __archivebuild: .USE
        ${_MKTARGET_BUILD}
        @rm -f ${.TARGET}
-       ${AR} ${_ARFL} ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
+       ${AR} ${_ARFL} ${.TARGET} $$(NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT})
 .endif
 
 .if !target(__archiveinstall)
@@ -552,7 +552,7 @@
 __buildstdlib: .USE
        @echo building standard ${.TARGET:T:S/.o//:S/lib//} library
        @rm -f ${.TARGET}
-       @${LINK.c:S/-nostdinc//} -nostdlib ${LDFLAGS} -Wno-unused-command-line-argument -r -o ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
+       @${LINK.c:S/-nostdinc//} -nostdlib ${LDFLAGS} -Wno-unused-command-line-argument -r -o ${.TARGET} $$(NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT})
 .endif
 
 .if !target(__buildproflib)
@@ -560,7 +560,7 @@
        @echo building profiled ${.TARGET:T:S/.o//:S/lib//} library
        ${_MKTARGET_BUILD}
        @rm -f ${.TARGET}
-       @${LINK.c:S/-nostdinc//} -nostdlib ${LDFLAGS} -r -o ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*po} | ${TSORT}`
+       @${LINK.c:S/-nostdinc//} -nostdlib ${LDFLAGS} -r -o ${.TARGET} $$(NM=${NM} ${LORDER} ${.ALLSRC:M*po} | ${TSORT})
 .endif
 
 DPSRCS+=       ${_YLSRCS}
diff -r 3764ce59409f -r 6c961eb8d794 share/mk/bsd.links.mk
--- a/share/mk/bsd.links.mk     Tue Mar 29 22:30:07 2022 +0000
+++ b/share/mk/bsd.links.mk     Tue Mar 29 22:48:04 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.links.mk,v 1.34 2009/04/10 16:16:12 apb Exp $
+#      $NetBSD: bsd.links.mk,v 1.35 2022/03/29 22:48:04 christos Exp $
 
 .include <bsd.init.mk>
 
@@ -33,7 +33,7 @@
         while test $$# -ge 2; do \
                l=$$1; shift; \
                t=${DESTDIR}$$1; shift; \
-               if  ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
+               if  ttarg=$$(${TOOL_STAT} -qf '%Y' $$t) && \
                    [ "$$l" = "$$ttarg" ]; then \
                        continue ; \
                fi ; \
@@ -67,7 +67,7 @@
         while test $$# -ge 2; do \
                l=$$1; shift; \
                t=${DESTDIR}$$1; shift; \
-               if  ttarg=`${TOOL_STAT} -qf '%Y' $$t` && \
+               if  ttarg=$$(${TOOL_STAT} -qf '%Y' $$t) && \
                    [ "$$l" = "$$ttarg" ]; then \
                        continue ; \
                fi ; \
diff -r 3764ce59409f -r 6c961eb8d794 share/mk/bsd.obj.mk
--- a/share/mk/bsd.obj.mk       Tue Mar 29 22:30:07 2022 +0000
+++ b/share/mk/bsd.obj.mk       Tue Mar 29 22:48:04 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.obj.mk,v 1.52 2018/05/19 14:11:30 christos Exp $
+#      $NetBSD: bsd.obj.mk,v 1.53 2022/03/29 22:48:04 christos Exp $
 
 .if !defined(_BSD_OBJ_MK_)
 _BSD_OBJ_MK_=1
@@ -70,7 +70,7 @@
 
 obj:
        @cd "${__curdir}"; \
-       here=`${PAWD}`/; subdir=$${here#${BSDSRCDIR}/}; \
+       here=$$(${PAWD})/; subdir=$${here#${BSDSRCDIR}/}; \
        if [ "$$here" != "$$subdir" ]; then \
                if [ ! -d ${__usrobjdir} ]; then \
                        echo "BSDOBJDIR ${__usrobjdir} does not exist, bailing..."; \
@@ -79,7 +79,7 @@
                subdir=$${subdir%/}; \
                dest=${__usrobjdir}/$$subdir${__usrobjdirpf}; \
                if  [ -x ${TOOL_STAT} ] && \
-                   ttarg=`${TOOL_STAT} -qf '%Y' $${here}${__objdir}` && \
+                   ttarg=$$(${TOOL_STAT} -qf '%Y' $${here}${__objdir}) && \
                    [ "$$dest" = "$$ttarg" ]; then \
                        : ; \
                else \
diff -r 3764ce59409f -r 6c961eb8d794 share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk       Tue Mar 29 22:30:07 2022 +0000
+++ b/share/mk/bsd.own.mk       Tue Mar 29 22:48:04 2022 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.own.mk,v 1.1275 2022/03/17 06:24:30 mrg Exp $
+#      $NetBSD: bsd.own.mk,v 1.1276 2022/03/29 22:48:04 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -238,7 +238,7 @@
 #
 .if !defined(_SRC_TOP_)                        # {
 _SRC_TOP_!= cd "${.CURDIR}"; while :; do \
-               here=`pwd`; \
+               here=$$(pwd); \
                [ -f build.sh  ] && [ -d tools ] && { echo $$here; break; }; \
                case $$here in /) echo ""; break;; esac; \
                cd ..; done



Home | Main Index | Thread Index | Old Index