don't touch deprecated headers unless they actually change

Change-Id: Iabeec90c2a6549cf92b3b8369a41764a576fd0aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
Oswald Buddenhagen 2013-05-28 20:29:47 +02:00 committed by The Qt Project
parent ad52be1acc
commit af2f1e14f6

View File

@ -1045,26 +1045,28 @@ foreach my $lib (@modules_to_sync) {
my $header_dir = dirname($header_path);
make_path($header_dir, $lib, $verbose_level);
open(HEADER, ">$header_path") || die "Could not open $header_path for writing: $!\n";
print HEADER "#ifndef $guard\n";
print HEADER "#define $guard\n";
my $hdrcont =
"#ifndef $guard\n" .
"#define $guard\n";
my $warning = "Header <$lib/";
$warning .= "private/" unless ($public_header);
$warning .= "$header> is deprecated. Please include <$include> instead.";
print HEADER "#if defined(__GNUC__)\n";
print HEADER "# warning $warning\n";
print HEADER "#elif defined(_MSC_VER)\n";
print HEADER "# pragma message (\"$warning\")\n";
print HEADER "#endif\n";
print HEADER "#include <$include>\n";
$hdrcont .=
"#if defined(__GNUC__)\n" .
"# warning $warning\n" .
"#elif defined(_MSC_VER)\n" .
"# pragma message (\"$warning\")\n" .
"#endif\n" .
"#include <$include>\n";
if ($public_header) {
print HEADER "#if 0\n";
print HEADER "#pragma qt_no_master_include\n";
print HEADER "#endif\n";
$hdrcont .=
"#if 0\n" .
"#pragma qt_no_master_include\n" .
"#endif\n";
}
print HEADER "#endif\n";
close HEADER;
$hdrcont .=
"#endif\n";
if (writeFile($header_path, $hdrcont)) {
if ($verbose_level < 3) {
my $line_prefix = ",";
$line_prefix = "$lib: created deprecated header(s) {" if ($first);
@ -1074,6 +1076,7 @@ foreach my $lib (@modules_to_sync) {
}
$first = 0;
}
}
my $addendum = fixPaths($header_path, $dir) . " ";
if ($public_header) {