Hello
On 12/06/2010 19:52, David Golden wrote:
> 2010/6/12 Alberto Simões <[email protected]>:
>> I am using, during Build.PL first run,
>> $builder->install_destination("bin");
>>
>> But, if the user issues a build install with a different installbase,
>> things will not work.
>>
>> I have two options:
>> 1) disable the installbase option to the Build install action
>> 2) make the install action recompile everything again
>>
>> What is the more cleaner approach?
>
> My thought is #2 by creating a subclass and overriding these two functions:
>
> * ACTION_build -- use the notes() method to save the install path in
> effect at compile time
> * ACTION_install -- check if the install destination has changed and
> rebuild if it has
>
> The main ACTION_install already depends on 'build', so all your
> override of ACTION_install may need to do is to call
> $self->depends_on("clean") if the path has changed and then call the
> superclass method. (N.B. I haven't actually tried this approach.)
Is there any problem on using a dispatch("build") during ACTION_install? :D
--
Alberto Simões