diff options
author | Martin Smith <msmith@trolltech.com> | 2010-01-11 12:45:23 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-01-11 12:45:23 (GMT) |
commit | e1e67e84b223b36a01d767c163de730702057eb8 (patch) | |
tree | 984b4484c6995be30c1c48eb7a92278f247f067c /bin | |
parent | 8e2c575f6383a69e9c1d4f069e3c8e3b219197b5 (diff) | |
parent | 039387d498f4ca0125938c7c79c5aff29dab5361 (diff) | |
download | Qt-e1e67e84b223b36a01d767c163de730702057eb8.zip Qt-e1e67e84b223b36a01d767c163de730702057eb8.tar.gz Qt-e1e67e84b223b36a01d767c163de730702057eb8.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/syncqt | 28 |
1 files changed, 26 insertions, 2 deletions
@@ -15,6 +15,13 @@ use Cwd; use Config; use strict; +for (my $i = 0; $i < $#ARGV; $i++) { + if ($ARGV[$i] eq "-base-dir" && $i < $#ARGV - 1) { + $ENV{"QTDIR"} = $ARGV[$i + 1]; + last; + } +} + die "syncqt: QTDIR not defined" if ! $ENV{"QTDIR"}; # sanity check # global variables @@ -61,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; @@ -84,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; } @@ -576,9 +586,16 @@ 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"; + } elsif("$arg" eq "-base-dir") { + # skip, it's been dealt with at the top of the file + shift @ARGV; + next; } elsif("$arg" eq '*') { # workaround for windows 9x where "%*" expands to "*" $var = 1; @@ -628,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)) { @@ -813,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"); @@ -909,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"; |