[minicoredumper] [PATCH 1/8] buildsystem: make use of 'config.h'

Juergen Borleis jbe at pengutronix.de
Mon Mar 11 11:23:11 CET 2019


Since the autotools provide all the collected information in a header file,
one should make use of it.

Signed-off-by: Juergen Borleis <jbe at pengutronix.de>
---
 src/common/Makefile.am         | 9 ++++++---
 src/minicoredumper/Makefile.am | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index 90f4a7b..2513db8 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -8,13 +8,16 @@ noinst_LIBRARIES = libmcdelf.a libmcdident.a
 noinst_LTLIBRARIES = libmcdident.la
 
 libmcdelf_a_SOURCES = common.h elf_dumplist.c
-libmcdelf_a_CPPFLAGS = $(MCD_CPPFLAGS)
+libmcdelf_a_CPPFLAGS = $(MCD_CPPFLAGS) \
+		-include $(top_builddir)/config.h
 libmcdelf_a_CFLAGS = $(MCD_CFLAGS)
 
 libmcdident_a_SOURCES = common.h invalid_ident.c
-libmcdident_a_CPPFLAGS = $(MCD_CPPFLAGS)
+libmcdident_a_CPPFLAGS = $(MCD_CPPFLAGS) \
+		-include $(top_builddir)/config.h
 libmcdident_a_CFLAGS = $(MCD_CFLAGS)
 
 libmcdident_la_SOURCES = common.h invalid_ident.c
-libmcdident_la_CPPFLAGS = $(libmcdident_a_CPPFLAGS)
+libmcdident_la_CPPFLAGS = $(libmcdident_a_CPPFLAGS) \
+		-include $(top_builddir)/config.h
 libmcdident_la_CFLAGS = $(libmcdident_a_CFLAGS)
diff --git a/src/minicoredumper/Makefile.am b/src/minicoredumper/Makefile.am
index fc4d98d..4cb45cf 100644
--- a/src/minicoredumper/Makefile.am
+++ b/src/minicoredumper/Makefile.am
@@ -13,6 +13,7 @@ EXTRA_DIST = $(man_MANS)
 minicoredumper_SOURCES = corestripper.c corestripper.h \
 			 prog_config.c prog_config.h
 minicoredumper_CPPFLAGS = $(MCD_CPPFLAGS) \
+			  -include $(top_builddir)/config.h \
 			  -I$(top_srcdir)/lib \
 			  -I$(top_srcdir)/src/api \
 			  -I$(top_srcdir)/src/common \
-- 
2.11.0




More information about the minicoredumper mailing list