[p4perl] integrating perforce with a build system.

Roger Day roger.day at globalgraphics.com
Tue Feb 22 04:24:02 PST 2005


Umm, that's precisely it: The build system relies on having a different 
set of files for every new build.This ensures a clean dependancy tree for 
every build.





Tony Smith <tony at smee.org>
21/02/2005 17:30
 
        To:     p4perl at perforce.com
        cc:     "Roger Day" <roger.day at globalgraphics.com>
        Subject:        Re: [p4perl] integrating perforce with a build 
system.


On Monday 21 February 2005 13:20, Roger Day wrote:
> Well, I'm almost there
>
> use P4;
>
> # Initialisation
> my $p4 = new P4;
> $p4->Init() or die( "Failed to connect to Perforce" );
>
> $return = $p4->SetCwd("c:\\users\\rday\\perforcews\\");
> print "$return\n";
>
> $return = $p4->Run("sync","-f","//depot/makedist/...");
>
> print "@$return\n";
>
> SetCwd seems to have no effect at all. It's overriden by the client 
spec.

Right. SetCwd() will only make a difference to how Perforce computes 
relative
paths. For example:

$p4->Run( "sync", "../../makedist/..." );

The client spec is the ultimate arbiter of what goes where.

> Which is crucial to what I'm doing. Do I have to edit the client spec 
every
> time I want to do a checkout?

Not unless you're intending to work with different files. The normal usage
would be to have your client spec map ALL of the files your build system
would work with and then either 'p4 sync' or 'p4 sync-f' to have Perforce
populate the build tree. Then you build as normal.

Regards,

Tony

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/p4perl/attachments/20050222/0993fd47/attachment-0001.html>


More information about the p4perl mailing list