git: a8659d8785c0 - stable/14 - release: make -j compat: cd inside subshell
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 Apr 2024 05:43:51 UTC
The branch stable/14 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=a8659d8785c068bcc6138708db1db1e24e7327a5
commit a8659d8785c068bcc6138708db1db1e24e7327a5
Author: Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2024-04-10 03:25:34 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2024-04-17 05:43:26 +0000
release: make -j compat: cd inside subshell
Place instances of "cd foo && bar" inside subshells for compatibility
with modern make(8) which uses a single shell for the duration of a
makefile target.
MFC after: 1 week
(cherry picked from commit 93e4813b9a157396ffbcf8456ca4f5c25599807d)
---
release/Makefile | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/release/Makefile b/release/Makefile
index 2cf6efe2e231..90937c53cabf 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -117,7 +117,7 @@ clean: beforeclean
base.txz:
mkdir -p ${DISTDIR}
- cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR}
+ ( cd ${WORLDDIR} && ${IMAKE} distributeworld DISTDIR=${.OBJDIR}/${DISTDIR} )
# TODO: Add NO_ROOT mode to mm-tree.sh
.if !defined(NO_ROOT)
# Set up mergemaster root database
@@ -136,41 +136,41 @@ base.txz:
rm ${.OBJDIR}/${DISTDIR}/base/var/db/etcupdate/current/METALOG
.endif
# Package all components
- cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR}
+ ( cd ${WORLDDIR} && ${IMAKE} packageworld DISTDIR=${.OBJDIR}/${DISTDIR} )
mv ${DISTDIR}/*.txz .
kernel.txz:
mkdir -p ${DISTDIR}
- cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR}
+ ( cd ${WORLDDIR} && ${IMAKE} distributekernel packagekernel DISTDIR=${.OBJDIR}/${DISTDIR} )
mv ${DISTDIR}/kernel*.txz .
src.txz:
mkdir -p ${DISTDIR}/usr
ln -fs ${WORLDDIR} ${DISTDIR}/usr/src
- cd ${DISTDIR} && ${TAR_CMD} cLvf - --exclude .svn --exclude .zfs \
+ ( cd ${DISTDIR} && ${TAR_CMD} cLvf - --exclude .svn --exclude .zfs \
--exclude .git --exclude @ --exclude usr/src/release/dist usr/src | \
- ${XZ_CMD} > ${.OBJDIR}/src.txz
+ ${XZ_CMD} > ${.OBJDIR}/src.txz )
ports.txz:
mkdir -p ${DISTDIR}/usr
ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports
- cd ${DISTDIR} && ${TAR_CMD} cLvf - \
+ ( cd ${DISTDIR} && ${TAR_CMD} cLvf - \
--exclude .git --exclude .svn \
--exclude usr/ports/distfiles --exclude usr/ports/packages \
--exclude 'usr/ports/INDEX*' --exclude work usr/ports | \
- ${XZ_CMD} > ${.OBJDIR}/ports.txz
+ ${XZ_CMD} > ${.OBJDIR}/ports.txz )
disc1: packagesystem
# Install system
mkdir -p ${.TARGET}
- cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
+ ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \
MK_INSTALLLIB=no MK_MAIL=no \
${_ALL_LIBCOMPATS:@v@MK_LIB$v=no@} \
MK_TOOLCHAIN=no MK_PROFILE=no \
MK_RESCUE=no MK_DICT=no \
MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \
- -DDB_FROM_SRC
+ -DDB_FROM_SRC )
# Copy distfiles
mkdir -p ${.TARGET}/usr/freebsd-dist
for dist in MANIFEST $$(ls *.txz | grep -vE -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \
@@ -202,7 +202,7 @@ disc1: packagesystem
bootonly: packagesystem
# Install system
mkdir -p ${.TARGET}
- cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
+ ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
DESTDIR=${.OBJDIR}/${.TARGET} MK_AT=no \
MK_GAMES=no \
MK_INSTALLLIB=no MK_MAIL=no \
@@ -210,7 +210,7 @@ bootonly: packagesystem
MK_TOOLCHAIN=no MK_PROFILE=no \
MK_RESCUE=no MK_DICT=no \
MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no \
- -DDB_FROM_SRC
+ -DDB_FROM_SRC )
# Copy manifest only (no distfiles) to get checksums
mkdir -p ${.TARGET}/usr/freebsd-dist
cp MANIFEST ${.TARGET}/usr/freebsd-dist
@@ -237,10 +237,10 @@ bootonly: packagesystem
dvd: packagesystem
# Install system
mkdir -p ${.TARGET}
- cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
+ ( cd ${WORLDDIR} && ${IMAKE} installworld installkernel distribution \
DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \
MK_TESTS=no MK_DEBUG_FILES=no \
- -DDB_FROM_SRC
+ -DDB_FROM_SRC )
# Copy distfiles
mkdir -p ${.TARGET}/usr/freebsd-dist
for dist in MANIFEST $$(ls *.txz | grep -v -- '(${base ${_ALL_libcompats}:L:ts|})-dbg'); \
@@ -334,8 +334,8 @@ release-install:
${XZ_CMD} -k ${DESTDIR}/${OSRELEASE}-${I}
. endif
.endfor
- cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512
- cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256
+ ( cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 )
+ ( cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 )
.endif
.include "${.CURDIR}/Makefile.inc1"