cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AfterBuild patch, problem with correction


From: Gary Oberbrunner
Subject: Re: AfterBuild patch, problem with correction
Date: Wed, 29 Nov 2000 09:22:18 -0500 (EST)

>>>>> "MP" == Marcello Pietrobon <address@hidden> writes:

  MP> But now AfterBuild with my modification doesn't work anymore.
  MP> But it doesn't work even without that modification.
  MP> So I looked at your example in the attachment and I see that you
  MP> don't call AfterBuild. You call Command() instead to test
  MP> AfterBuild() !

Yes, Zachary's example did not call AfterBuild.  It would not work.

  MP> Program $env $tgt, $src;
  MP> AfterBuild $env $tgt, qq(system q($EXPORT$\$tgt));

  MP> But now that I'm trying to respect the logic of Cons it doesn't
  MP> work anymore.

If it fails during the AfterBuild because system can't find
$EXPORT\$tgt, it's likely because you've omitted the Install method
which would install $tgt from your build dir into $EXPORT.  Put that
in and it should work.  Don't forget if the AfterBuild action returns
an error ($@) the build will terminate with an error.

  MP> What would you do ?  Also when using AfterBuild do I have to set
  MP> the dependencies to launch my command before building the next
  MP> file ?  If I set the dependencies between the last file built
  MP> and the next source file how can make a source file to be built
  MP> even if building the preceding one failed ?

You can only set dependencies from file to file.  But since AfterBuild
always runs its action *immediately* after a target is built, you
shouldn't need to set any extra dependencies.  I wouldn't try to
create serial dependencies unless you really need things to be built
in a certain order, since as you say that will cause the build to fail
even with cons -k.

-- 
. . . . . . . . . . . . . . . . . . . . . . . . .
Gary Oberbrunner                address@hidden
GenArts, Inc.                   Tel: 617-492-2888
8 Clinton Street                Fax: 617-492-2852
Cambridge, MA 02139 USA         http://web.genarts.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]