Changeset 1072 for trunk/bin/syncqt


Ignore:
Timestamp:
Sep 10, 2011, 12:55:12 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

syncqt: Paths in headers.pri must be relative to QTDIR.

These paths are used in .pro files located in the Qt source tree (QTDIR)
so they must be relative to it in order to get correct final paths (not to
the build directory which differs in shadow builds).

The code only worked with shadow builds only if the shadow build tree
was located in the same parent directory as the Qt source tree (i.e.
/home/bob/Coding/qt and /home/bob/Coding/qt-build). This is not always
the case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/syncqt

    r846 r1072  
    342342
    343343######################################################################
    344 # Syntax:  fixPaths(file, dir)
     344# Syntax:  fixPaths(file, dir)
    345345# Params:  file, string, filepath to be made relative to dir
    346346#          dir, string, dirpath for point of origin
     347
     348
    347349#
    348350# Purpose: file is made relative (if possible) of dir.
     
    350352######################################################################
    351353sub fixPaths {
    352     my ($file, $dir) = @_;
    353     $dir =~ s=^$basedir/=$out_basedir/= if(!($basedir eq $out_basedir));
     354    my ($file, $dir) = @_;
     355    $dir =~ s=^$basedir/=$out_basedir/= if(!($basedir eq $out_basedir));
    354356    $file =~ s=\\=/=g;
    355357    $file =~ s/\+/\\+/g;
     
    890892                            #deal with the install directives
    891893                            if($public_header) {
    892                                 my $pri_install_iheader = fixPaths($iheader, $current_dir);
     894                                my $pri_install_iheader = fixPaths($iheader, $current_dir);
    893895                                foreach my $class (@classes) {
    894896                                    # Strip namespaces:
     
    898900#                                   }
    899901                                    my $class_header = fixPaths("$out_basedir/include/$lib/$class",
    900                                                                 $current_dir) . " ";
     902                                                                $current_dir) . " ";
    901903                                    $pri_install_classes .= $class_header
    902904                                                                unless($pri_install_classes =~ $class_header);
     
    906908                        }
    907909                        else {
    908                             my $pri_install_iheader = fixPaths($iheader, $current_dir);
     910                            my $pri_install_iheader = fixPaths($iheader, $current_dir);
    909911                            $pri_install_pfiles.= "$pri_install_iheader ";;
    910912                        }
Note: See TracChangeset for help on using the changeset viewer.