From patchwork Fri Oct 6 19:00:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 115127 Delivered-To: patch@linaro.org Received: by 10.80.163.170 with SMTP id s39csp1717382edb; Fri, 6 Oct 2017 12:22:14 -0700 (PDT) X-Google-Smtp-Source: AOwi7QABxARvnaIuEJk3CsbFIkc2rWUaMdz99I9NLtyITiaAbuA5+F+B3y6Se1YOrCQ96V1Kp44D X-Received: by 10.36.84.82 with SMTP id t79mr4025634ita.98.1507317734116; Fri, 06 Oct 2017 12:22:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507317734; cv=none; d=google.com; s=arc-20160816; b=U/r44JYucpv7Es8lJ/F6UnmePcq+WKs93vjmhZgapTRY3aHA74r/UBrkSUzqsqFYMn /dm2De4Q/3n8wgoT8yAzB8xgRCL7GehbFlkcdmB6AxVd3aGwlSZWQod5kxeG0Eerpk6B 4zV9AyM2nwingwa5UYdu38HjXJ8NIAcS06Aws+PWUMCPelwaU6aTxvef2pdoJdwX5nqQ Bljcal91h8x5BTdltt/svTXMpV6faXtts9uRoBcSzDOMzpZQe/LXKBwRhTdxVieYicHf +qUMrV6j5J4PUkK2kdy9Xjv7uPEpyolC6cq7ZlqXIz4N3dR7NIioXsqtn2NifCR+Q9tq FiMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=a9Ge/53SHqKCmD/Y8McrkRTdgT6d4VDDzNEmK7oOI7Y=; b=VumhaT8nr4rlmdFB49HkSqr9Rid/8B8IZYTKEdoTJrO90DOzGhqk7P+cQzP3ff6JD/ s1EAoS6fqoF2Umk9NV05JYpon/+lPNfC5r7BZmM13W2jTl3+nFlOZDSqokdrA49ZWfA7 2Ac9RCZhqQHz4QbOev80Irf2GdB90Fd5QfSXujqQ7xeaqT3KPB8QqoB4vqTAz+YiQild bFI+J6JoTeRbqtVR1DAXPXqA7uz5HE8f4Da0FaZ8Z6JXnbn4HH1r4wKHoLG+8h+fDIQZ 0QcprAfdj7USaqtNSP8kmRAKQjPkn2rWAIARFeep8Jjm7xRKFp9FSqQ/zO8q/ogjVDxo Z3mg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f25si1618742ioj.105.2017.10.06.12.22.13; Fri, 06 Oct 2017 12:22:14 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 8ED7865BE4; Fri, 6 Oct 2017 19:22:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id F238F65BDD; Fri, 6 Oct 2017 19:03:51 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id CD8BB65BD4; Fri, 6 Oct 2017 19:03:28 +0000 (UTC) Received: from forward102j.mail.yandex.net (forward102j.mail.yandex.net [5.45.198.243]) by lists.linaro.org (Postfix) with ESMTPS id B8C7565BD4 for ; Fri, 6 Oct 2017 19:01:02 +0000 (UTC) Received: from mxback15g.mail.yandex.net (mxback15g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:94]) by forward102j.mail.yandex.net (Yandex) with ESMTP id C1E325601AC7 for ; Fri, 6 Oct 2017 22:01:01 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback15g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id J37qGNlKzx-0tniBXNQ; Fri, 06 Oct 2017 22:00:55 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id d2nf8B3eVo-0tted1U8; Fri, 06 Oct 2017 22:00:55 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Fri, 6 Oct 2017 22:00:10 +0300 Message-Id: <1507316415-2144-16-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507316415-2144-1-git-send-email-odpbot@yandex.ru> References: <1507316415-2144-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 213 Subject: [lng-odp] [PATCH v4 15/20] build: move handling of include files to include dir X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov 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 --- /** 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: a63f25ff2994b2df78c24f1f8b63d0e06628eb68 ** Merge commit sha: d50e2e291ff11c1319e66c699d2f82260d59c383 **/ 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 --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