@@ -3,7 +3,7 @@ package Install;
3
3
#
4
4
# Package that provides 'make install' functionality for msvc builds
5
5
#
6
- # $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.21 2007/09/23 20:32:40 adunstan Exp $
6
+ # $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.22 2007/09/27 21:13:11 adunstan Exp $
7
7
#
8
8
use strict;
9
9
use warnings;
@@ -17,6 +17,16 @@ our (@ISA,@EXPORT_OK);
17
17
@ISA = qw( Exporter) ;
18
18
@EXPORT_OK = qw( Install) ;
19
19
20
+ sub lcopy
21
+ {
22
+ my $src = shift ;
23
+ my $target = shift ;
24
+
25
+ unlink $target if -f $target ;
26
+
27
+ copy($src ,$target );
28
+ }
29
+
20
30
sub Install
21
31
{
22
32
$| = 1;
@@ -43,7 +53,7 @@ sub Install
43
53
' doc/contrib' , ' symbols' , ' share/tsearch_data' );
44
54
45
55
CopySolutionOutput($conf , $target );
46
- copy ($target . ' /lib/libpq.dll' , $target . ' /bin/libpq.dll' );
56
+ lcopy ($target . ' /lib/libpq.dll' , $target . ' /bin/libpq.dll' );
47
57
my $sample_files = [];
48
58
File::Find::find({wanted =>
49
59
sub { / ^.*\. sample\z /s &&
@@ -113,7 +123,7 @@ sub CopyFiles
113
123
print " ." ;
114
124
$f = $basedir . $f ;
115
125
die " No file $f \n " if (!-f $f );
116
- copy ($f , $target . basename($f ))
126
+ lcopy ($f , $target . basename($f ))
117
127
|| croak " Could not copy $f to $target " . basename($f ). " to $target " . basename($f ) . " \n " ;
118
128
}
119
129
print " \n " ;
@@ -131,7 +141,7 @@ sub CopySetOfFiles
131
141
next if / ecpg.test/ ; # Skip temporary install in regression subdir
132
142
my $tgt = $target . basename($_ );
133
143
print " ." ;
134
- copy ($_ , $tgt ) || croak " Could not copy $_ : $! \n " ;
144
+ lcopy ($_ , $tgt ) || croak " Could not copy $_ : $! \n " ;
135
145
}
136
146
print " \n " ;
137
147
}
@@ -173,8 +183,8 @@ sub CopySolutionOutput
173
183
# Static lib, such as libpgport, only used internally during build, don't install
174
184
next ;
175
185
}
176
- copy (" $conf \\ $pf \\ $pf .$ext " ," $target \\ $dir \\ $pf .$ext " ) || croak " Could not copy $pf .$ext \n " ;
177
- copy (" $conf \\ $pf \\ $pf .pdb" ," $target \\ symbols\\ $pf .pdb" ) || croak " Could not copy $pf .pdb\n " ;
186
+ lcopy (" $conf \\ $pf \\ $pf .$ext " ," $target \\ $dir \\ $pf .$ext " ) || croak " Could not copy $pf .$ext \n " ;
187
+ lcopy (" $conf \\ $pf \\ $pf .pdb" ," $target \\ symbols\\ $pf .pdb" ) || croak " Could not copy $pf .pdb\n " ;
178
188
print " ." ;
179
189
}
180
190
print " \n " ;
@@ -297,7 +307,7 @@ sub CopyContribFiles
297
307
if ($d eq ' spi' );
298
308
foreach my $f (split /\s +/,$flist )
299
309
{
300
- copy (' contrib/' . $d . ' /' . $f ,$target . ' /share/contrib/' . basename($f ))
310
+ lcopy (' contrib/' . $d . ' /' . $f ,$target . ' /share/contrib/' . basename($f ))
301
311
|| croak(" Could not copy file $f in contrib $d " );
302
312
print ' .' ;
303
313
}
@@ -315,7 +325,7 @@ sub CopyContribFiles
315
325
if ($d eq ' spi' );
316
326
foreach my $f (split /\s +/,$flist )
317
327
{
318
- copy (' contrib/' . $d . ' /' . $f , $target . ' /doc/contrib/' . $f )
328
+ lcopy (' contrib/' . $d . ' /' . $f , $target . ' /doc/contrib/' . $f )
319
329
|| croak(" Could not copy file $f in contrib $d " );
320
330
print ' .' ;
321
331
}
@@ -359,7 +369,7 @@ sub CopyIncludeFiles
359
369
$target . ' /include/' ,
360
370
' src/include/' , ' postgres_ext.h' , ' pg_config.h' , ' pg_config_os.h' , ' pg_config_manual.h'
361
371
);
362
- copy (' src/include/libpq/libpq-fs.h' , $target . ' /include/libpq/' )
372
+ lcopy (' src/include/libpq/libpq-fs.h' , $target . ' /include/libpq/' )
363
373
|| croak ' Could not copy libpq-fs.h' ;
364
374
365
375
CopyFiles(' Libpq headers' , $target . ' /include/' , ' src/interfaces/libpq/' , ' libpq-fe.h' );
@@ -374,7 +384,7 @@ sub CopyIncludeFiles
374
384
$target . ' /include/internal/' ,
375
385
' src/include/' , ' c.h' , ' port.h' , ' postgres_fe.h'
376
386
);
377
- copy (' src/include/libpq/pqcomm.h' , $target . ' /include/internal/libpq/' )
387
+ lcopy (' src/include/libpq/pqcomm.h' , $target . ' /include/internal/libpq/' )
378
388
|| croak ' Could not copy pqcomm.h' ;
379
389
380
390
CopyFiles(
0 commit comments