Include path ordering is important -- this was the cause of a build
failure reported at <https://trac.macports.org/ticket/56813>.
- Josh
From db7f2fb965e5a3f44d33251f83e4aacd35e245f8 Mon Sep 17 00:00:00 2001
From: Joshua Root <j...@macports.org>
Date: Mon, 16 Jul 2018 10:01:21 +1000
Subject: [PATCH] Put -I flags in CPPFLAGS
Apart from this being the correct place for them, it also fixes a
flag ordering issue. Libtool puts $*_CFLAGS after $CPPFLAGS in the
compilation command, which means any user-supplied include paths were
searched before the internal ones added here. This is a problem if
there are different headers with the same name in each location.
---
libfuse-lite/Makefile.am | 4 +++-
libntfs-3g/Makefile.am | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/libfuse-lite/Makefile.am b/libfuse-lite/Makefile.am
index d9591ec4..a3e937e9 100644
--- a/libfuse-lite/Makefile.am
+++ b/libfuse-lite/Makefile.am
@@ -7,7 +7,9 @@ endif
libfuse_lite_la_CFLAGS= \
$(AM_CFLAGS) \
- $(LIBFUSE_LITE_CFLAGS) \
+ $(LIBFUSE_LITE_CFLAGS)
+libfuse_lite_la_CPPFLAGS= \
+ $(AM_CPPFLAGS) \
-I$(top_srcdir)/include/fuse-lite
libfuse_lite_la_LIBADD = $(LIBFUSE_LITE_LIBS)
diff --git a/libntfs-3g/Makefile.am b/libntfs-3g/Makefile.am
index d6b150e5..6feba7d7 100644
--- a/libntfs-3g/Makefile.am
+++ b/libntfs-3g/Makefile.am
@@ -9,8 +9,8 @@ else
noinst_LTLIBRARIES = libntfs-3g.la
endif
-libntfs_3g_la_CFLAGS = $(AM_CFLAGS) -I$(top_srcdir)/include/ntfs-3g
-libntfs_3g_la_CPPFLAGS= $(AM_CPPFLAGS) $(LIBNTFS_CPPFLAGS)
+libntfs_3g_la_CFLAGS = $(AM_CFLAGS)
+libntfs_3g_la_CPPFLAGS= $(AM_CPPFLAGS) $(LIBNTFS_CPPFLAGS)
-I$(top_srcdir)/include/ntfs-3g
libntfs_3g_la_LIBADD = $(LIBNTFS_LIBS)
libntfs_3g_la_LDFLAGS = -version-info $(LIBNTFS_3G_VERSION) -no-undefined
--
2.18.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
ntfs-3g-devel mailing list
ntfs-3g-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel