diff mbox series

[v3,15/20] build: move handling of include files to include dir

Message ID 1507226415-26756-16-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v3,1/20] .gitignore: ignore only libtool m4 files | expand

Commit Message

Github ODP bot Oct. 5, 2017, 6 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


There is little point in handling common headers in platform-specific
dir. Move respective definitions to include/Makefie.am.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 213 (lumag:plat-def)
 ** https://github.com/Linaro/odp/pull/213
 ** Patch: https://github.com/Linaro/odp/pull/213.patch
 ** Base sha: 52cfe7ba6d2541cf5ee464e46e91b2da5efe1497
 ** Merge commit sha: 4157d06d3a16265d7d6152d7ae4918ec5623c10c
 **/
 Makefile.am                        |  1 +
 configure.ac                       |  7 +--
 include/Makefile.am                | 87 ++++++++++++++++++++++++++++++++++++++
 platform/Makefile.inc              | 67 -----------------------------
 platform/linux-generic/Makefile.am | 14 ------
 5 files changed, 92 insertions(+), 84 deletions(-)
 create mode 100644 include/Makefile.am
diff mbox series

Patch

diff --git a/Makefile.am b/Makefile.am
index 0c28eb0c7..af0d2f51c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,6 +5,7 @@  AM_DISTCHECK_CONFIGURE_FLAGS = --enable-user-guides	\
 
 #@with_platform@ works alone in subdir but not as part of a path???
 SUBDIRS = \
+	  include \
 	  test_common \
 	  helper \
 	  @platform_with_platform@ \
diff --git a/configure.ac b/configure.ac
index 87362bd41..3209ade8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,9 +16,6 @@  ODP_VERSION_API_MAJOR=odpapi_major_version
 AC_SUBST(ODP_VERSION_API_MAJOR)
 ODP_VERSION_API_MINOR=odpapi_minor_version
 AC_SUBST(ODP_VERSION_API_MINOR)
-AC_CONFIG_FILES([include/odp/api/spec/version.h
-                 include/odp/api/spec/deprecated.h])
-
 AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects foreign nostdinc])
 AC_CONFIG_SRCDIR([include/odp/api/spec/init.h])
 AM_CONFIG_HEADER([include/config.h])
