mirror of
https://git.busybox.net/busybox
synced 2026-01-26 16:17:50 +00:00
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>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
||
|---|---|---|
| .. | ||
| basic | ||
| kconfig | ||
| bb_release | ||
| bloat-o-meter | ||
| checkhelp.awk | ||
| checkstack.pl | ||
| cleanup_printf2puts | ||
| echo.c | ||
| find_bad_common_bufsiz | ||
| find_stray_common_vars | ||
| find_stray_empty_lines | ||
| fix_ws.sh | ||
| gcc-version.sh | ||
| gen_build_files.sh | ||
| Kbuild.include | ||
| Kbuild.src | ||
| Makefile.build | ||
| Makefile.clean | ||
| Makefile.host | ||
| Makefile.IMA | ||
| Makefile.lib | ||
| memusage | ||
| mkconfigs | ||
| mkdiff_obj | ||
| mkdiff_obj_bloat | ||
| mkmakefile | ||
| objsizes | ||
| randomtest | ||
| randomtest.loop | ||
| sample_pmap | ||
| showasm | ||
| test_make_clean | ||
| test_make_O | ||
| trylink | ||