From owner-freebsd-bugs Fri Jan 17 05:08:55 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id FAA28323 for bugs-outgoing; Fri, 17 Jan 1997 05:08:55 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id FAA28317 for ; Fri, 17 Jan 1997 05:08:48 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.3/8.6.9) id AAA14901; Sat, 18 Jan 1997 00:05:22 +1100 Date: Sat, 18 Jan 1997 00:05:22 +1100 From: Bruce Evans Message-Id: <199701171305.AAA14901@godzilla.zeta.org.au> To: joerg_wunsch@uriah.heep.sax.de, thompson@tgsoft.com Subject: Re: bin/2493: make $DESTDIR work Cc: freebsd-bugs@freefall.freebsd.org, jkh@time.cdrom.com Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Well, i've only heard one objection, that was: ``Name this thing > TARGETDIR.'' What about this? > >Could do that... There are a few existing occurances of >-I${DESTDIR}/usr/include, which i am now given to understand are "not >really correct", and should presumably come to be -I${TARGETDIR}/usr/include? The existing ones are in bsd.lib.mk, bsd.prog.mk and gdb/Makefile. This is wrong according to bsd.README and comments in *mk which say that ${DESTDIR} only gives the tree to install in. However, it does sort of work. After bootstrapping to install all includes and libraries under ${DESTDIR}, you can build everything else using only a few wrong libraries (-I- and -nostdlib aren't used, so there is a large risk of picking up the wrong includes or libraries if the bootstrap isn't complete, and gcc generates absolute pathnames for crt0.o and libgcc.a so those are always taken from the wrong tree). After installing everything under ${DESTDIR}, you can then change ${DESTDIR} and install a copy under the new ${DESTDIR} without rebuilding much. I'd like to rename ${DESTDIR} to ${TARGETDIR} for the first type of use. This is necessary for putting the bootstrap and final versions under different trees. ${DESTDIR} should not be wrtitten to at build time and ${TARGETDIR} should not be written to at install time unless they are the same. Bruce