@@ -353,6 +350,10 @@  CFLAGS="$CFLAGS $ODP_CFLAGS"
 CXXFLAGS="$CXXFLAGS $ODP_CXXFLAGS"
 
 AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([include/Makefile
+		 include/odp/api/spec/version.h
+		 include/odp/api/spec/deprecated.h])
+
 
 ##########################################################################
 # distribute the changed variables among the Makefiles
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 000000000..236c4c375
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,87 @@ 
+include_HEADERS = \
+		  odp.h \
+		  odp_api.h
+
+odpapispecincludedir= $(includedir)/odp/api/spec
+odpapispecinclude_HEADERS = \
+		  odp/api/spec/align.h \
+		  odp/api/spec/atomic.h \
+		  odp/api/spec/barrier.h \
+		  odp/api/spec/buffer.h \
+		  odp/api/spec/byteorder.h \
+		  odp/api/spec/classification.h \
+		  odp/api/spec/compiler.h \
+		  odp/api/spec/cpu.h \
+		  odp/api/spec/cpumask.h \
+		  odp/api/spec/crypto.h \
+		  odp/api/spec/debug.h \
+		  odp/api/spec/errno.h \
+		  odp/api/spec/event.h \
+		  odp/api/spec/hash.h \
+		  odp/api/spec/hints.h \
+		  odp/api/spec/init.h \
+		  odp/api/spec/packet.h \
+		  odp/api/spec/packet_flags.h \
+		  odp/api/spec/packet_io.h \
+		  odp/api/spec/packet_io_stats.h \
+		  odp/api/spec/pool.h \
+		  odp/api/spec/queue.h \
+		  odp/api/spec/random.h \
+		  odp/api/spec/rwlock.h \
+		  odp/api/spec/rwlock_recursive.h \
+		  odp/api/spec/schedule.h \
+		  odp/api/spec/schedule_types.h \
+		  odp/api/spec/shared_memory.h \
+		  odp/api/spec/spinlock.h \
+		  odp/api/spec/spinlock_recursive.h \
+		  odp/api/spec/std_clib.h \
+		  odp/api/spec/std_types.h \
+		  odp/api/spec/sync.h \
+		  odp/api/spec/system_info.h \
+		  odp/api/spec/thread.h \
+		  odp/api/spec/thrmask.h \
+		  odp/api/spec/ticketlock.h \
+		  odp/api/spec/time.h \
+		  odp/api/spec/timer.h \
+		  odp/api/spec/traffic_mngr.h
+
+nodist_odpapispecinclude_HEADERS = \
+		  odp/api/spec/deprecated.h \
+		  odp/api/spec/version.h
+
+odpapiabidefaultincludedir= $(includedir)/odp/arch/default/api/abi
+odpapiabidefaultinclude_HEADERS = \
+	odp/arch/default/api/abi/buffer.h \
+	odp/arch/default/api/abi/classification.h \
+	odp/arch/default/api/abi/crypto.h \
+	odp/arch/default/api/abi/event.h \
+	odp/arch/default/api/abi/packet.h \
+	odp/arch/default/api/abi/pool.h \
+	odp/arch/default/api/abi/queue.h \
+	odp/arch/default/api/abi/shared_memory.h
+
+odpapiabiarchincludedir= $(includedir)/odp/arch/@ARCH_ABI@/odp/api/abi
+odpapiabiarchinclude_HEADERS = \
+	odp/arch/@ARCH_ABI@/odp/api/abi/buffer.h \
+	odp/arch/@ARCH_ABI@/odp/api/abi/classification.h \
+	odp/arch/@ARCH_ABI@/odp/api/abi/crypto.h \
+	odp/arch/@ARCH_ABI@/odp/api/abi/event.h \
+	odp/arch/@ARCH_ABI@/odp/api/abi/packet.h \
+	odp/arch/@ARCH_ABI@/odp/api/abi/pool.h \
+	odp/arch/@ARCH_ABI@/odp/api/abi/queue.h \
+	odp/arch/@ARCH_ABI@/odp/api/abi/shared_memory.h
+
+# Create symlink for ABI header files. Application does not need to use the arch
+# specific include path for installed files.
+install-data-hook:
+	if [ -h $(DESTDIR)$(prefix)/include/odp/api/abi ]; then \
+		: ; \
+	else \
+		$(LN_S) -rf $(DESTDIR)$(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \
+			$(DESTDIR)$(prefix)/include/odp/api/abi; \
+	fi
+
+# Rerefence all nodist_*_HEADERS here
+.PHONY: $(nodist_odpapispecinclude_HEADERS)
+$(nodist_odpapispecinclude_HEADERS):
+	$(MAKE) -C $(top_builddir) $(subdir)/$@
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index b1eeb361a..0086db779 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -12,70 +12,3 @@  AM_CFLAGS = "-DGIT_HASH=$(VERSION)"
 AM_CFLAGS += $(VISIBILITY_CFLAGS)
 
 AM_CFLAGS += @PTHREAD_CFLAGS@
-
-odpapispecincludedir= $(includedir)/odp/api/spec
-odpapispecinclude_HEADERS = \
-		  $(top_srcdir)/include/odp/api/spec/align.h \
-		  $(top_srcdir)/include/odp/api/spec/atomic.h \
-		  $(top_srcdir)/include/odp/api/spec/barrier.h \
-		  $(top_srcdir)/include/odp/api/spec/buffer.h \
-		  $(top_srcdir)/include/odp/api/spec/byteorder.h \
-		  $(top_srcdir)/include/odp/api/spec/classification.h \
-		  $(top_srcdir)/include/odp/api/spec/compiler.h \
-		  $(top_srcdir)/include/odp/api/spec/cpu.h \
-		  $(top_srcdir)/include/odp/api/spec/cpumask.h \
-		  $(top_srcdir)/include/odp/api/spec/crypto.h \
-		  $(top_srcdir)/include/odp/api/spec/debug.h \
-		  $(top_srcdir)/include/odp/api/spec/errno.h \
-		  $(top_srcdir)/include/odp/api/spec/event.h \
-		  $(top_srcdir)/include/odp/api/spec/hash.h \
-		  $(top_srcdir)/include/odp/api/spec/hints.h \
-		  $(top_srcdir)/include/odp/api/spec/init.h \
-		  $(top_srcdir)/include/odp/api/spec/packet.h \
-		  $(top_srcdir)/include/odp/api/spec/packet_flags.h \
-		  $(top_srcdir)/include/odp/api/spec/packet_io.h \
-		  $(top_srcdir)/include/odp/api/spec/packet_io_stats.h \
-		  $(top_srcdir)/include/odp/api/spec/pool.h \
-		  $(top_srcdir)/include/odp/api/spec/queue.h \
-		  $(top_srcdir)/include/odp/api/spec/random.h \
-		  $(top_srcdir)/include/odp/api/spec/rwlock.h \
-		  $(top_srcdir)/include/odp/api/spec/rwlock_recursive.h \
-		  $(top_srcdir)/include/odp/api/spec/schedule.h \
-		  $(top_srcdir)/include/odp/api/spec/schedule_types.h \
-		  $(top_srcdir)/include/odp/api/spec/shared_memory.h \
-		  $(top_srcdir)/include/odp/api/spec/spinlock.h \
-		  $(top_srcdir)/include/odp/api/spec/spinlock_recursive.h \
-		  $(top_srcdir)/include/odp/api/spec/std_clib.h \
-		  $(top_srcdir)/include/odp/api/spec/std_types.h \
-		  $(top_srcdir)/include/odp/api/spec/sync.h \
-		  $(top_srcdir)/include/odp/api/spec/system_info.h \
-		  $(top_srcdir)/include/odp/api/spec/thread.h \
-		  $(top_srcdir)/include/odp/api/spec/thrmask.h \
-		  $(top_srcdir)/include/odp/api/spec/ticketlock.h \
-		  $(top_srcdir)/include/odp/api/spec/time.h \
-		  $(top_srcdir)/include/odp/api/spec/timer.h \
-		  $(top_srcdir)/include/odp/api/spec/traffic_mngr.h \
-		  $(top_builddir)/include/odp/api/spec/deprecated.h \
-		  $(top_builddir)/include/odp/api/spec/version.h
-
-odpapiabidefaultincludedir= $(includedir)/odp/arch/default/api/abi
-odpapiabidefaultinclude_HEADERS = \
-	$(top_srcdir)/include/odp/arch/default/api/abi/buffer.h \
-	$(top_srcdir)/include/odp/arch/default/api/abi/classification.h \
-	$(top_srcdir)/include/odp/arch/default/api/abi/crypto.h \
-	$(top_srcdir)/include/odp/arch/default/api/abi/event.h \
-	$(top_srcdir)/include/odp/arch/default/api/abi/packet.h \
-	$(top_srcdir)/include/odp/arch/default/api/abi/pool.h \
-	$(top_srcdir)/include/odp/arch/default/api/abi/queue.h \
-	$(top_srcdir)/include/odp/arch/default/api/abi/shared_memory.h
-
-odpapiabiarchincludedir= $(includedir)/odp/arch/@ARCH_ABI@/odp/api/abi
-odpapiabiarchinclude_HEADERS = \
-	$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/buffer.h \
-	$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/classification.h \
-	$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/crypto.h \
-	$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/event.h \
-	$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/packet.h \
-	$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/pool.h \
-	$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/queue.h \
-	$(top_srcdir)/include/odp/arch/@ARCH_ABI@/odp/api/abi/shared_memory.h
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 7d79ccfc4..5a8b39a8b 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -16,10 +16,6 @@  AM_CPPFLAGS +=  $(OPENSSL_CPPFLAGS)
 AM_CPPFLAGS +=  $(DPDK_CPPFLAGS)
 AM_CPPFLAGS +=  $(NETMAP_CPPFLAGS)
 
-include_HEADERS = \
-		  $(top_srcdir)/include/odp.h \
-		  $(top_srcdir)/include/odp_api.h
-
 odpincludedir= $(includedir)/odp
 odpinclude_HEADERS = \
 		  $(srcdir)/include/odp/visibility_begin.h \
@@ -278,13 +274,3 @@  __LIB__libodp_linux_la_LIBADD += $(TIMER_LIBS)
 if HAVE_PCAP
 __LIB__libodp_linux_la_LIBADD += $(PCAP_LIBS)
 endif
-
-# Create symlink for ABI header files. Application does not need to use the arch
-# specific include path for installed files.
-install-data-hook:
-	if [ -h $(DESTDIR)$(prefix)/include/odp/api/abi ]; then \
-		: ; \
-	else \
-		$(LN_S) -rf $(DESTDIR)$(prefix)/include/odp/arch/@ARCH_ABI@/odp/api/abi \
-			$(DESTDIR)$(prefix)/include/odp/api/abi; \
-	fi