Changeset 651 for trunk/bin/syncqt


Ignore:
Timestamp:
Mar 8, 2010, 12:52:58 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.2 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/bin/syncqt

    r561 r651  
    44# Synchronizes Qt header files - internal development tool.
    55#
    6 # Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     6# Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    77# Contact: Nokia Corporation (qt-info@nokia.com)
    88#
     
    1515use Config;
    1616use strict;
     17
     18for (my $i = 0; $i < $#ARGV; $i++) {
     19    if ($ARGV[$i] eq "-base-dir" && $i < $#ARGV - 1) {
     20        $ENV{"QTDIR"} = $ARGV[$i + 1];
     21        last;
     22    }
     23}
    1724
    1825die "syncqt: QTDIR not defined" if ! $ENV{"QTDIR"}; # sanity check
     
    6269my $check_includes = 0;
    6370my $copy_headers = 0;
     71my $create_uic_class_map = 1;
     72my $create_private_headers = 1;
    6473my @modules_to_sync ;
    6574$force_relative = 1 if ( -d "/System/Library/Frameworks" );
     
    8594    print "  -showonly             Show action but not perform        (default: " . ($showonly ? "yes" : "no") . ")\n";
    8695    print "  -outdir <PATH>        Specify output directory for sync  (default: $out_basedir)\n";
     96    print "  -separate-module <NAME>:<PROFILEDIR>:<HEADERDIR> Create headers for <NAME> with original headers in <HEADERDIR> relative to <PROFILEDIR> \n";
    8797    print "  -help                 This help\n";
    8898    exit 0;
     
    577587        $var = "module";
    578588        $val = shift @ARGV;
     589    } elsif("$arg" eq "-separate-module") {
     590        $var = "separate-module";
     591        $val = shift @ARGV;
    579592    } elsif("$arg" eq "-show") {
    580593        $var = "showonly";
    581594        $val = "yes";
     595    } elsif("$arg" eq "-base-dir") {
     596        # skip, it's been dealt with at the top of the file
     597        shift @ARGV;
     598        next;
    582599    } elsif("$arg" eq '*') {
    583600        # workaround for windows 9x where "%*" expands to "*"
     
    629646        die "No such module: $val" unless(defined $modules{$val});
    630647        push @modules_to_sync, $val;
     648    } elsif ("$var" eq "separate-module") {
     649        my ($module, $prodir, $headerdir) = split(/:/, $val);
     650        $modules{$module} = $prodir;
     651        push @modules_to_sync, $module;
     652        $moduleheaders{$module} = $headerdir;
     653        $create_uic_class_map = 0;
     654        $create_private_headers = 0;
    631655    } elsif ("$var" eq "output") {
    632656        my $outdir = $val;
     
    808832                                $class_lib_map_contents .= "QT_CLASS_LIB($_, $lib, $header_base)\n";
    809833                                $header_copies++ if(syncHeader("$out_basedir/include/$lib/$class", "$out_basedir/include/$lib/$header", 0));
     834
     835                                # KDE-Compat headers for Phonon
     836                                if ($lib eq "phonon") {
     837                                    $header_copies++ if (syncHeader("$out_basedir/include/phonon_compat/Phonon/$class", "$out_basedir/include/$lib/$header", 0));
     838                                }
    810839                            }
    811                         } else {
     840                        } elsif ($create_private_headers) {
    812841                            @headers = ( "$out_basedir/include/$lib/private/$header" );
    813842                            push @headers, "$out_basedir/include/Qt/private/$header"
     
    857886        my @master_includes;
    858887        push @master_includes, "$out_basedir/include/$lib/$lib";
     888        push @master_includes, "$out_basedir/include/phonon_compat/Phonon/Phonon" if ($lib eq "phonon");
    859889        foreach my $master_include (@master_includes) {
    860890            #generate the "master" include file
     
    904934    }
    905935}
    906 unless($showonly) {
     936unless($showonly || !$create_uic_class_map) {
    907937    my $class_lib_map = "$out_basedir/src/tools/uic/qclass_lib_map.h";
    908938    if(-e "$class_lib_map") {
Note: See TracChangeset for help on using the changeset viewer.