Re: Separate obj/src dir

From: Sam Ravnborg (sam@ravnborg.org)
Date: Tue Nov 19 2002 - 17:05:01 EST


On Tue, Nov 19, 2002 at 02:51:54PM -0600, Brian Jackson wrote:
> Sam Ravnborg writes:
>
> I wonder how hard it would be to do this for other files types. It would be
> sort of handy to be able to copy a single file out of the source tree into
> the build tree, and have the build use the copy in the build tree. Example:
> you want to test a one liner in drivers/scsi/sd.c, you could just copy sd.c
> into the build tree, and make the change and test it out. That could be a
> huge space savings. That would help out those of us that are stuck with
> tiny hard drives in our laptops :)
It actually works. But that is a side-effect and not something I had
planned.
I tried your example and kbuild uses the sd.c located in OBJTREE if
present. make searches lokal directory before VPATH directory.
And when sd.c is deleted the commandline changes and the original file
is compiled again.

But I can see several drawbacks with this, especially dealing with .h
files, or .c files included by other .c files.
So this is not a trustable feature.

        Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:29 EST