mirror of
https://github.com/mirror/make.git
synced 2025-03-26 01:30:31 +08:00
[SV 60378] Don't add duplicate default search directories
Depending on how make was configured it may add duplicate directories in the default include search path: avoid this. (Tweaked by psmith@gnu.org) * configure.ac: Set AM variable KNOWN_PREFIX if --prefix is known * Makefile.am: Only set INCLUDEDIR if prefix is not known * read.c [default_include_directories]: Only add INCLUDEDIR if set
This commit is contained in:
parent
297cb5adb7
commit
5e829188d3
@ -73,8 +73,12 @@ make_LDADD = $(LIBOBJS) $(_GUILE_LIBS) lib/libgnu.a $(GETLOADAVG_LIBS) \
|
|||||||
localedir = $(datadir)/locale
|
localedir = $(datadir)/locale
|
||||||
|
|
||||||
AM_CPPFLAGS = -Isrc -I$(top_srcdir)/src -Ilib -I$(top_srcdir)/lib \
|
AM_CPPFLAGS = -Isrc -I$(top_srcdir)/src -Ilib -I$(top_srcdir)/lib \
|
||||||
-DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" \
|
-DLIBDIR=\"$(libdir)\" -DLOCALEDIR=\"$(localedir)\"
|
||||||
-DLOCALEDIR=\"$(localedir)\"
|
|
||||||
|
# If prefix is not a standard location, look in prefix as well
|
||||||
|
if !KNOWN_PREFIX
|
||||||
|
AM_CPPFLAGS += -DINCLUDEDIR=\"$(includedir)\"
|
||||||
|
endif
|
||||||
|
|
||||||
AM_CFLAGS = $(_GUILE_CFLAGS)
|
AM_CFLAGS = $(_GUILE_CFLAGS)
|
||||||
|
|
||||||
|
@ -523,6 +523,11 @@ AS_IF([test "x$make_cv_posix_spawn" = xno && test "x$user_posix_spawn" = xyes],
|
|||||||
echo
|
echo
|
||||||
])
|
])
|
||||||
|
|
||||||
|
# autoconf initializes $prefix to NONE.
|
||||||
|
AM_CONDITIONAL([KNOWN_PREFIX],
|
||||||
|
[test "x$prefix" = xNONE -o "x$prefix" = x/usr/local \
|
||||||
|
-o "x$prefix" = x/usr/gnu -o "x$prefix" = x/usr])
|
||||||
|
|
||||||
# Specify what files are to be created.
|
# Specify what files are to be created.
|
||||||
AC_CONFIG_FILES([Makefile build.cfg lib/Makefile po/Makefile.in doc/Makefile \
|
AC_CONFIG_FILES([Makefile build.cfg lib/Makefile po/Makefile.in doc/Makefile \
|
||||||
tests/config-flags.pm])
|
tests/config-flags.pm])
|
||||||
|
@ -107,7 +107,9 @@ static const char *default_include_directories[] =
|
|||||||
This is defined as a placeholder. */
|
This is defined as a placeholder. */
|
||||||
# define INCLUDEDIR "."
|
# define INCLUDEDIR "."
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(INCLUDEDIR)
|
||||||
INCLUDEDIR,
|
INCLUDEDIR,
|
||||||
|
#endif
|
||||||
#ifndef _AMIGA
|
#ifndef _AMIGA
|
||||||
"/usr/gnu/include",
|
"/usr/gnu/include",
|
||||||
"/usr/local/include",
|
"/usr/local/include",
|
||||||
|
Loading…
Reference in New Issue
Block a user