diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-05-18 17:39:28 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-05-18 17:39:28 +0000 |
commit | a02652f83d76b8b36af970922caf34ac8f0f2fa9 (patch) | |
tree | 94bb0793c6d8c253bf7d91ad6f827d8c63d26866 /release | |
parent | bc246c3978c8c42d336afd629eed2caf1fd4697d (diff) | |
download | FreeBSD-src-a02652f83d76b8b36af970922caf34ac8f0f2fa9.zip FreeBSD-src-a02652f83d76b8b36af970922caf34ac8f0f2fa9.tar.gz |
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.
Diffstat (limited to 'release')
-rw-r--r-- | release/Makefile | 10 | ||||
-rwxr-xr-x | release/generate-release.sh | 1 |
2 files changed, 6 insertions, 5 deletions
diff --git a/release/Makefile b/release/Makefile index 1dde3b1..081cdbf 100644 --- a/release/Makefile +++ b/release/Makefile @@ -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} diff --git a/release/generate-release.sh b/release/generate-release.sh index 62d0528..080512a 100755 --- a/release/generate-release.sh +++ b/release/generate-release.sh @@ -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 |