OpenCloudOS-Kernel/scripts/kconfig/lxdialog
Yann E. MORIN cdf0c2cfd7 kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.h
The current code does this:

    if [ -f /usr/include/ncursesw/curses.h ]; then
        echo '-I/usr/include/ncursesw -DCURSES_LOC="<ncursesw/curses.h>"'
    elif [ -f /usr/include/ncurses/ncurses.h ]; then
        echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
    elif [ -f /usr/include/ncurses/curses.h ]; then
        echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
    [...]

This is merely inconsistent:
  - adding the full path to the directory in the -I directive,
  - especially since that path is already a sub-path of the system
    include path,
  - and then repeating the sub-path in the #include directive.

Rationalise each include directive:
  - only use the filename in the #include directive,
  - keep the -I directives: they are always searched for before the
    system include path; this ensures the correct header is used.

Using the -I directives and the filename-only in #include is more in
line with how pkg-config behaves, eg.:
    $ pkg-config --cflags ncursesw
    -I/usr/include/ncursesw

This paves the way for using pkg-config for CFLAGS, too, now we use it
to find the libraries.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-04-16 22:00:32 +02:00
..
.gitignore gitignore: ignore more generated files 2006-01-03 11:35:26 +01:00
BIG.FAT.WARNING kconfig: move lxdialog to scripts/kconfig/lxdialog 2005-12-16 21:35:19 +01:00
check-lxdialog.sh kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.h 2013-04-16 22:00:32 +02:00
checklist.c menuconfig: truncate list items 2010-06-03 13:41:02 +02:00
dialog.h menuconfig: Add "breadcrumbs" navigation aid 2013-04-16 22:00:31 +02:00
inputbox.c menuconfig:inputbox: support navigate input position 2012-12-25 23:42:37 +01:00
menubox.c menuconfig: Add Save/Load buttons 2013-01-16 00:00:34 +01:00
textbox.c menuconfig: Assign jump keys per-page instead of globally 2012-09-27 18:09:24 +02:00
util.c menuconfig: Add "breadcrumbs" navigation aid 2013-04-16 22:00:31 +02:00
yesno.c kconfig: gettext support for lxdialog 2008-01-28 23:14:39 +01:00