Add HOSTPKG_CONFIG to allow tooling that builds the kernel to override what pkg-config and parameters are used.
Showing the changes to scripts (5 of 8 files). Show all
Unified · Split
| @@ -14,8 +14,8 @@ hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert · 13 unmodified lines | ||
| 14 | 14 | HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include |
| 15 | 15 | HOSTLDLIBS_sorttable = -lpthread |
| 16 | 16 | HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include |
| 17 | −HOSTCFLAGS_sign-file.o = $(shell pkg-config --cflags libcrypto 2> /dev/null) | |
| 18 | −HOSTLDLIBS_sign-file = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto) | |
| 17 | +HOSTCFLAGS_sign-file.o = $(shell $(HOSTPKG_CONFIG) --cflags libcrypto 2> /dev/null) | |
| 18 | +HOSTLDLIBS_sign-file = $(shell $(HOSTPKG_CONFIG) --libs libcrypto 2> /dev/null || echo -lcrypto) | |
| 19 | 19 | |
| 20 | 20 | ifdef CONFIG_UNWINDER_ORC |
| 21 | 21 | ifeq ($(ARCH),x86_64) |
| @@ -3,14 +3,14 @@ · 2 unmodified lines | ||
| 3 | 3 | |
| 4 | 4 | PKG="gtk+-2.0 gmodule-2.0 libglade-2.0" |
| 5 | 5 | |
| 6 | −if [ -z "$(command -v pkg-config)" ]; then | |
| 6 | +if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then | |
| 7 | 7 | echo >&2 "*" |
| 8 | − echo >&2 "* 'make gconfig' requires 'pkg-config'. Please install it." | |
| 8 | + echo >&2 "* 'make gconfig' requires '${HOSTPKG_CONFIG}'. Please install it." | |
| 9 | 9 | echo >&2 "*" |
| 10 | 10 | exit 1 |
| 11 | 11 | fi |
| 12 | 12 | |
| 13 | −if ! pkg-config --exists $PKG; then | |
| 13 | +if ! ${HOSTPKG_CONFIG} --exists $PKG; then | |
| 14 | 14 | echo >&2 "*" |
| 15 | 15 | echo >&2 "* Unable to find the GTK+ installation. Please make sure that" |
| 16 | 16 | echo >&2 "* the GTK+ 2.0 development package is correctly installed." |
| @@ -19,12 +19,12 @@ if ! pkg-config --exists $PKG; then · 2 unmodified lines | ||
| 19 | 19 | exit 1 |
| 20 | 20 | fi |
| 21 | 21 | |
| 22 | −if ! pkg-config --atleast-version=2.0.0 gtk+-2.0; then | |
| 22 | +if ! ${HOSTPKG_CONFIG} --atleast-version=2.0.0 gtk+-2.0; then | |
| 23 | 23 | echo >&2 "*" |
| 24 | 24 | echo >&2 "* GTK+ is present but version >= 2.0.0 is required." |
| 25 | 25 | echo >&2 "*" |
| 26 | 26 | exit 1 |
| 27 | 27 | fi |
| 28 | 28 | |
| 29 | −echo cflags=\"$(pkg-config --cflags $PKG)\" | |
| 30 | −echo libs=\"$(pkg-config --libs $PKG)\" | |
| 29 | +echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG)\" | |
| 30 | +echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG)\" | |
| @@ -4,16 +4,16 @@ · 3 unmodified lines | ||
| 4 | 4 | PKG="ncursesw" |
| 5 | 5 | PKG2="ncurses" |
| 6 | 6 | |
| 7 | −if [ -n "$(command -v pkg-config)" ]; then | |
| 8 | − if pkg-config --exists $PKG; then | |
| 9 | − echo cflags=\"$(pkg-config --cflags $PKG)\" | |
| 10 | − echo libs=\"$(pkg-config --libs $PKG)\" | |
| 7 | +if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then | |
| 8 | + if ${HOSTPKG_CONFIG} --exists $PKG; then | |
| 9 | + echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG)\" | |
| 10 | + echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG)\" | |
| 11 | 11 | exit 0 |
| 12 | 12 | fi |
| 13 | 13 | |
| 14 | − if pkg-config --exists $PKG2; then | |
| 15 | − echo cflags=\"$(pkg-config --cflags $PKG2)\" | |
| 16 | − echo libs=\"$(pkg-config --libs $PKG2)\" | |
| 14 | + if ${HOSTPKG_CONFIG} --exists $PKG2; then | |
| 15 | + echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG2)\" | |
| 16 | + echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG2)\" | |
| 17 | 17 | exit 0 |
| 18 | 18 | fi |
| 19 | 19 | fi |
| @@ -46,7 +46,7 @@ echo >&2 "* Unable to find the ncurses package." · 26 unmodified lines | ||
| 46 | 46 | echo >&2 "* Install ncurses (ncurses-devel or libncurses-dev" |
| 47 | 47 | echo >&2 "* depending on your distribution)." |
| 48 | 48 | echo >&2 "*" |
| 49 | −echo >&2 "* You may also need to install pkg-config to find the" | |
| 49 | +echo >&2 "* You may also need to install ${HOSTPKG_CONFIG} to find the" | |
| 50 | 50 | echo >&2 "* ncurses installed in a non-default location." |
| 51 | 51 | echo >&2 "*" |
| 52 | 52 | exit 1 |
| @@ -4,16 +4,16 @@ · 3 unmodified lines | ||
| 4 | 4 | PKG="ncursesw menuw panelw" |
| 5 | 5 | PKG2="ncurses menu panel" |
| 6 | 6 | |
| 7 | −if [ -n "$(command -v pkg-config)" ]; then | |
| 8 | − if pkg-config --exists $PKG; then | |
| 9 | − echo cflags=\"$(pkg-config --cflags $PKG)\" | |
| 10 | − echo libs=\"$(pkg-config --libs $PKG)\" | |
| 7 | +if [ -n "$(command -v ${HOSTPKG_CONFIG})" ]; then | |
| 8 | + if ${HOSTPKG_CONFIG} --exists $PKG; then | |
| 9 | + echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG)\" | |
| 10 | + echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG)\" | |
| 11 | 11 | exit 0 |
| 12 | 12 | fi |
| 13 | 13 | |
| 14 | − if pkg-config --exists $PKG2; then | |
| 15 | − echo cflags=\"$(pkg-config --cflags $PKG2)\" | |
| 16 | − echo libs=\"$(pkg-config --libs $PKG2)\" | |
| 14 | + if ${HOSTPKG_CONFIG} --exists $PKG2; then | |
| 15 | + echo cflags=\"$(${HOSTPKG_CONFIG} --cflags $PKG2)\" | |
| 16 | + echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG2)\" | |
| 17 | 17 | exit 0 |
| 18 | 18 | fi |
| 19 | 19 | fi |
| @@ -44,7 +44,7 @@ echo >&2 "* Unable to find the ncurses package." · 24 unmodified lines | ||
| 44 | 44 | echo >&2 "* Install ncurses (ncurses-devel or libncurses-dev" |
| 45 | 45 | echo >&2 "* depending on your distribution)." |
| 46 | 46 | echo >&2 "*" |
| 47 | −echo >&2 "* You may also need to install pkg-config to find the" | |
| 47 | +echo >&2 "* You may also need to install ${HOSTPKG_CONFIG} to find the" | |
| 48 | 48 | echo >&2 "* ncurses installed in a non-default location." |
| 49 | 49 | echo >&2 "*" |
| 50 | 50 | exit 1 |
| @@ -3,22 +3,22 @@ · 2 unmodified lines | ||
| 3 | 3 | |
| 4 | 4 | PKG="Qt5Core Qt5Gui Qt5Widgets" |
| 5 | 5 | |
| 6 | −if [ -z "$(command -v pkg-config)" ]; then | |
| 6 | +if [ -z "$(command -v ${HOSTPKG_CONFIG})" ]; then | |
| 7 | 7 | echo >&2 "*" |
| 8 | − echo >&2 "* 'make xconfig' requires 'pkg-config'. Please install it." | |
| 8 | + echo >&2 "* 'make xconfig' requires '${HOSTPKG_CONFIG}'. Please install it." | |
| 9 | 9 | echo >&2 "*" |
| 10 | 10 | exit 1 |
| 11 | 11 | fi |
| 12 | 12 | |
| 13 | −if pkg-config --exists $PKG; then | |
| 14 | − echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags $PKG)\" | |
| 15 | − echo libs=\"$(pkg-config --libs $PKG)\" | |
| 16 | − echo moc=\"$(pkg-config --variable=host_bins Qt5Core)/moc\" | |
| 13 | +if ${HOSTPKG_CONFIG} --exists $PKG; then | |
| 14 | + echo cflags=\"-std=c++11 -fPIC $(${HOSTPKG_CONFIG} --cflags $PKG)\" | |
| 15 | + echo libs=\"$(${HOSTPKG_CONFIG} --libs $PKG)\" | |
| 16 | + echo moc=\"$(${HOSTPKG_CONFIG} --variable=host_bins Qt5Core)/moc\" | |
| 17 | 17 | exit 0 |
| 18 | 18 | fi |
| 19 | 19 | |
| 20 | 20 | echo >&2 "*" |
| 21 | −echo >&2 "* Could not find Qt5 via pkg-config." | |
| 21 | +echo >&2 "* Could not find Qt5 via ${HOSTPKG_CONFIG}." | |
| 22 | 22 | echo >&2 "* Please install Qt5 and make sure it's in PKG_CONFIG_PATH" |
| 23 | 23 | echo >&2 "*" |
| 24 | 24 | exit 1 |