History

kconfig: if ncurses-devel is missing then say so

With this patch when ncurses-devel (or whatever it is named) is missing trying to run menuconfig will result in this: $ make menuconfig HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o *** Unable to find the ncurses libraries or the *** required header files. *** 'make menuconfig' requires the ncurses libraries. *** *** Install ncurses (ncurses-devel) and try again. *** make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1 make: *** [menuconfig] Error 2 Much better than before where we just listed some build errors. The other *config targets will work indepenednt on ncurses being present or not. Includes improvements suggested by: Frans Pop <elendil@planet.nl>

Sam Ravnborg committed 18 years ago

Commit 6e588f61 parent 551559e2 files · +17 −13Browse files

Showing the changes to scripts (2 of 2 files). Show all

Unified · Split

2 files
  1. scripts/kconfig/Makefile +8 −6
  2. scripts/kconfig/lxdialog/check-lxdialog.sh +9 −7
scripts/kconfig/Makefile+8−6
@@ -93,12 +93,6 @@ HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) · 92 unmodified lines
9393
9494 HOST_EXTRACFLAGS += -DLOCALE
9595
96−PHONY += $(obj)/dochecklxdialog
97−$(obj)/dochecklxdialog:
98− $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES)
99−
100−always := dochecklxdialog
101−
10296
10397 # ===========================================================================
10498 # Shared Makefile for the various kconfig executables:
@@ -145,6 +139,14 @@ clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ · 40 unmodified lines
145139 .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
146140 clean-files += mconf qconf gconf
147141
142+# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
143+PHONY += $(obj)/dochecklxdialog
144+$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
145+$(obj)/dochecklxdialog:
146+ $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES)
147+
148+always := dochecklxdialog
149+
148150 # Add environment specific flags
149151 HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
150152
scripts/kconfig/lxdialog/check-lxdialog.sh+9−7
@@ -36,14 +36,16 @@ trap "rm -f $tmp" 0 1 2 3 15 · 35 unmodified lines
3636
3737 # Check if we can link to ncurses
3838 check() {
39− echo "main() {}" | $cc -xc - -o $tmp 2> /dev/null
39+ echo -e " #include CURSES_LOC \n main() {}" |
40+ $cc -xc - -o $tmp 2> /dev/null
4041 if [ $? != 0 ]; then
41− echo " *** Unable to find the ncurses libraries." 1>&2
42− echo " *** make menuconfig require the ncurses libraries" 1>&2
43− echo " *** " 1>&2
44− echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
45− echo " *** " 1>&2
46− exit 1
42+ echo " *** Unable to find the ncurses libraries or the" 1>&2
43+ echo " *** required header files." 1>&2
44+ echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
45+ echo " *** " 1>&2
46+ echo " *** Install ncurses (ncurses-devel) and try again." 1>&2
47+ echo " *** " 1>&2
48+ exit 1
4749 fi
4850 }
4951

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t