Skip to content

Commit 1d22577

Browse files
committed
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
2 parents f8f6538 + f0b0d88 commit 1d22577

File tree

10 files changed

+47
-36
lines changed

10 files changed

+47
-36
lines changed

Documentation/process/changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ pkg-config
8686

8787
The build system, as of 4.18, requires pkg-config to check for installed
8888
kconfig tools and to determine flags settings for use in
89-
'make {menu,n,g,x}config'. Previously pkg-config was being used but not
89+
'make {g,x}config'. Previously pkg-config was being used but not
9090
verified or documented.
9191

9292
Flex

scripts/depmod.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ DEPMOD=$1
1111
KERNELRELEASE=$2
1212

1313
if ! test -r System.map ; then
14+
echo "Warning: modules_install: missing 'System.map' file. Skipping depmod." >&2
1415
exit 0
1516
fi
1617

1718
if [ -z $(command -v $DEPMOD) ]; then
18-
echo "'make modules_install' requires $DEPMOD. Please install it." >&2
19+
echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2
1920
echo "This is probably in the kmod package." >&2
20-
exit 1
21+
exit 0
2122
fi
2223

2324
# older versions of depmod require the version string to start with three

scripts/kconfig/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ $(obj)/zconf.tab.o: $(obj)/zconf.lex.c
221221

222222
# check if necessary packages are available, and configure build flags
223223
define filechk_conf_cfg
224-
$(CONFIG_SHELL) $(srctree)/scripts/kconfig/check-pkgconfig.sh; \
225224
$(CONFIG_SHELL) $<
226225
endef
227226

scripts/kconfig/check-pkgconfig.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

scripts/kconfig/gconf-cfg.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33

44
PKG="gtk+-2.0 gmodule-2.0 libglade-2.0"
55

6+
if [ -z "$(command -v pkg-config)" ]; then
7+
echo >&2 "*"
8+
echo >&2 "* 'make gconfig' requires 'pkg-config'. Please install it."
9+
echo >&2 "*"
10+
exit 1
11+
fi
12+
613
if ! pkg-config --exists $PKG; then
714
echo >&2 "*"
815
echo >&2 "* Unable to find the GTK+ installation. Please make sure that"

scripts/kconfig/mconf-cfg.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@
44
PKG="ncursesw"
55
PKG2="ncurses"
66

7-
if pkg-config --exists $PKG; then
8-
echo cflags=\"$(pkg-config --cflags $PKG)\"
9-
echo libs=\"$(pkg-config --libs $PKG)\"
10-
exit 0
11-
fi
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)\"
11+
exit 0
12+
fi
1213

13-
if pkg-config --exists $PKG2; then
14-
echo cflags=\"$(pkg-config --cflags $PKG2)\"
15-
echo libs=\"$(pkg-config --libs $PKG2)\"
16-
exit 0
14+
if pkg-config --exists $PKG2; then
15+
echo cflags=\"$(pkg-config --cflags $PKG2)\"
16+
echo libs=\"$(pkg-config --libs $PKG2)\"
17+
exit 0
18+
fi
1719
fi
1820

19-
# Unfortunately, some distributions (e.g. openSUSE) cannot find ncurses
20-
# by pkg-config.
21+
# Check the default paths in case pkg-config is not installed.
22+
# (Even if it is installed, some distributions such as openSUSE cannot
23+
# find ncurses by pkg-config.)
2124
if [ -f /usr/include/ncursesw/ncurses.h ]; then
2225
echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\"
2326
echo libs=\"-lncursesw\"

scripts/kconfig/mconf.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,6 @@ static void build_conf(struct menu *menu)
490490
switch (prop->type) {
491491
case P_MENU:
492492
child_count++;
493-
prompt = prompt;
494493
if (single_menu_mode) {
495494
item_make("%s%*c%s",
496495
menu->data ? "-->" : "++>",

scripts/kconfig/nconf-cfg.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@
44
PKG="ncursesw menuw panelw"
55
PKG2="ncurses menu panel"
66

7-
if pkg-config --exists $PKG; then
8-
echo cflags=\"$(pkg-config --cflags $PKG)\"
9-
echo libs=\"$(pkg-config --libs $PKG)\"
10-
exit 0
11-
fi
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)\"
11+
exit 0
12+
fi
1213

13-
if pkg-config --exists $PKG2; then
14-
echo cflags=\"$(pkg-config --cflags $PKG2)\"
15-
echo libs=\"$(pkg-config --libs $PKG2)\"
16-
exit 0
14+
if pkg-config --exists $PKG2; then
15+
echo cflags=\"$(pkg-config --cflags $PKG2)\"
16+
echo libs=\"$(pkg-config --libs $PKG2)\"
17+
exit 0
18+
fi
1719
fi
1820

19-
# Unfortunately, some distributions (e.g. openSUSE) cannot find ncurses
20-
# by pkg-config.
21+
# Check the default paths in case pkg-config is not installed.
22+
# (Even if it is installed, some distributions such as openSUSE cannot
23+
# find ncurses by pkg-config.)
2124
if [ -f /usr/include/ncursesw/ncurses.h ]; then
2225
echo cflags=\"-D_GNU_SOURCE -I/usr/include/ncursesw\"
2326
echo libs=\"-lncursesw -lmenuw -lpanelw\"

scripts/kconfig/qconf-cfg.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
PKG="Qt5Core Qt5Gui Qt5Widgets"
55
PKG2="QtCore QtGui"
66

7+
if [ -z "$(command -v pkg-config)" ]; then
8+
echo >&2 "*"
9+
echo >&2 "* 'make xconfig' requires 'pkg-config'. Please install it."
10+
echo >&2 "*"
11+
exit 1
12+
fi
13+
714
if pkg-config --exists $PKG; then
815
echo cflags=\"-std=c++11 -fPIC $(pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)\"
916
echo libs=\"$(pkg-config --libs $PKG)\"

scripts/setlocalversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ scm_version()
7474
fi
7575

7676
# Check for uncommitted changes
77-
if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then
77+
if git status -uno --porcelain | grep -qv '^.. scripts/package'; then
7878
printf '%s' -dirty
7979
fi
8080

0 commit comments

Comments
 (0)