summaryrefslogtreecommitdiffstats
path: root/bin/syncqt
diff options
context:
space:
mode:
Diffstat (limited to 'bin/syncqt')
-rwxr-xr-xbin/syncqt15
1 files changed, 10 insertions, 5 deletions
diff --git a/bin/syncqt b/bin/syncqt
index 60ecf3a..907869d 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -309,16 +309,17 @@ sub classNames {
}
######################################################################
-# Syntax: syncHeader(header, iheader, copy)
+# Syntax: syncHeader(header, iheader, copy, timestamp)
# Params: header, string, filename to create "symlink" for
# iheader, string, destination name of symlink
# copy, forces header to be a copy of iheader
+# timestamp, the requested modification time if copying
#
# Purpose: Syncronizes header to iheader
# Returns: 1 if successful, else 0.
######################################################################
sub syncHeader {
- my ($header, $iheader, $copy) = @_;
+ my ($header, $iheader, $copy, $ts) = @_;
$iheader =~ s=\\=/=g;
$header =~ s=\\=/=g;
return copyFile($iheader, $header) if($copy);
@@ -332,6 +333,7 @@ sub syncHeader {
open HEADER, ">$header" || die "Could not open $header for writing!\n";
print HEADER "#include \"$iheader_out\"\n";
close HEADER;
+ utime(time, $ts, $header) or die "$iheader, $header";
return 1;
}
return 0;
@@ -472,6 +474,7 @@ sub copyFile
binmode O;
print O $ifilecontents;
close O;
+ utime time, (stat($ifile))[9], $file;
return 1;
} elsif ( $copy < 0 ) {
my $ifile_dir = dirname($ifile);
@@ -481,6 +484,7 @@ sub copyFile
binmode O;
print O $filecontents;
close O;
+ utime time, (stat($file))[9], $ifile;
return 1;
}
}
@@ -823,6 +827,7 @@ foreach my $lib (@modules_to_sync) {
print "SYMBOL: $_\n";
}
} else {
+ my $ts = (stat($iheader))[9];
#find out all the places it goes..
my @headers;
if ($public_header) {
@@ -861,18 +866,18 @@ foreach my $lib (@modules_to_sync) {
# class =~ s,::,/,g;
# }
$class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n";
- $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0));
+ $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
# KDE-Compat headers for Phonon
if ($lib eq "phonon") {
- $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0));
+ $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0, $ts));
}
}
} elsif ($create_private_headers) {
@headers = ( "$out_basedir/include/$lib/private/$header" );
}
foreach(@headers) { #sync them
- $header_copies++ if(syncHeader($_, $iheader, $copy_headers));
+ $header_copies++ if(syncHeader($_, $iheader, $copy_headers, $ts));
}
if($public_header) {