From owner-freebsd-current Wed Feb 22 22:07:04 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id WAA23646 for current-outgoing; Wed, 22 Feb 1995 22:07:04 -0800 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id WAA23639 for ; Wed, 22 Feb 1995 22:06:54 -0800 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.8/8.6.6) id WAA26576; Wed, 22 Feb 1995 22:05:40 -0800 From: "Rodney W. Grimes" Message-Id: <199502230605.WAA26576@gndrsh.aac.dev.com> Subject: Re: Building World from Read-Only Media To: rkw@dataplex.net (Richard Wackerbarth) Date: Wed, 22 Feb 1995 22:05:40 -0800 (PST) Cc: current@FreeBSD.org In-Reply-To: from "Richard Wackerbarth" at Feb 22, 95 10:48:17 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 2139 Sender: current-owner@FreeBSD.org Precedence: bulk > > OK, guys! I have some new mk files that are much "cleaner" for our make world. > > I have identified 4 strategies for the placement of object files. If one of > these will not please you, SPEAK NOW, or hold your peace. > > Assume that we are compiling /home/my/src/prog/cfile.c > > Case 1. Just put the object next to its source > /home/my/src/prog/cfile.o Works now with current .mk rules. > Case 2. Put the objects in a directory > /home/my/src/prog/obj/cfile.o Works now with current .mk rules. (Just mkdir obj, could also be a very simple change to the obj: rule to create dirs instead of links to /usr/obj). > Case 3. Global object store > /usr/obj/home/my/src/prog/cfile.o Default make obj case now. > Case 4. Local object tree > /home/my/obj/prog/cfile.o Again, very simple change to .mk files. > Right now, the "world" uses links to make case 3 look like case 2. > My inclination is to go to case 4 instead. > > To build my own object tree from read-only media > > mkdir /home/my > ln -s /cdrom/some.version/Makefile /home/my > ln -s /cdrom/some.version/src /home/my > cd /home/my > make I see in no way how this causes ``make world'' to be any cleaner. > I am presently finishing up to procedures necessary to allow links in a > source tree to point to directory trees rather than each file. It is easy > unless you want to cd down in the tree and "make" some subtree rather than > making the whole tree. > However, I think I can do it provided you supply a DESTDIR in advance. DESTDIR should *ONLY* be used during install: rules, no place else should really be using DESTDIR. > Can I write a makefile rule that can export an env variable. You can't export a variable back to an envoking shell. > What I would like to do is > > cd /top/of/tree > make plant-my-root Replace with: SRC_ROOT=/top/of/tree; export SRC_ROOT; > cd down/the/tree > > and have DESTDIR=/top/of/tree -- Rod Grimes rgrimes@gndrsh.aac.dev.com Accurate Automation Company Custom computers for FreeBSD