# # $Id: qmakeRational.pl,v 1.4 2010/03/01 21:11:50 billo Exp $ # my $qt4 = 'C:\\RiverWare\\tools\\Qt-482'; $ENV{QTDIR} = $qt4; $ENV{Path} = $qt4 . '\\bin;' . $ENV{Path}; # get riverware and library .pro modification times. my $rwmod = (stat('riverwarebase.pro'))[9]; my $libmod = (stat('library.pro'))[9]; chdir '..'; chdir 'Halibut'; make('Halibut'); chdir '..'; chdir 'EngrObjs'; make ('riverware'); chdir '..'; sub make { my $file = $_[0]; my ($pro, $vcproj) = ("$file.pro", "$file.vcproj"); if (-f $pro) { # get the package .vcproj modification time (if extant). my $vcmod = (stat($vcproj))[9] if -f $vcproj; # run qmake if either: # - package .vcproj doesn't exist # - .vcproj is older than package .pro # - .vcproj is older than library .pro # - .vcproj is older than riverware .pro if (! -f $vcproj || $vcmod < (stat($pro))[9] || $vcmod < $libmod || $vcmod < $rwmod) { my $cmd = "qmake $pro"; print "\n$cmd\n"; system($cmd); } } } exit 0;