nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Andi Kleen <ak@linux.intel.com>, linux-nvdimm@lists.01.org
Subject: [PATCH 3/3] Add pkg-config file for NUMA library
Date: Thu, 22 Mar 2018 12:33:22 -0600	[thread overview]
Message-ID: <20180322183322.23076-3-ross.zwisler@linux.intel.com> (raw)
In-Reply-To: <20180322183322.23076-1-ross.zwisler@linux.intel.com>

This is needed so that other projects can add a dependency on libnuma via
PKG_CHECK_MODULES([NUMA], [numa]).  This enabling makes 'make install' do
the right thing, and of course individual distros will need to add enabling
to their associated packages (rpm, deb, etc.) so the package manager
installs do the right thing.

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
---
 .gitignore  |  3 +++
 Makefile.am | 18 ++++++++++++++++++
 numa.pc.in  | 10 ++++++++++
 3 files changed, 31 insertions(+)
 create mode 100644 numa.pc.in

diff --git a/.gitignore b/.gitignore
index 68d5235..8cfe9f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,3 +59,6 @@
 /test-suite.log
 /test/*.log
 /test/*.trs
+
+# pkg-config file
+numa.pc
diff --git a/Makefile.am b/Makefile.am
index b6db339..ac4dc3c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
 
 ACLOCAL_AMFLAGS = -I m4
+CLEANFILES =
 
 AM_CPPFLAGS = -Wall
 
@@ -141,3 +142,20 @@ TESTS = \
 # These are known to be broken:
 #	test/prefered
 #	test/randmap
+
+SED_PROCESS = \
+        $(AM_V_GEN)$(SED) \
+        -e 's,@VERSION\@,$(VERSION),g' \
+        -e 's,@prefix\@,$(prefix),g' \
+        -e 's,@exec_prefix\@,$(exec_prefix),g' \
+        -e 's,@libdir\@,$(libdir),g' \
+        -e 's,@includedir\@,$(includedir),g' \
+        < $< > $@ || rm $@
+
+%.pc: %.pc.in Makefile
+	$(SED_PROCESS)
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = numa.pc
+EXTRA_DIST += numa.pc.in
+CLEANFILES += numa.pc
diff --git a/numa.pc.in b/numa.pc.in
new file mode 100644
index 0000000..8a0f202
--- /dev/null
+++ b/numa.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: numa
+Description: NUMA policy library
+Version: @VERSION@
+Cflags: -I${includedir}
+Libs: -L${libdir} -lnuma
-- 
2.14.3

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  parent reply	other threads:[~2018-03-22 18:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-22 18:33 [PATCH 1/3] Avoid filename truncation in numastat Ross Zwisler
2018-03-22 18:33 ` [PATCH 2/3] readdir_r(3) is deprecated, use readdir(3) instead Ross Zwisler
2018-03-22 18:33 ` Ross Zwisler [this message]
2018-04-05 15:01 ` [PATCH 1/3] Avoid filename truncation in numastat Ross Zwisler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180322183322.23076-3-ross.zwisler@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=ak@linux.intel.com \
    --cc=linux-nvdimm@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).