[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Installing 3rd party files w/o knowing all dependencies
From: |
Doug Treder |
Subject: |
Re: Installing 3rd party files w/o knowing all dependencies |
Date: |
Wed, 11 Oct 2000 15:02:53 -0700 (PDT) |
I used the following procedure to copy a directory recursively.
It depends on using a unix command via perl ` backquote. If
you're on NT maybe you can use pieces of this to do what you
want.
sub cons::InstallRecursive {
my ($cons, $output, $input) = @_;
my $files = `find $input -type f`;
foreach my $file (split(/\n/, $files)) {
my $target = $file;
$target =~ s/$input/$output/;
unless ($target =~ /CVS/) {
InstallAs $cons $target, $file;
Default ($target);
}
}
}
On Wed, 11 Oct 2000, Kolarik, Tony wrote:
> I'd need to copy a bunch of 3rd party binaries from within the build tree to
> a central export directory. It can't depend on a particular file, I'd
> rather not enumerate every file that the copy operations depend on, and it
> should be a one time operation that happens no matter what target gets built
> first. I want to be sure that if *anything* got built into export then
> these files are there installed there too.
>
> Can someone offer a clean way to do this? Command just isn't happy with my
> efforts so far, which at this point probably make no sense. In any event
> Command never seems to get what it wants to do my copy.
>
> As an aside the way the doc reads to me almost sounds like Install or
> InstallAs will do just copy arbitrary files if they are out of date or don't
> exist in the target directory. Doesn't seem to work that way though.
>
> Thanks a lot,
> -- Tony K.
>
> # in construct at root of tree
> # copy files needed for packaging
>
> my @THIRDPARTYFILES = ();
> if ($BUILDTYPE eq 'release') {
> @THIRDPARTYFILES = qw(
> ace.dll
> blt24.dll
> itcl31.dll
> itk31.dll
> MSVCIRT.DLL
> MSVCP60.DLL
> MSVCRT.DLL
> tcl82.dll
> tclpip82.dll
> tk82.dll
> tls7012d.dll
> xerces-c_1_1.dll
> xmlparse.dll
> xmltok.dll
> );
> }
> else {
> @THIRDPARTYFILES = qw(
> aced.dll
> blt24.dll
> itcl31.dll
> itk31.dll
> MSVCIRTD.DLL
> MSVCP60D.DLL
> MSVCRTD.DLL
> tcl82.dll
> tclpip82.dll
> tk82.dll
> tls7015d.dll
> xerces-c_1_1.dll
> xerces-c_1_1.pdb
> xmlparse.dll
> xmltok.dll
> );
> }
>
> $abscwd = cwd();
> $exppath = DirPath $BIN;
>
> $absexp = "$abscwd/$exppath";
>
> # the files exist in #bin/debug or #bin/release
> @EXTFILES = map("bin/$BUILDTYPE/$_", @THIRDPARTYFILES);
>
> # $BIN is #export/debug/bin or #export/release/bin
> @TARGETFILES = map("$BIN/$_", @THIRDPARTYFILES);
>
> print "EXTFILES: @EXTFILES\n\n";
> print "TARGETFILES: @TARGETFILES\n\n";
>
> # this echo's zilch
> $CONS->Command(address@hidden, address@hidden,
> qq(
> echo %< %>
> ));
>
>
> _______________________________________________
> address@hidden
> http://mail.gnu.org/mailman/listinfo/cons-discuss
> Cons URL: http://www.dsmit.com/cons/
>