From 8c2518eea421de365db4733af9e6faf09a173634 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 18 Jun 2013 17:10:00 +0200 Subject: rewrite top-level configures without perl otherwise the whole no-syncqt-and-thus-perl-needed stunt in qtbase would be fairly useless for top-level builds. Task-number: QTBUG-31786 Change-Id: I9f9b38091155a2d50ffec169267e0363fc24d3c0 Reviewed-by: Tuukka Turunen Reviewed-by: Joerg Bornemann Reviewed-by: Lars Knoll --- configure | 70 ++++++++++++++--------------------------------------------- configure.bat | 30 +++++++++++++++++++++++-- 2 files changed, 44 insertions(+), 56 deletions(-) diff --git a/configure b/configure index 221d63f7..746e5920 100755 --- a/configure +++ b/configure @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#! /bin/sh ############################################################################# ## ## Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). @@ -40,61 +40,23 @@ ## ############################################################################# -#################################################################################################### -# -# Mother script for Qt Modularization -# -#################################################################################################### +srcpath=`dirname $0` +configure=$srcpath/qtbase/configure +if [ ! -e "$configure" ]; then + echo "$configure not found. Did you forget to run \"init-repository\"?" >&2 + exit 1 +fi -use strict; -use warnings; +mkdir -p qtbase || exit -use File::Basename; -use File::Path; -use Cwd; -use Cwd 'abs_path'; -use Config; +echo "+ cd qtbase" +cd qtbase || exit -# Makes sure the arguments are directories, and creates them if not. -# Will die if there is an error. -sub ensureDir { - foreach (@_) { - if (-e $_) { - if (-d $_) { - next; - } else { - die ("$_ exists, but is not a directory"); - } - } - File::Path::mkpath($_) or die("Could not create $_"); - } -} +echo "+ $configure $@" +"$configure" "$@" || exit 1 -# `system', but also print the command -sub system_v -{ - print "+ @_\n"; - return system(@_); -} +echo "+ cd .." +cd .. -my $relpath = dirname(abs_path($0)); -$relpath =~ s,\\,/,g; -# the current directory is the "build tree" or "object tree" -my $outpath = getcwd(); - -if (! -e "$relpath/qtbase/configure") { - die("$relpath/qtbase/configure not found. Did you forget to run \"init-repository\"?"); -} - -ensureDir("$outpath/qtbase"); -chdir("$outpath/qtbase"); -my $ret = system_v("$relpath/qtbase/configure", @ARGV); -if ($ret != 0) { - print "*** qtbase/configure exited with non-zero status.\n"; - exit ($ret>>8) ; -} - -chdir("$outpath"); - -$ret = system_v("$outpath/qtbase/bin/qmake", "$relpath/qt.pro"); -exit ($ret>>8); +echo "+ qtbase/bin/qmake $srcpath" +exec qtbase/bin/qmake "$srcpath" diff --git a/configure.bat b/configure.bat index 399dd339..73395684 100644 --- a/configure.bat +++ b/configure.bat @@ -1,3 +1,4 @@ +@echo off ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: :: Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). @@ -38,5 +39,30 @@ :: $QT_END_LICENSE$ :: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -@rem ***** This assumes PERL is in the PATH ***** -@perl.exe %~dp0configure %* + +set "srcpath=%~dp0" +set "configure=%srcpath%qtbase\configure.bat" +if not exist "%configure%" ( + echo %configure% not found. Did you forget to run "init-repository"? >&2 + exit /b 1 +) + +if not exist qtbase mkdir qtbase || exit /b 1 + +echo + cd qtbase +cd qtbase || exit /b 1 + +echo + %configure% %* +call %configure% %* +set err=%errorlevel% + +cd .. + +if not %err% == 0 goto out + +echo + qtbase\bin\qmake %srcpath% +qtbase\bin\qmake %srcpath% +set err=%errorlevel% + +:out +exit /b %err% -- cgit v1.2.3