1*4882a593SmuzhiyunFrom eb14aa66dc0384071af401cced8c02993b55502e Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Jonathan Richardson <jonathan.richardson@broadcom.com>
3*4882a593SmuzhiyunDate: Wed, 26 Feb 2020 15:54:51 -0800
4*4882a593SmuzhiyunSubject: [PATCH] autotools: Add include path to generated version.h
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunWhen the build dir isn't the same as source dir it fails to compile
7*4882a593Smuzhiyunbecause the generated version.h from AC_CONFIG_FILES is always in build
8*4882a593Smuzhiyundir. Include the path to it in AM_CPPFLAGS.
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunSigned-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
11*4882a593Smuzhiyun
12*4882a593Smuzhiyun---
13*4882a593Smuzhiyun Makefile.am | 3 +++
14*4882a593Smuzhiyun 1 file changed, 3 insertions(+)
15*4882a593Smuzhiyun
16*4882a593Smuzhiyundiff --git a/Makefile.am b/Makefile.am
17*4882a593Smuzhiyunindex 0fb9bb0..2952019 100644
18*4882a593Smuzhiyun--- a/Makefile.am
19*4882a593Smuzhiyun+++ b/Makefile.am
20*4882a593Smuzhiyun@@ -14,6 +14,9 @@ endif
21*4882a593Smuzhiyun AM_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR="\"${sysconfdir}\"" \
22*4882a593Smuzhiyun 	-D_FORTIFY_SOURCE=2
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun+# Required for the generated version.h when build dir is not the same as srcdir.
25*4882a593Smuzhiyun+AM_CPPFLAGS += -I${top_builddir}/include
26*4882a593Smuzhiyun+
27*4882a593Smuzhiyun ACLOCAL_AMFLAGS = -I m4
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun parse_cli.o: CFLAGS+=-U_FORTIFY_SOURCE -Wno-error
30