aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure70
1 files changed, 16 insertions, 54 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"