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