summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlexis Menard <alexis.menard@nokia.com>2011-06-29 18:13:47 (GMT)
committerSergio Ahumada <sergio.ahumada@nokia.com>2011-06-29 18:24:56 (GMT)
commit223eab4b5bfcc625c526a2e754a54b6250f5f6ec (patch)
treed6c7fac1d39a0089903fbc43ec1254b00cdb0cbf /bin
parent85ba298af99c42adce62c68fcaef1055ceb228c1 (diff)
downloadQt-223eab4b5bfcc625c526a2e754a54b6250f5f6ec.zip
Qt-223eab4b5bfcc625c526a2e754a54b6250f5f6ec.tar.gz
Qt-223eab4b5bfcc625c526a2e754a54b6250f5f6ec.tar.bz2
Fix headers generation for QtWebKit.
syncqt assumes that the pro files of modules are named the same way as the directory they are in. QtWebKit 2.2 has its main pro file called QtWebKit.pro and not qt.pro even if it's located in src/3rdParty/webkit/Source/WebKit/qt. This patch ensure that syncqt will look for a pro file if there is one in the directory in the case there isn't one named the same way as the directory. Reviewed-by:mariusSO
Diffstat (limited to 'bin')
-rwxr-xr-xbin/syncqt21
1 files changed, 19 insertions, 2 deletions
diff --git a/bin/syncqt b/bin/syncqt
index dd04e43..8e0b3e4 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -714,8 +714,25 @@ foreach my $lib (@modules_to_sync) {
my $master_contents = "#ifndef QT_".$libcapitals."_MODULE_H\n#define QT_".$libcapitals."_MODULE_H\n";
#get dependencies
- if(-e "$dir/" . basename($dir) . ".pro") {
- if(open(F, "<$dir/" . basename($dir) . ".pro")) {
+ my $pro_file = "$dir/" . basename($dir) . ".pro";
+ if(!open(F, "<$pro_file")) {
+ #the pro file doesn't exist let's try to find one
+ opendir(DIR, $dir);
+ $pro_file = "";
+ foreach my $file (readdir(DIR))
+ {
+ if ( $file =~ /\.pro$/i) {
+ die "There are multiple pro files for $lib module, which one should I use? \n" if ($pro_file ne "");
+ $pro_file = "$dir/" . $file;
+ }
+ }
+ closedir(DIR);
+ if ($pro_file eq "") {
+ die "I couldn't find a pro file for $lib module \n";
+ }
+ }
+ if(-e "$pro_file") {
+ if(open(F, "<$pro_file")) {
while(my $line = <F>) {
chomp $line;
if($line =~ /^ *QT *\+?= *([^\r\n]*)/) {