27 Commits

Author SHA1 Message Date
Luca Di Sera
6b424efcf1 Do not assume FHS in init-repository and configure
On systems that do not follow the Filesystem Hierarchy Standard, such as
guix, the hardcoded `/bin/pwd` will fail to be found so that the script
will fail.

Use `pwd`, instead, so that the command can be found through the normal
path search mechanism.

Change-Id: I519d535bcaf53119c8800cc5545da9a0e48e677a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2024-06-28 17:41:38 +02:00
Alexandru Croitor
2c9664ca33 CMake: Integrate init-repository with the configure script
Calling configure will now implicitly run init-repository when
appropriate. See further down below for what "appropriate" means.

All supported init-repository options can be passed to configure as
except for -mirror, -oslo, -berlin.

This includes useful options like -submodules, -no-resolve-deps and
-no-optional-deps.

When running configure on a qt5.git clone without any submodules
cloned, configure will exit with a helpful error message suggesting to
pass -init-submodules, so it automatically clones missing repositories.
This means cloning is opt-in, so that internet access is not done
implicitly.

The error message also suggests passing the -submodules option.
This will affect which submodules will be cloned by init-repository
and which submodules will be configured by configure.
In this case -submodules is effectively an alias of
init-repository's -module-subset for cloning purposes.

When calling configure a second time, without -init-submodules, on an
already configured repo, init-repository behavior is entirely skipped.

-submodules now accepts init-repository-style special values like
"essential", "addon", "all", "existing", "-deprecated" for the purpose
of cloning submodules. The values are then translated into actual repos
that should also be configured or skipped by configure.

The default subset of cloned submodules is currently the same one as
init-repository, "default", which clones 44 actively maintained
repositories as well as deprecated submodules.

If configure is called a second time WITH -init-submodules, it's the
same as calling init-repository --force to re-initialize submodules.
In this case passing something like
 --submodules existing,<additional-submodules>
might make sense to add or remove submodules.

As a drive-by this also fixes the bug where you couldn't pass a
  configure -- -DFOO=0
parameter to configure, because it got treated as '0>', redirecting
from a different stream than stdout, leading to empty content in the
file.

[ChangeLog][General][Build System] The configure script now implicitly
calls init-repository when appropriate and accepts init-repository
command line options.

Fixes: QTBUG-120030
Task-number: QTBUG-122622
Change-Id: Iedbfcbf0a87c8ee89e40d00b6377b68296a65a62
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-02-28 06:24:02 +01:00
Lucie Gérard
6757a4c399 Add license directory and update remaining license format in coin
Pick-to: 6.5 6.6
Task-number: QTBUG-108364
Change-Id: I1250a46d60d5b4e85258b93f8f6f6fc4631b3a70
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-09-02 13:58:24 +02:00
Tor Arne Vestbø
eaed67d307 configure: Let shell deal with errexit and xtrace
Change-Id: I9ae6d6003885607d2300d4d84e8629d7891420db
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-18 12:45:24 +01:00
Kai Koehne
0f7c2c3739 Change license of top-level configure, configure.bat
The license should be GPLv3-EXCEPT, like for the same file in qtbase.

Pick-to: 5.15
Change-Id: I59c63c0a693394dc9f8de4706c2e113fe2ea4130
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-28 12:39:17 +02:00
Svintsov Dmitry
6c6169f292 Make top-level configure script more portable
Remove hard-coded path to pwd; there is no need to have it, and for example
NixOS doesn't actually have it at this location, leading to such an error:

    ./configure: line 36: /bin/pwd: No such file or directory
    /qtbase/configure not found. Did you forget to run "init-repository"?

Change-Id: If3372db3390ba5f39c5003d12ff2a466f39ff353
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-24 12:19:39 +00:00
Jani Heikkinen
c2d151522b Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Change-Id: Ieb3be34b0d4061fb8dc886991528951f59dbd67e
Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com>
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
2015-02-25 03:23:07 +00:00
Oswald Buddenhagen
ef8000991e leave makefile generation to the real configure
call it with the "secret" -top-level option, which shifts the makefile
generation one level up.

this makes the configure call the last thing we do, thus also avoiding
the problems we had with the -help switch (and the previous attempts at
fixing it).

Change-Id: I80ba4a09b260a140a9d1b976277c30fd1436b4d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-07-10 06:30:46 +02:00
Sergio Ahumada
16e4fb6c98 configure: Fix srcpath when you run configure in the top-level dir
Using the absolute path to configure, otherwise you get:

  [user@locahost qt5]$ ./configure -minimal
  + cd qtbase
  + ./qtbase/configure -minimal
  ./configure: line 58: ./qtbase/configure: No such file or directory

