Skip to content

Commit 1b31695

Browse files
committed
Merge #20673: depends: Use more legible qmake commands in qt package
87fe104 depends: Use more legible qmake commands in qt package (Hennadii Stepanov) bf35a8d depends: Do not set build_subdir for qt package (Hennadii Stepanov) Pull request description: Rather than using `cd` to jump all over the place, perform all `(q)make` commands from the top level directory. Looking at bash like `cd ../../../..` gives me a headache. Credits to **fanquake**. This PR is an alternative to #20504 that works without any additional [non-trivial hack](bitcoin/bitcoin#20504 (comment)). ACKs for top commit: promag: Tested ACK 87fe104. fanquake: ACK 87fe104 Tree-SHA512: 1d2a13b5358fc7406c5363ddd62fd363dbc0ec5ace68946e4d3e6e8620419afaa64ef2837488aaed226174e01e8897495085540f7126b80f8b2372d21b5b29f9
2 parents f656165 + 87fe104 commit 1b31695

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

depends/packages/qt.mk

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ $(package)_file_name=qtbase-$($(package)_suffix)
66
$(package)_sha256_hash=9b9dec1f67df1f94bce2955c5604de992d529dde72050239154c56352da0907d
77
$(package)_dependencies=zlib
88
$(package)_linux_dependencies=freetype fontconfig libxcb
9-
$(package)_build_subdir=qtbase
109
$(package)_qt_libs=corelib network widgets gui plugins testlib
1110
$(package)_patches=fix_qt_pkgconfig.patch mac-qmake.conf fix_configure_mac.patch fix_no_printer.patch
1211
$(package)_patches+= fix_rcc_determinism.patch fix_riscv64_arch.patch xkb-default.patch no-xlib.patch
@@ -257,25 +256,27 @@ define $(package)_config_cmds
257256
export PKG_CONFIG_SYSROOT_DIR=/ && \
258257
export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
259258
export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig && \
259+
cd qtbase && \
260260
./configure $($(package)_config_opts) && \
261261
echo "host_build: QT_CONFIG ~= s/system-zlib/zlib" >> mkspecs/qconfig.pri && \
262262
echo "CONFIG += force_bootstrap" >> mkspecs/qconfig.pri && \
263-
$(MAKE) sub-src-clean && \
264-
cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
265-
cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. && \
266-
cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile && \
267-
cd ../lupdate/ && ../../../../qtbase/bin/qmake lupdate.pro -o Makefile && cd ../../../..
263+
cd .. && \
264+
$(MAKE) -C qtbase sub-src-clean && \
265+
qtbase/bin/qmake -o qttranslations/Makefile qttranslations/qttranslations.pro && \
266+
qtbase/bin/qmake -o qttranslations/translations/Makefile qttranslations/translations/translations.pro && \
267+
qtbase/bin/qmake -o qttools/src/linguist/lrelease/Makefile qttools/src/linguist/lrelease/lrelease.pro && \
268+
qtbase/bin/qmake -o qttools/src/linguist/lupdate/Makefile qttools/src/linguist/lupdate/lupdate.pro
268269
endef
269270

270271
define $(package)_build_cmds
271-
$(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \
272-
$(MAKE) -C ../qttools/src/linguist/lrelease && \
273-
$(MAKE) -C ../qttools/src/linguist/lupdate && \
274-
$(MAKE) -C ../qttranslations
272+
$(MAKE) -C qtbase/src $(addprefix sub-,$($(package)_qt_libs)) && \
273+
$(MAKE) -C qttools/src/linguist/lrelease && \
274+
$(MAKE) -C qttools/src/linguist/lupdate && \
275+
$(MAKE) -C qttranslations
275276
endef
276277

277278
define $(package)_stage_cmds
278-
$(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. && \
279+
$(MAKE) -C qtbase/src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && \
279280
$(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
280281
$(MAKE) -C qttools/src/linguist/lupdate INSTALL_ROOT=$($(package)_staging_dir) install_target && \
281282
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets

0 commit comments

Comments
 (0)