From 2ca1021168f418a5da9941a3caa0ac2e96587ea6 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 16 Sep 2015 16:10:34 +0200 Subject: [PATCH] systemd/build: split CPPFLAGS to only include needed paths Optimally, we only make use of systemd API that is intended to be public and that will be later part of the system-library. That is currently not yet possible and we need "-Isrc/systemd/src/basic" to build "nm-dhcp-systemd.h". Still, split the include paths to build systemd code itself, contrary to the user of the API. --- src/Makefile.am | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 61e4c2a4a2..9d1cb310c1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -55,14 +55,11 @@ noinst_LTLIBRARIES = \ # libsystemd-nm ###################### -SYSTEMD_NM_CFLAGS = \ +SYSTEMD_NM_CFLAGS_PATHS = \ -I$(top_srcdir)/src/systemd/src/systemd \ -I$(top_srcdir)/src/systemd/src/libsystemd-network \ -I$(top_srcdir)/src/systemd/src/basic \ - -I$(top_srcdir)/src/systemd/src/shared \ - -I$(top_srcdir)/src/systemd \ - -I$(top_srcdir)/libnm-core \ - -I$(top_builddir)/libnm-core + -I$(top_srcdir)/src/systemd libsystemd_nm_la_SOURCES = \ systemd/nm-sd-adapt.c \ @@ -133,7 +130,10 @@ libsystemd_nm_la_SOURCES = \ libsystemd_nm_la_CPPFLAGS = \ -I$(top_srcdir)/include \ - $(SYSTEMD_NM_CFLAGS) \ + -I$(top_srcdir)/libnm-core \ + -I$(top_builddir)/libnm-core \ + $(SYSTEMD_NM_CFLAGS_PATHS) \ + -I$(top_srcdir)/src/systemd/src/shared \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_SYSTEMD \ $(GLIB_CFLAGS) @@ -398,7 +398,7 @@ AM_CPPFLAGS += \ $(LIBAUDIT_CFLAGS) \ $(SYSTEMD_LOGIN_CFLAGS) \ $(SYSTEMD_JOURNAL_CFLAGS) \ - $(SYSTEMD_NM_CFLAGS) \ + $(SYSTEMD_NM_CFLAGS_PATHS) \ \ -DBINDIR=\"$(bindir)\" \ -DDATADIR=\"$(datadir)\" \