From 90cc5460aa0e9ca10a0d7c8c44064fd14789f750 Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Fri, 1 May 2015 17:09:39 -0700 Subject: [PATCH] build-sys: add $(top_srcdir) to include search dir This is required for out-of-tree build to work, since many source files include e.g. proc/*.h which is not under the include/ directory. Tested that `make distcheck` starts working after this patch. Signed-off-by: Filipe Brandenburger --- Makefile.am | 1 + lib/Makefile.am | 5 ++++- proc/Makefile.am | 1 + ps/Makefile.am | 1 + top/Makefile.am | 1 + 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 45feab1d..9a9130c4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,6 +2,7 @@ AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ + -I$(top_srcdir) \ -I$(top_srcdir)/include \ -DLOCALEDIR=\"$(localedir)\" diff --git a/lib/Makefile.am b/lib/Makefile.am index 56c36a2f..f09cb8c0 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,4 +1,7 @@ -AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include +AM_CPPFLAGS = \ + -include $(top_builddir)/config.h \ + -I$(top_srcdir) \ + -I$(top_srcdir)/include AM_CPPFLAGS += -DTEST_PROGRAM diff --git a/proc/Makefile.am b/proc/Makefile.am index f000dbcb..5b0e84cc 100644 --- a/proc/Makefile.am +++ b/proc/Makefile.am @@ -1,6 +1,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ + -I$(top_srcdir) \ -I$(top_srcdir)/include \ -DLOCALEDIR=\"$(localedir)\" diff --git a/ps/Makefile.am b/ps/Makefile.am index e46f496f..c8e949aa 100644 --- a/ps/Makefile.am +++ b/ps/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ + -I$(top_srcdir) \ -I$(top_srcdir)/include \ -DLOCALEDIR=\"$(localedir)\" diff --git a/top/Makefile.am b/top/Makefile.am index bba36bc9..0cad3195 100644 --- a/top/Makefile.am +++ b/top/Makefile.am @@ -1,5 +1,6 @@ AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ + -I$(top_srcdir) \ -I$(top_srcdir)/include \ -DLOCALEDIR=\"$(localedir)\"