Commit 1d225777 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kbuild-fixes-v4.19' of...

Merge tag 'kbuild-fixes-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - make setlocalversion more robust about -dirty check

 - loosen the pkg-config requirement for Kconfig

 - change missing depmod to a warning from an error

 - warn modules_install when System.map is missing

* tag 'kbuild-fixes-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: modules_install: warn when missing System.map file
  kbuild: make missing $DEPMOD a Warning instead of an Error
  kconfig: do not require pkg-config on make {menu,n}config
  kconfig: remove a spurious self-assignment
  scripts/setlocalversion: git: Make -dirty check more robust
parents f8f65382 f0b0d88a
...@@ -86,7 +86,7 @@ pkg-config ...@@ -86,7 +86,7 @@ pkg-config
The build system, as of 4.18, requires pkg-config to check for installed The build system, as of 4.18, requires pkg-config to check for installed
kconfig tools and to determine flags settings for use in kconfig tools and to determine flags settings for use in
'make {menu,n,g,x}config'. Previously pkg-config was being used but not 'make {g,x}config'. Previously pkg-config was being used but not
verified or documented. verified or documented.
Flex Flex
......
...@@ -11,13 +11,14 @@ DEPMOD=$1 ...@@ -11,13 +11,14 @@ DEPMOD=$1
KERNELRELEASE=$2 KERNELRELEASE=$2
if ! test -r System.map ; then if ! test -r System.map ; then
echo "Warning: modules_install: missing 'System.map' file. Skipping depmod." >&2
exit 0 exit 0
fi fi
if [ -z $(command -v $DEPMOD) ]; then if [ -z $(command -v $DEPMOD) ]; then
echo "'make modules_install' requires $DEPMOD. Please install it." >&2 echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
echo "This is probably in the kmod package." >&2 echo "This is probably in the kmod package." >&2
exit 1 exit 0
fi fi
# older versions of depmod require the version string to start with three # older versions of depmod require the version string to start with three
......
...@@ -221,7 +221,6 @@ $(obj)/zconf.tab.o: $(obj)/zconf.lex.c ...@@ -221,7 +221,6 @@ $(obj)/zconf.tab.o: $(obj)/zconf.lex.c
# check if necessary packages are available, and configure build flags # check if necessary packages are available, and configure build flags
define filechk_conf_cfg define filechk_conf_cfg
$(CONFIG_SHELL) $(srctree)/scripts/kconfig/check-pkgconfig.sh; \
$(CONFIG_SHELL) $< $(CONFIG_SHELL) $<
endef endef
......
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Check for pkg-config presence
if [ -z $(command -v pkg-config) ]; then
echo "'make *config' requires 'pkg-config'. Please install it." 1>&2
exit 1
fi
...@@ -3,6 +3,13 @@ ...@@ -3,6 +3,13 @@
PKG="gtk+-2.0 gmodule-2.0 libglade-2.0" PKG="gtk+-2.0 gmodule-2.0 libglade-2.0"
if [ -z "$(command -v pkg-config)" ]; then
echo >&2 "*"
echo >&2 "* 'make gconfig' requires 'pkg-config'. Please install it."
echo >&2 "*"
exit 1
fi
if ! pkg-config --exists $PKG; then if ! pkg-config --exists $PKG; then
echo >&2 "*" echo >&2 "*"
echo >&2 "* Unable to find the GTK+ installation. Please make sure that" echo >&2 "* Unable to find the GTK+ installation. Please make sure that"
......
...@@ -4,20 +4,23 @@ ...@@ -4,20 +4,23 @@
PKG="ncursesw" PKG="ncursesw"
PKG2="ncurses" PKG2="ncurses"
if pkg-config --exists $PKG; then if [ -n "$(command -v pkg-config)" ]; then
echo cflags=\"$(pkg-config --cflags $PKG)\" if pkg-config --exists $PKG; then
echo libs=\"$(pkg-config --libs $PKG)\" echo cflags=\"$(pkg-config --cflags $PKG)\"
exit 0 echo libs=\"$(pkg-config --libs $PKG)\"
fi exit 0
fi
if pkg-config --exists $PKG2; then if pkg-config --exists $PKG2; then
echo cflags=\"$(pkg-config --cflags $PKG2)\" echo cflags=\"$(pkg-config --cflags $PKG2)\"
echo libs=\"$(pkg-config --libs $PKG2)\" echo libs=\"$(pkg-config --libs $PKG2)\"
exit 0 exit 0
fi
fi fi
# Unfortunately, some distributions (e.g. openSUSE) cannot find ncurses # Check the default paths in case pkg-config is not installed.
# by pkg-config. # (Even if it is installed, some distributions such as openSUSE cannot
# find ncurses by pkg-config.)
if [ -f /usr/include/ncursesw/ncurses.h ]; then if [ -f /usr/include/ncursesw/ncurses.h ]; then
echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\" echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\"
echo libs=\"-lncursesw\" echo libs=\"-lncursesw\"
......
...@@ -490,7 +490,6 @@ static void build_conf(struct menu *menu) ...@@ -490,7 +490,6 @@ static void build_conf(struct menu *menu)
switch (prop->type) { switch (prop->type) {
case P_MENU: case P_MENU:
child_count++; child_count++;
prompt = prompt;
if (single_menu_mode) { if (single_menu_mode) {
item_make("%s%*c%s", item_make("%s%*c%s",
menu->data ? "-->" : "++>", menu->data ? "-->" : "++>",
......
...@@ -4,20 +4,23 @@ ...@@ -4,20 +4,23 @@
PKG="ncursesw menuw panelw" PKG="ncursesw menuw panelw"
PKG2="ncurses menu panel" PKG2="ncurses menu panel"
if pkg-config --exists $PKG; then if [ -n "$(command -v pkg-config)" ]; then
echo cflags=\"$(pkg-config --cflags $PKG)\" if pkg-config --exists $PKG; then
echo libs=\"$(pkg-config --libs $PKG)\" echo cflags=\"$(pkg-config --cflags $PKG)\"
exit 0 echo libs=\"$(pkg-config --libs $PKG)\"
fi exit 0
fi
if pkg-config --exists $PKG2; then if pkg-config --exists $PKG2; then
echo cflags=\"$(pkg-config --cflags $PKG2)\" echo cflags=\"$(pkg-config --cflags $PKG2)\"
echo libs=\"$(pkg-config --libs $PKG2)\" echo libs=\"$(pkg-config --libs $PKG2)\"
exit 0 exit 0
fi
fi fi
# Unfortunately, some distributions (e.g. openSUSE) cannot find ncurses # Check the default paths in case pkg-config is not installed.
# by pkg-config. # (Even if it is installed, some distributions such as openSUSE cannot
# find ncurses by pkg-config.)
if [ -f /usr/include/ncursesw/ncurses.h ]; then if [ -f /usr/include/ncursesw/ncurses.h ]; then
echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\" echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\"
echo libs=\"-lncursesw -lmenuw -lpanelw\" echo libs=\"-lncursesw -lmenuw -lpanelw\"
......
...@@ -4,6 +4,13 @@ ...@@ -4,6 +4,13 @@
PKG="Qt5Core Qt5Gui Qt5Widgets" PKG="Qt5Core Qt5Gui Qt5Widgets"
PKG2="QtCore QtGui" PKG2="QtCore QtGui"
if [ -z "$(command -v pkg-config)" ]; then
echo >&2 "*"
echo >&2 "* 'make xconfig' requires 'pkg-config'. Please install it."
echo >&2 "*"
exit 1
fi
if pkg-config --exists $PKG; then if pkg-config --exists $PKG; then
echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)\" echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)\"
echo libs=\"$(pkg-config --libs $PKG)\" echo libs=\"$(pkg-config --libs $PKG)\"
......
...@@ -74,7 +74,7 @@ scm_version() ...@@ -74,7 +74,7 @@ scm_version()
fi fi
# Check for uncommitted changes # Check for uncommitted changes
if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then if git status -uno --porcelain | grep -qv '^.. scripts/package'; then
printf '%s' -dirty printf '%s' -dirty
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment