Teach syncqt to handle multiple %moduleheaders directories

Each directory is separated by a ';'. The syntax was chosen over the
regular perl [] syntax as ';' was used already in other places.

Change-Id: I7a07a1facb7c08d7a9de6ec45ad57f6057cb0150
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Tor Arne Vestbø 2011-10-20 15:45:20 +02:00 committed by Qt by Nokia
parent 9f1aa866bd
commit 17eef6a4c4

View File

@ -961,8 +961,14 @@ foreach my $lib (@modules_to_sync) {
#create the new ones
foreach my $current_dir (split(/;/, $dir)) {
my $headers_dir = $current_dir;
$headers_dir .= "/$pathtoheaders" if ($pathtoheaders);
my @headers_paths = split(/;/, $pathtoheaders);
if (@headers_paths) {
@headers_paths = map { "$current_dir/$_" } @headers_paths;
} else {
push @headers_paths, $current_dir;
}
foreach my $headers_dir (@headers_paths) {
#calc subdirs
my @subdirs = ($headers_dir);
foreach my $subdir (@subdirs) {
@ -1048,9 +1054,9 @@ foreach my $lib (@modules_to_sync) {
# Strip namespaces:
my $class = $full_class;
$class =~ s/^.*:://;
# if ($class =~ m/::/) {
# class =~ s,::,/,g;
# }
# if ($class =~ m/::/) {
# class =~ s,::,/,g;
# }
$class_lib_map_contents .= "QT_CLASS_LIB($full_class, $lib, $header_base)\n";
$header_copies++ if(syncHeader($lib, "$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0, $ts));
@ -1080,9 +1086,9 @@ foreach my $lib (@modules_to_sync) {
foreach my $class (@classes) {
# Strip namespaces:
$class =~ s/^.*:://;
# if ($class =~ m/::/) {
# $class =~ s,::,/,g;
# }
# if ($class =~ m/::/) {
# $class =~ s,::,/,g;
# }
my $class_header = fixPaths("$out_basedir/include/$lib/$class",
$current_dir) . " ";
$pri_install_classes .= $class_header
@ -1121,6 +1127,7 @@ foreach my $lib (@modules_to_sync) {
print " }\n" if ($header_dirname && $verbose_level > 0 && $verbose_level < 3);
}
}
}
# close the master include:
$master_contents .= "#endif\n";