diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-12-11 03:54:48 +0100 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-12-13 14:29:10 +0100 |
commit | 3122c84409d578a5df8bcb1953547e0b871ac4c2 (patch) | |
tree | 1909485b0ac97f85bf942af4d1a9f41e20c81023 /scripts/kconfig/gconf-cfg.sh | |
parent | kbuild: add read-file macro (diff) | |
download | linux-3122c84409d578a5df8bcb1953547e0b871ac4c2.tar.xz linux-3122c84409d578a5df8bcb1953547e0b871ac4c2.zip |
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/gconf-cfg.sh')
-rwxr-xr-x | scripts/kconfig/gconf-cfg.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/kconfig/gconf-cfg.sh b/scripts/kconfig/gconf-cfg.sh index cbd90c28c05f..040d8f338820 100755 --- a/scripts/kconfig/gconf-cfg.sh +++ b/scripts/kconfig/gconf-cfg.sh @@ -1,6 +1,9 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 +cflags=$1 +libs=$2 + PKG="gtk+-2.0 gmodule-2.0 libglade-2.0" if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then @@ -26,5 +29,5 @@ if ! ${HOSTPKG_CONFIG} --atleast-version=2.0.0 gtk+-2.0; then exit 1 fi -echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG)\" -echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG)\" +${HOSTPKG_CONFIG} --cflags ${PKG} > ${cflags} +${HOSTPKG_CONFIG} --libs ${PKG} > ${libs} |