aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-06-18 17:10:00 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-20 14:58:18 +0200
commit8c2518eea421de365db4733af9e6faf09a173634 (patch)
treee33ac5343e1698ba3f14f5928ea246ba75f95fd3
parent23a639d4cc4d7e3c3b598ad70e0d1be1463ac96a (diff)
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 <tuukka.turunen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rwxr-xr-xconfigure70
-rw-r--r--configure.bat30
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%