diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 14:22:45 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 14:22:45 -0400 |
| commit | b4e2ed325560a009d8508ff933f4df906fa96775 (patch) | |
| tree | d3d4f3419ae266cd9c727da9ad6addb7f01ad831 /scripts | |
| parent | c66d70773ceca148e7c8970afcc67f7cb30ee0fd (diff) | |
| parent | 67d34a6a391369269a2e5dba8a5f42cc4cd50231 (diff) | |
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig changes from Michal Marek:
- kconfig Makefile portability fixes
- menuconfig/nconfig help pager usability fix
- .gitignore cleanup
- quoting fix in scripts/config
- Makefile prints errors to stderr
- support for arbitrarily log lines in .config
- fix oldnoconfig description in 'make help'
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kconfig: Document oldnoconfig to what it really does
nconf: add u, d command keys in scroll windows
menuconfig: add u, d, q command keys in text boxes
scripts/config: fix double-quotes un-escaping
kconfig: Print errors to stderr in the Makefile
kconfig: allow long lines in config file
kconfig: remove lkc_defs.h from .gitignore and dontdiff
xconfig: add quiet rule for moc
xconfig: use pkgconfig to find moc
kconfig: fix check-lxdialog for DLL platforms
kconfig: check ncursesw headers first in check-lxdialog
kconfig/nconf: fix compile with ncurses reentrant API
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/config | 2 | ||||
| -rw-r--r-- | scripts/kconfig/.gitignore | 1 | ||||
| -rw-r--r-- | scripts/kconfig/Makefile | 41 | ||||
| -rw-r--r-- | scripts/kconfig/confdata.c | 61 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/check-lxdialog.sh | 8 | ||||
| -rw-r--r-- | scripts/kconfig/lxdialog/textbox.c | 3 | ||||
| -rw-r--r-- | scripts/kconfig/mconf.c | 6 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.c | 10 | ||||
| -rw-r--r-- | scripts/kconfig/nconf.gui.c | 8 |
9 files changed, 104 insertions, 36 deletions
diff --git a/scripts/config b/scripts/config index ed6653ef9702..9e984bc96e18 100755 --- a/scripts/config +++ b/scripts/config | |||
| @@ -128,7 +128,7 @@ while [ "$1" != "" ] ; do | |||
| 128 | V="${V/#CONFIG_$ARG=/}" | 128 | V="${V/#CONFIG_$ARG=/}" |
| 129 | V="${V/#\"/}" | 129 | V="${V/#\"/}" |
| 130 | V="${V/%\"/}" | 130 | V="${V/%\"/}" |
| 131 | V="${V/\\\"/\"}" | 131 | V="${V//\\\"/\"}" |
| 132 | echo "${V}" | 132 | echo "${V}" |
| 133 | fi | 133 | fi |
| 134 | fi | 134 | fi |
diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore index ee120d441565..be603c4fef62 100644 --- a/scripts/kconfig/.gitignore +++ b/scripts/kconfig/.gitignore | |||
| @@ -7,7 +7,6 @@ config* | |||
| 7 | *.tab.h | 7 | *.tab.h |
| 8 | zconf.hash.c | 8 | zconf.hash.c |
| 9 | *.moc | 9 | *.moc |
| 10 | lkc_defs.h | ||
| 11 | gconf.glade.h | 10 | gconf.glade.h |
| 12 | *.pot | 11 | *.pot |
| 13 | *.mo | 12 | *.mo |
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 79662658fb91..77d53999ffb9 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -114,7 +114,7 @@ help: | |||
| 114 | @echo ' alldefconfig - New config with all symbols set to default' | 114 | @echo ' alldefconfig - New config with all symbols set to default' |
| 115 | @echo ' randconfig - New config with random answer to all options' | 115 | @echo ' randconfig - New config with random answer to all options' |
| 116 | @echo ' listnewconfig - List new options' | 116 | @echo ' listnewconfig - List new options' |
| 117 | @echo ' oldnoconfig - Same as silentoldconfig but set new symbols to n (unset)' | 117 | @echo ' oldnoconfig - Same as silentoldconfig but sets new symbols to their default value' |
| 118 | 118 | ||
| 119 | # lxdialog stuff | 119 | # lxdialog stuff |
| 120 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh | 120 | check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh |
| @@ -234,12 +234,12 @@ $(obj)/.tmp_qtcheck: | |||
| 234 | if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ | 234 | if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ |
| 235 | done; \ | 235 | done; \ |
| 236 | if [ -z "$$dir" ]; then \ | 236 | if [ -z "$$dir" ]; then \ |
| 237 | echo "*"; \ | 237 | echo >&2 "*"; \ |
| 238 | echo "* Unable to find any QT installation. Please make sure that"; \ | 238 | echo >&2 "* Unable to find any QT installation. Please make sure that"; \ |
| 239 | echo "* the QT4 or QT3 development package is correctly installed and"; \ | 239 | echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \ |
| 240 | echo "* either qmake can be found or install pkg-config or set"; \ | 240 | echo >&2 "* either qmake can be found or install pkg-config or set"; \ |
| 241 | echo "* the QTDIR environment variable to the correct location."; \ | 241 | echo >&2 "* the QTDIR environment variable to the correct location."; \ |
| 242 | echo "*"; \ | 242 | echo >&2 "*"; \ |
| 243 | false; \ | 243 | false; \ |
| 244 | fi; \ | 244 | fi; \ |
| 245 | libpath=$$dir/lib; lib=qt; osdir=""; \ | 245 | libpath=$$dir/lib; lib=qt; osdir=""; \ |
| @@ -260,8 +260,8 @@ $(obj)/.tmp_qtcheck: | |||
| 260 | else \ | 260 | else \ |
| 261 | cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \ | 261 | cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \ |
| 262 | libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \ | 262 | libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \ |
| 263 | binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \ | 263 | moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \ |
| 264 | moc="$$binpath/bin/moc"; \ | 264 | [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \ |
| 265 | fi; \ | 265 | fi; \ |
| 266 | echo "KC_QT_CFLAGS=$$cflags" > $@; \ | 266 | echo "KC_QT_CFLAGS=$$cflags" > $@; \ |
| 267 | echo "KC_QT_LIBS=$$libs" >> $@; \ | 267 | echo "KC_QT_LIBS=$$libs" >> $@; \ |
| @@ -279,17 +279,17 @@ $(obj)/.tmp_gtkcheck: | |||
| 279 | if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ | 279 | if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ |
| 280 | touch $@; \ | 280 | touch $@; \ |
| 281 | else \ | 281 | else \ |
| 282 | echo "*"; \ | 282 | echo >&2 "*"; \ |
| 283 | echo "* GTK+ is present but version >= 2.0.0 is required."; \ | 283 | echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \ |
| 284 | echo "*"; \ | 284 | echo >&2 "*"; \ |
| 285 | false; \ | 285 | false; \ |
| 286 | fi \ | 286 | fi \ |
| 287 | else \ | 287 | else \ |
| 288 | echo "*"; \ | 288 | echo >&2 "*"; \ |
| 289 | echo "* Unable to find the GTK+ installation. Please make sure that"; \ | 289 | echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \ |
| 290 | echo "* the GTK+ 2.0 development package is correctly installed..."; \ | 290 | echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \ |
| 291 | echo "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ | 291 | echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ |
| 292 | echo "*"; \ | 292 | echo >&2 "*"; \ |
| 293 | false; \ | 293 | false; \ |
| 294 | fi | 294 | fi |
| 295 | endif | 295 | endif |
| @@ -298,8 +298,11 @@ $(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c | |||
| 298 | 298 | ||
| 299 | $(obj)/qconf.o: $(obj)/qconf.moc | 299 | $(obj)/qconf.o: $(obj)/qconf.moc |
| 300 | 300 | ||
| 301 | $(obj)/%.moc: $(src)/%.h | 301 | quiet_cmd_moc = MOC $@ |
| 302 | $(KC_QT_MOC) -i $< -o $@ | 302 | cmd_moc = $(KC_QT_MOC) -i $< -o $@ |
| 303 | |||
| 304 | $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck | ||
| 305 | $(call cmd,moc) | ||
| 303 | 306 | ||
| 304 | # Extract gconf menu items for I18N support | 307 | # Extract gconf menu items for I18N support |
| 305 | $(obj)/gconf.glade.h: $(obj)/gconf.glade | 308 | $(obj)/gconf.glade.h: $(obj)/gconf.glade |
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 52577f052bc1..13ddf1126c2a 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
| @@ -182,10 +182,66 @@ static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) | |||
| 182 | return 0; | 182 | return 0; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | #define LINE_GROWTH 16 | ||
| 186 | static int add_byte(int c, char **lineptr, size_t slen, size_t *n) | ||
| 187 | { | ||
| 188 | char *nline; | ||
| 189 | size_t new_size = slen + 1; | ||
| 190 | if (new_size > *n) { | ||
| 191 | new_size += LINE_GROWTH - 1; | ||
| 192 | new_size *= 2; | ||
| 193 | nline = realloc(*lineptr, new_size); | ||
| 194 | if (!nline) | ||
| 195 | return -1; | ||
| 196 | |||
| 197 | *lineptr = nline; | ||
| 198 | *n = new_size; | ||
| 199 | } | ||
| 200 | |||
| 201 | (*lineptr)[slen] = c; | ||
| 202 | |||
| 203 | return 0; | ||
| 204 | } | ||
| 205 | |||
| 206 | static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream) | ||
| 207 | { | ||
| 208 | char *line = *lineptr; | ||
| 209 | size_t slen = 0; | ||
| 210 | |||
| 211 | for (;;) { | ||
| 212 | int c = getc(stream); | ||
| 213 | |||
| 214 | switch (c) { | ||
| 215 | case '\n': | ||
| 216 | if (add_byte(c, &line, slen, n) < 0) | ||
| 217 | goto e_out; | ||
| 218 | slen++; | ||
| 219 | /* fall through */ | ||
| 220 | case EOF: | ||
| 221 | if (add_byte('\0', &line, slen, n) < 0) | ||
| 222 | goto e_out; | ||
| 223 | *lineptr = line; | ||
| 224 | if (slen == 0) | ||
| 225 | return -1; | ||
| 226 | return slen; | ||
| 227 | default: | ||
| 228 | if (add_byte(c, &line, slen, n) < 0) | ||
| 229 | goto e_out; | ||
| 230 | slen++; | ||
| 231 | |||
