diff options
author | Dmitry Goncharov <dgoncharov@users.sf.net> | 2021-04-17 17:50:07 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2021-05-30 15:11:30 -0400 |
commit | 5e829188d3595c8749f9e7bcbe4b515c085779a6 (patch) | |
tree | dbb3d92957c935e3044bacdab25327c96812bd7c /Makefile.am | |
parent | 297cb5adb7bdde0cb04462f05deba1fba26ccce9 (diff) | |
download | make-git-5e829188d3595c8749f9e7bcbe4b515c085779a6.tar.gz |
[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
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 2b5765e3..9be60fec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -73,8 +73,12 @@ make_LDADD = $(LIBOBJS) $(_GUILE_LIBS) lib/libgnu.a $(GETLOADAVG_LIBS) \ localedir = $(datadir)/locale AM_CPPFLAGS = -Isrc -I$(top_srcdir)/src -Ilib -I$(top_srcdir)/lib \ - -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" \ - -DLOCALEDIR=\"$(localedir)\" + -DLIBDIR=\"$(libdir)\" -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) |