Change-Id: Ic7568cc571aaa52c56bcd28fa1b6bde8abb32c8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-23 23:48:51 +02:00
Oswald Buddenhagen
8c2518eea4 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>
2013-06-20 14:58:18 +02:00
Oswald Buddenhagen
b9b8db0745 fix argument quoting when invoking "proper" configure
Change-Id: Idd22f7d267b83e1a4f2cc6df9994d82a5d361df7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-14 05:51:43 +01:00
Jonathan Liu
600b295f2c Revert "Check for a non-error, non-continue case."
This reverts commit 6bd52260c811d7ad9eb74bde0db02f178bd40b47.
Running configure -help should not break builds by removing
.qmake.cache.

Change-Id: I9754ea891a445a9b67a1f9ad0adac85cb36338fe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-28 18:19:12 +02:00
Iikka Eklund
4e87fe89ce Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ieac8fb85896427cd5e3c6d91698c455a0dc9e495
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-25 14:31:30 +02:00
Oswald Buddenhagen
1317419aa2 create top-level .qmake.super instead of .qmake.cache
at this point, the cache is needed only to aggregate the modules,
not to "export" qtbase internals. the modules now have private caches
for "real" config data.

Change-Id: I4c70d220bbc054023710680545a04c171e238aff
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-29 03:41:41 +02:00
Oswald Buddenhagen
c2543dc358 be explicit about qtbase/configure failing
so one has a base directory for paths it reports.

Task-number: QTBUG-25190
Change-Id: Ib222e2d7b07bf986a9eccd6934e51574b5a5a052
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-04-20 11:33:35 +02:00
Jason McDonald
a9d7b1e452 Add license header to configure script.
Change-Id: I231ee1c8ad214c3b09de35578009da4b47bcd00b
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-02-14 06:03:53 +01:00
Jason McDonald
7e083e46d2 Update contact address in license headers.
Change-Id: I2b7793cf4fbb605f58257e71614dcd6e2855a82d
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 04:08:15 +01:00
Jason McDonald
96f49e86ae Update copyright year in license headers.
Change-Id: Ic9fffa8c317e73d8cbed665fe48c1b158e2fa420
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-06 07:50:15 +01:00
Rohan McGovern
ca77c71471 Fixed configure exiting with 0 exit code even on failure.
The return value from system() is an exit status (e.g. returned value
from waitpid) and needs to be shifted right by 8 bits to get an exit
code.

Change-Id: Ibbcc58491b27ef6d9d299427aeb78f57b41c92e2
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-15 04:24:39 +01:00
Lincoln Ramsay
84c8542eeb fix spelling (in a comment)
Change-Id: I74ef359ad899060f3ed60ae323c5fc3a1e75dc86
Reviewed-on: http://codereview.qt-project.org/6198
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
2011-10-10 00:58:07 +02:00
Lincoln Ramsay
6bd52260c8 Check for a non-error, non-continue case.
There is at least one case in configure where it exist with a code of 0
but does not create .qmake.cache. Detect this and avoid continuing.

Change-Id: I0554991e5d4a50b7072494c080fa2c593e03b726
Reviewed-on: http://codereview.qt-project.org/6094
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-10-07 02:29:16 +02:00
Lincoln Ramsay
d3f10a82ff Don't assume that commands succeed
Signed-off-by: axis <qt-info@nokia.com>
2011-05-03 13:47:51 +02:00
Lincoln Ramsay
984400a586 Warn everywhere, not just Unix
use warnings; is the portable way of doing #!/usr/bin/perl -w
Also use strict; in init-repository.

Signed-off-by: axis <qt-info@nokia.com>
2011-05-03 13:47:51 +02:00
Olivier Goffart
519c2294b2 Fix shadowbuild
Reviewed-by: axis
2011-04-27 14:05:53 +02:00
axis
428afb264c Stopped running init-repository from configure.
It's unexpected that configure tampers with your git checkout.
2011-04-27 12:45:38 +02:00
axis
124a9e2e2c Removed WebKit patches.
They are not needed anymore after the patches were submitted to the
qtwebkit repository on gitorious.org.
2011-04-27 12:45:38 +02:00
Qt by Nokia
92351a70e0 Long live the qt5 Qt repository 2011-04-27 12:34:00 +02:00