Re: Actions, routes and builders in general

Bram Moolenaar <[email protected]> Fri, 04 Jun 2004 12:14:27 +0200
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Adriaan de Groot wrote:

> On Thursday 03 June 2004 21:30, Bram Moolenaar wrote:
> > A related issue is that the ":route" command is a bit strange, in that
> > it defines how to turn one filetype into another and then lists the
> > names of the actions to be taken.  This is very unusual, no matter what
> > background you have.
> 
> Yes - ideally, AAP would find the right route itself, based on the
> filetypes of the sources and the target type.

Thus for going from a Lex file to an object file, one would only need to
specify a builder for Lex -> C and a builder for C -> object, and Aap
has to figure out that these two builders need to be used?  It's
possible, but takes some figuring out what algorithm to use.  And how to
handle the situation that multiple routes exist.

We also somehow need to have builders that are not invoked directly, but
through a default builder that checks which tool is currently active.
For example, in the MSVC tool we now use:

def use_actions(scope):
    """
    Setup variables so that the default actions use the MSVC actions.
    """
    scope["C_COMPILE_ACTION"] = "compile_msvc"
    scope["CXX_COMPILE_ACTION"] = "compile_msvc"
    scope["C_BUILD_ACTION"] = "build_msvc"
    scope["CXX_BUILD_ACTION"] = "build_msvc"

We don't need to keep it exactly like this, but we do need a way to
specify which builder for C -> object is currently to be used.  Without
deleting other builders.

One thing to keep in mind is handling the "build_action" attribute,
which is used to have object files from C++ linked together in a
slightly different way.  Don't want to add the logic for that to all
Builders.  Thus we either need one "toplevel" builder that invokes the
currently active builder, or a function that is used by all builders to
handle the "build_action" attribute.

-- 
Micro$oft: where do you want to go today?
    Linux: where do you want to go tomorrow?
  FreeBSD: are you guys coming, or what?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504