diff mbox series

[v2] libpdbg: Add pkgconfig

Message ID 20201014181956.1188166-1-bradleyb@fuzziesquirrel.com
State Accepted
Headers show
Series [v2] libpdbg: Add pkgconfig | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (9fbe2a8b236967e0b2088dfa85a8e3d23ff01413)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Brad Bishop Oct. 14, 2020, 6:19 p.m. UTC
Add a pdbg.pc for build systems that make use of pkgconfig.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
---
 Makefile.am        |  3 +++
 configure.ac       |  1 +
 libpdbg/pdbg.pc.in | 11 +++++++++++
 3 files changed, 15 insertions(+)
 create mode 100644 libpdbg/pdbg.pc.in

Comments

Amitay Isaacs Oct. 16, 2020, 12:13 a.m. UTC | #1
On Wed, 2020-10-14 at 14:19 -0400, Brad Bishop wrote:
> Add a pdbg.pc for build systems that make use of pkgconfig.
> 
> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
> ---
>  Makefile.am        |  3 +++
>  configure.ac       |  1 +
>  libpdbg/pdbg.pc.in | 11 +++++++++++
>  3 files changed, 15 insertions(+)
>  create mode 100644 libpdbg/pdbg.pc.in
> 
> diff --git a/Makefile.am b/Makefile.am
> index dce09ab..385529c 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -122,6 +122,9 @@ pdbg_LDADD = libpdbg.la libccan.a \
>  pdbg_LDFLAGS = -Wl,--whole-archive,-lpdbg,--no-whole-archive
>  
>  lib_LTLIBRARIES = libpdbg.la
> +pkgconfiglibdir = ${libdir}/pkgconfig
> +pkgconfiglib_DATA = libpdbg/pdbg.pc
> +
>  noinst_LTLIBRARIES = libcronus.la libsbefifo.la
>  
>  libcronus_la_SOURCES = \
> diff --git a/configure.ac b/configure.ac
> index 0f8b9de..04b14aa 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -35,6 +35,7 @@ fi
>  AC_CONFIG_MACRO_DIR([m4])
>  AC_CONFIG_HEADERS([config.h])
>  AC_CONFIG_FILES([Makefile])
> +AC_CONFIG_FILES([libpdbg/pdbg.pc])
>  AC_LANG(C)
>  
>  case "$host" in
> diff --git a/libpdbg/pdbg.pc.in b/libpdbg/pdbg.pc.in
> new file mode 100644
> index 0000000..5d089e5
> --- /dev/null
> +++ b/libpdbg/pdbg.pc.in
> @@ -0,0 +1,11 @@
> +prefix=@prefix@
> +exec_prefix=@exec_prefix@
> +libdir=@libdir@
> +includedir=@includedir@
> +
> +Name: pdbg
> +Description: POWER processor debugger
> +URL: https://github.com/open-power/pdbg
> +Version: @VERSION@
> +Libs: -L${libdir} -lpdbg
> +Cflags: -I${includedir}
> -- 
> 2.26.2

I preempted your second version and pushed it with the same changes.
Also, it requires another change to know if building with system libfdt
or built-in libfdt.

The patches are upstream.


Amitay.
Brad Bishop Oct. 16, 2020, 12:20 p.m. UTC | #2
On Fri, 2020-10-16 at 11:13 +1100, Amitay Isaacs wrote:
> 
> I preempted your second version and pushed it with the same changes.
> Also, it requires another change to know if building with system
> libfdt or built-in libfdt.
> 
> The patches are upstream.

Awesome, thanks for fixing that up Amitay.

-brad
diff mbox series

Patch

diff --git a/Makefile.am b/Makefile.am
index dce09ab..385529c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,6 +122,9 @@  pdbg_LDADD = libpdbg.la libccan.a \
 pdbg_LDFLAGS = -Wl,--whole-archive,-lpdbg,--no-whole-archive
 
 lib_LTLIBRARIES = libpdbg.la
+pkgconfiglibdir = ${libdir}/pkgconfig
+pkgconfiglib_DATA = libpdbg/pdbg.pc
+
 noinst_LTLIBRARIES = libcronus.la libsbefifo.la
 
 libcronus_la_SOURCES = \
diff --git a/configure.ac b/configure.ac
index 0f8b9de..04b14aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,7 @@  fi
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([libpdbg/pdbg.pc])
 AC_LANG(C)
 
 case "$host" in
diff --git a/libpdbg/pdbg.pc.in b/libpdbg/pdbg.pc.in
new file mode 100644
index 0000000..5d089e5
--- /dev/null
+++ b/libpdbg/pdbg.pc.in
@@ -0,0 +1,11 @@ 
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: pdbg
+Description: POWER processor debugger
+URL: https://github.com/open-power/pdbg
+Version: @VERSION@
+Libs: -L${libdir} -lpdbg
+Cflags: -I${includedir}