Subject: toolchain/25125: build.sh targets set DESTDIR inconsistently
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <lguillaume@berklee.edu>
List: netbsd-bugs
Date: 04/10/2004 10:19:08
>Number:         25125
>Category:       toolchain
>Synopsis:       build.sh targets set DESTDIR inconsistently
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 10 14:20:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Louis Guillaume
>Release:        NetBSD 2.0C
>Organization:
Berklee College of Music
>Environment:
System: NetBSD shodo.berklee.net 2.0C NetBSD 2.0C (ASTER) #0: Fri Apr 9 20:16:39 EDT 2004 louis@shodo.berklee.net:/usr/obj/sys/arch/i386/compile/ASTER i386
Architecture: i386
Machine: i386
>Description:
The build.sh "release" target defaults DESTDIR and RELEASEDIR to /usr/src/destdir.i386 and /usr/src/releasedir respectively.

The "install" target defaults DESTDIR and RELEASEDIR to /usr/src/obj/destdir.i386 and /usr/src/obj/releasedir respsectively.

These defaults are inconsistent.
>How-To-Repeat:
/etc/mk.conf contains the following lines...

OBJMACHINEDIR=YES
MKOBJDIRS=YES

... On a clean checkout of /usr/src, do the following...

$ cd /usr/src
$ ./build.sh -U -T /usr/obj/TOOLDIR.i386 tools
$ ./build.sh -U -T /usr/obj/TOOLDIR.i386 kernel=ASTER # my kernel.
Reboot.
$ cd /usr/src
$ ./build.sh -x -U -T /usr/obj/TOOLDIR.i386 release
$ su -
# ./build.sh -u -U -T /usr/obj/TOOLDIR.i386 install=/

The install will fail beacuse it's looking for DESTDIR in /usr/src/obj/destdir.i386 instead of /usr/src/destdir.i386 as created by the release target.

I suspect that the release target is the one that's misbehaving.

>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: