summaryrefslogtreecommitdiffstats
path: root/bin/syncqt
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2010-01-08 13:30:18 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2010-01-11 10:08:25 (GMT)
commit64ce2950db4e140d1e65da632acbc812cabc6e03 (patch)
treeca27314df5e3c89d4cc1e1991f2f6a6e27ee76b9 /bin/syncqt
parentb3ffbdc0334c24d5d90ca3227a765fbd1e09bbc3 (diff)
downloadQt-64ce2950db4e140d1e65da632acbc812cabc6e03.zip
Qt-64ce2950db4e140d1e65da632acbc812cabc6e03.tar.gz
Qt-64ce2950db4e140d1e65da632acbc812cabc6e03.tar.bz2
[syncqt] Make it possible to synchronize headers for a separate module
Added a -separate-module commandline option to syncqt that allows calling syncqt from outside of Qt to create header files. For WebKit package we call syncqt with -separate-module QtWebKit:WebKit/qt/Api to generate headers for the "QtWebKit" module for the headers in WebKit/qt/Api/*.h Reviewed-by: Thiago
Diffstat (limited to 'bin/syncqt')
-rwxr-xr-xbin/syncqt17
1 files changed, 15 insertions, 2 deletions
diff --git a/bin/syncqt b/bin/syncqt
index be0a019..3ac70a4 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -68,6 +68,8 @@ my $force_win = 0;
my $force_relative = 0;
my $check_includes = 0;
my $copy_headers = 0;
+my $create_uic_class_map = 1;
+my $create_private_headers = 1;
my @modules_to_sync ;
$force_relative = 1 if ( -d "/System/Library/Frameworks" );
my $out_basedir = $basedir;
@@ -91,6 +93,7 @@ sub showUsage
print " -windows Force platform to Windows (default: " . ($force_win ? "yes" : "no") . ")\n";
print " -showonly Show action but not perform (default: " . ($showonly ? "yes" : "no") . ")\n";
print " -outdir <PATH> Specify output directory for sync (default: $out_basedir)\n";
+ print " -separate-module <NAME>:<HEADERDIR> Create headers for <NAME> with original headers in <HEADERDIR> \n";
print " -help This help\n";
exit 0;
}
@@ -583,6 +586,9 @@ while ( @ARGV ) {
} elsif("$arg" eq "-module") {
$var = "module";
$val = shift @ARGV;
+ } elsif("$arg" eq "-separate-module") {
+ $var = "separate-module";
+ $val = shift @ARGV;
} elsif("$arg" eq "-show") {
$var = "showonly";
$val = "yes";
@@ -639,6 +645,13 @@ while ( @ARGV ) {
print "module :$val:\n";
die "No such module: $val" unless(defined $modules{$val});
push @modules_to_sync, $val;
+ } elsif ("$var" eq "separate-module") {
+ my ($module, $srcdir) = split(/:/, $val);
+ $modules{$module} = $srcdir;
+ push @modules_to_sync, $module;
+ delete $moduleheaders{$module} if ($moduleheaders{$module});
+ $create_uic_class_map = 0;
+ $create_private_headers = 0;
} elsif ("$var" eq "output") {
my $outdir = $val;
if(checkRelative($outdir)) {
@@ -824,7 +837,7 @@ foreach (@modules_to_sync) {
$header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0));
}
}
- } else {
+ } elsif ($create_private_headers) {
@headers = ( "$out_basedir/include/$lib/private/$header" );
push @headers, "$out_basedir/include/Qt/private/$header"
if ("$lib" ne "phonon");
@@ -920,7 +933,7 @@ foreach (@modules_to_sync) {
}
}
}
-unless($showonly) {
+unless($showonly || !$create_uic_class_map) {
my $class_lib_map = "$out_basedir/src/tools/uic/qclass_lib_map.h";
if(-e "$class_lib_map") {
open CLASS_LIB_MAP, "<$class_lib_map";