summaryrefslogtreecommitdiff
path: root/scripts/kconfig/qconf-cfg.sh
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-12-11 11:54:48 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2022-12-13 22:29:10 +0900
commit3122c84409d578a5df8bcb1953547e0b871ac4c2 (patch)
tree1909485b0ac97f85bf942af4d1a9f41e20c81023 /scripts/kconfig/qconf-cfg.sh
parent6768fa4bcb6c1618248f135d04b9287ba2724ae0 (diff)
kconfig: refactor Makefile to reduce process forks
Refactor Makefile and use read-file macro. For Make >= 4.2, it can read out a file by using the built-in function. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'scripts/kconfig/qconf-cfg.sh')
-rwxr-xr-xscripts/kconfig/qconf-cfg.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/kconfig/qconf-cfg.sh b/scripts/kconfig/qconf-cfg.sh
index ad652cb53947..117f36e568fc 100755
--- a/scripts/kconfig/qconf-cfg.sh
+++ b/scripts/kconfig/qconf-cfg.sh
@@ -1,6 +1,10 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
+cflags=$1
+libs=$2
+bin=$3
+
PKG="Qt5Core Qt5Gui Qt5Widgets"
if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then
@@ -11,9 +15,9 @@ if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then
fi
if ${HOSTPKG_CONFIG} --exists $PKG; then
- echo cflags=\"-std=c++11 -fPIC $(${HOSTPKG_CONFIG} --cflags $PKG)\"
- echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG)\"
- echo moc=\"$(${HOSTPKG_CONFIG} --variable=host_bins Qt5Core)/moc\"
+ ${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags}
+ ${HOSTPKG_CONFIG} --libs ${PKG} > ${libs}
+ ${HOSTPKG_CONFIG} --variable=host_bins Qt5Core > ${bin}
exit 0
fi