qt5/configure

23 lines
790 B
Plaintext
Raw Normal View History

#! /bin/sh
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-01-29 18:10:42 +01:00
# Copyright (C) 2024 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
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-01-29 18:10:42 +01:00
src_path=`dirname $0`
src_path=`(cd "$src_path"; pwd)`
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-01-29 18:10:42 +01:00
optfile=config.tl.opt
opttmpfile=config.tl.opt.in
2011-04-27 12:34:00 +02:00
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-01-29 18:10:42 +01:00
# Posix compatible way to truncate file
: > "$optfile"
: > "$opttmpfile"
2011-04-27 12:34:00 +02:00
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-01-29 18:10:42 +01:00
# For consistency, use QtWriteArgsFile.cmake to write the optfile like we do on Windows.
# We do the same with the configure script in qtbase.
for arg in "$@"; do echo \"$arg\" >> "$opttmpfile"; done
cmake -DIN_FILE="${opttmpfile}" -DOUT_FILE="${optfile}" -P "${src_path}/cmake/QtWriteArgsFile.cmake"
cmake_script_path="$src_path/cmake/QtTopLevelConfigureScript.cmake"
exec cmake -DTOP_LEVEL_SRC_PATH="$src_path" -DOPTFILE="${optfile}" -P "$cmake_script_path"