Date: Wed, 22 Feb 1995 22:05:40 -0800 (PST) From: "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com> To: rkw@dataplex.net (Richard Wackerbarth) Cc: current@FreeBSD.org Subject: Re: Building World from Read-Only Media Message-ID: <199502230605.WAA26576@gndrsh.aac.dev.com> In-Reply-To: <v0211010dab71b1e212f8@[199.183.109.242]> from "Richard Wackerbarth" at Feb 22, 95 10:48:17 pm
next in thread | previous in thread | raw e-mail | index | archive | help
>
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199502230605.WAA26576>
