Re: AfterBuild is broken?

Johan Holmberg <[email protected]> Sun, 23 Jun 2002 15:32:57 +0200 (MEST)
Newsgroups gmane.comp.gnu.cons.general
Message-ID <[email protected]>
On Wed, 19 Jun 2002, Timothee Besset wrote:
>
> From the cons documentation:
>
> > The AfterBuild method evaluates the specified perl string after building
> > the given file or files (or finding that they are up to date). The eval
> > will happen once per specified file. AfterBuild is called as follows:
>
> I tried using AfterBuild here, and the command is executed first, it
> doesn't rebuild the target first..
>

Do you mean that the AfterBuild-command is executed first,
*and then* the command to build the target file ???

Or was your target file already up to date, so no rebuild action was
needed before the AfterBuild-command was executed ?

I would be very surprised if the *order* was wrong, considering that
the code that gives the current behaviour is:

        ...
        my($status) = &file::_build;
        if ($_[0]->{after_build_func}) {
            ...

where the purpose of "file::_build" is to make a target
"up-to-date". The execution of "AfterBuild stuff" is really *after*
in the code.

/Johan Holmberg



_______________________________________________
[email protected]
http://mail.gnu.org/mailman/listinfo/cons-discuss
Cons URL: http://www.dsmit.com/cons/