blob: f1a3ac3ad2ed2e90252f02dbeaffe36452b55839 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001From eb14aa66dc0384071af401cced8c02993b55502e Mon Sep 17 00:00:00 2001
2From: Jonathan Richardson <jonathan.richardson@broadcom.com>
3Date: Wed, 26 Feb 2020 15:54:51 -0800
4Subject: [PATCH] autotools: Add include path to generated version.h
5
6When the build dir isn't the same as source dir it fails to compile
7because the generated version.h from AC_CONFIG_FILES is always in build
8dir. Include the path to it in AM_CPPFLAGS.
9
10Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
11
12---
Patrick Williams520786c2023-06-25 16:20:36 -050013Upstream-Status: Pending
14
Andrew Geissler82c905d2020-04-13 13:39:40 -050015 Makefile.am | 3 +++
16 1 file changed, 3 insertions(+)
17
18diff --git a/Makefile.am b/Makefile.am
19index 0fb9bb0..2952019 100644
20--- a/Makefile.am
21+++ b/Makefile.am
22@@ -14,6 +14,9 @@ endif
23 AM_CPPFLAGS = -I${srcdir}/include -DSYSCONFDIR="\"${sysconfdir}\"" \
24 -D_FORTIFY_SOURCE=2
25
26+# Required for the generated version.h when build dir is not the same as srcdir.
27+AM_CPPFLAGS += -I${top_builddir}/include
28+
29 ACLOCAL_AMFLAGS = -I m4
30
31 parse_cli.o: CFLAGS+=-U_FORTIFY_SOURCE -Wno-error