On Sun, 3 Feb 2008, [EMAIL PROTECTED] wrote:

> > given more platforms, isn't it theoretically possible to configure
> > for another platform that just happens to use mipsel and be based
> > on gcc-4.1.2 as well?  and if that were the case, wouldn't that
> > second build step all over the previous build?
> >
> > in short, unless you can guarantee complete separation
> > between different target platforms when you're configuring
> > and building, i'm not sure there's much value in trying to
> > make a "clean" try to be that selective.
> >
> > or am i missing something?
>
> You're right. Pls see attached patch. The BUILD_SUFFIX is used to
> separate different platforms. Currently the toolchain dir is not
> unique enough. You can't have the same gcc and different uclibc
> versions for the same arch.

i can see how BUILD_SUFFIX is being used but let me propose an
alternative.

currently (and as i read it), every config and build
creates/overwrites some top-level directories, such as bin/,
build_dir/, staging_dir/ and so on, and BUILD_SUFFIX is used to
distinguish between some of the *sub*directories further down.

as an alternative (and what i did in an embedded project some time
back) is to instead use a global BUILD_ID, which *completely* defined
the full output directory for that entire build -- sort of equivalent
to the linux kernel's "O=" variable.  in cases like that, of course,
*all* of the generated output is uniquely identified by the directory
name of whatever you set as the BUILD_ID, so you can configure and
make small tweaks and just assign a cute new BUILD_ID to distinguish
that build from all other builds with no fear of collision.

so as a start, you can use, say, OUTPUT_DIR as the absolutely
top-level output location (defaulting to $(TOPDIR) if you want).  and
further, each and every build *must* have a BUILD_ID (which could have
a default name of, well, "default" or something).  at that point,
building is easy, and cleaning is just as easy.

of course, if you choose to generate your output directories
elsewhere, you're responsible for perhaps remembering that and just
getting rid of previous builds with a simple "rm -rf" on that
directory.

thoughts?

rday

p.s.  obviously, this is just taking the BUILD_SUFFIX functionality to
its logical extreme.
--


========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

Home page:                                         http://crashcourse.ca
Fedora Cookbook:    http://crashcourse.ca/wiki/index.php/Fedora_Cookbook
========================================================================
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to