summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-06-12 12:27:54 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-06-23 09:58:15 (GMT)
commit4b43263b870c17fd813d1d34f97146f4c725083e (patch)
treeff728f87bf7d445e86d695de3b46e105c6aeb488 /bin
parentd710a09bd26728a78963e6ad464540daea46f6a4 (diff)
downloadQt-4b43263b870c17fd813d1d34f97146f4c725083e.zip
Qt-4b43263b870c17fd813d1d34f97146f4c725083e.tar.gz
Qt-4b43263b870c17fd813d1d34f97146f4c725083e.tar.bz2
Attempt to fix header installation for Phonon.
This is the long-standing issue of whether Phonon headers should be written with a capital P or a lowercase one. KDE releases of Phonon had <Phonon/CapitalClassName> whereas Qt 4.4 had <phonon/filename.h>. I tried to solve this before by adding a Phonon subdir next to phonon in include/, but that only compounded the error: the presence of two dirs caused problems and the installation wasn't fixed. So instead try to place Phonon/ClassName inside include/phonon. And fix the installation to do it properly: just copy the include/$lib dir into the target, then overwrite the .h files with the sources from src/$lib. Reviewed-by: Marius Storm-Olsen
Diffstat (limited to 'bin')
-rwxr-xr-xbin/syncqt46
1 files changed, 22 insertions, 24 deletions
diff --git a/bin/syncqt b/bin/syncqt
index f58a4d1..d6d3c57 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -308,8 +308,6 @@ sub syncHeader {
$header =~ s=\\=/=g;
return copyFile($iheader, $header) if($copy);
- my $iheader_no_basedir = $iheader;
- $iheader_no_basedir =~ s,^$basedir/?,,;
unless(-e "$header") {
my $header_dir = dirname($header);
mkpath $header_dir, 0777;
@@ -798,10 +796,9 @@ foreach (@modules_to_sync) {
my $class = $_;
if ($class =~ m/::/) {
$class =~ s,::,/,g;
- $class = "../" . $class;
}
$class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n";
- $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", $header, 0));
+ $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0));
}
} else {
@headers = ( "$out_basedir/include/$lib/private/$header" );
@@ -823,7 +820,6 @@ foreach (@modules_to_sync) {
my $class = $_;
if ($class =~ m/::/) {
$class =~ s,::,/,g;
- $class = "../" . $class;
}
my $class_header = fixPaths("$out_basedir/include/$lib/$class",
$current_dir) . " ";
@@ -844,25 +840,27 @@ foreach (@modules_to_sync) {
$master_contents .= "#endif\n";
unless($showonly) {
- #generate the "master" include file
- my $master_include = "$out_basedir/include/$lib/$lib";
- $pri_install_files .= fixPaths($master_include, "$modules{$lib}") . " "; #get the master file installed too
- if(-e "$master_include") {
- open MASTERINCLUDE, "<$master_include";
- local $/;
- binmode MASTERINCLUDE;
- my $oldmaster = <MASTERINCLUDE>;
- close MASTERINCLUDE;
- $oldmaster =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
- $master_include = 0 if($oldmaster eq $master_contents);
- }
- if($master_include && $master_contents) {
- my $master_dir = dirname($master_include);
- mkpath $master_dir, 0777;
- print "header (master) created for $lib\n";
- open MASTERINCLUDE, ">$master_include";
- print MASTERINCLUDE "$master_contents";
- close MASTERINCLUDE;
+ unless ($lib eq "phonon") {
+ #generate the "master" include file
+ my $master_include = "$out_basedir/include/$lib/$lib";
+ $pri_install_files .= fixPaths($master_include, "$modules{$lib}") . " "; #get the master file installed too
+ if($master_include && -e "$master_include") {
+ open MASTERINCLUDE, "<$master_include";
+ local $/;
+ binmode MASTERINCLUDE;
+ my $oldmaster = <MASTERINCLUDE>;
+ close MASTERINCLUDE;
+ $oldmaster =~ s/\r//g; # remove \r's , so comparison is ok on all platforms
+ $master_include = 0 if($oldmaster eq $master_contents);
+ }
+ if($master_include && $master_contents) {
+ my $master_dir = dirname($master_include);
+ mkpath $master_dir, 0777;
+ print "header (master) created for $lib\n";
+ open MASTERINCLUDE, ">$master_include";
+ print MASTERINCLUDE "$master_contents";
+ close MASTERINCLUDE;
+ }
}
#handle the headers.pri for each module