As requested by many people, with final prodding from Jason Hall, fix this

so that running make release causes make obj to be run before doing
anything. This fixes a bug wherein, when run for the first time, and
without -DNOSRC, make release would attempt to recursively tar up the src
directory including its own output and enter an infinite loop.

While here, make the cross-building stuff work a little more the way it
should if only one of TARGET/TARGET_ARCH is specified.
This commit is contained in:
Nathan Whitehorn 2011-05-18 17:39:28 +00:00
parent 4b7e611675
commit 0bd47e8362
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=222074
2 changed files with 6 additions and 5 deletions

View File

@ -25,11 +25,11 @@ PORTSDIR?= /usr/ports
DOCDIR?= /usr/doc
RELNOTES_LANG?= en_US.ISO8859-1
TARGET_ARCH?= ${MACHINE_ARCH}
.if ${TARGET_ARCH} == ${MACHINE_ARCH}
TARGET?= ${MACHINE}
.if ${TARGET} == ${MACHINE}
TARGET_ARCH?= ${MACHINE_ARCH}
.else
TARGET?= ${TARGET_ARCH}
TARGET_ARCH?= ${TARGET}
.endif
IMAKE= ${MAKE} TARGET_ARCH=${TARGET_ARCH} TARGET=${TARGET}
DISTDIR= ${.OBJDIR}/dist
@ -169,7 +169,9 @@ ftp: packagesystem
mkdir ftp
cp *.txz MANIFEST ftp
release: obj ${RELEASE_TARGETS}
release:
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj
${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS}
clean:
chflags -R noschg ${.OBJDIR}

View File

@ -63,7 +63,6 @@ if [ -d $2/usr/doc ]; then
fi
chroot $2 make -C /usr/src $MAKE_FLAGS buildworld buildkernel
chroot $2 make -C /usr/src/release obj
chroot $2 make -C /usr/src/release release
chroot $2 make -C /usr/src/release install DESTDIR=/R