[Pdbg] [PATCH] libpdbg: Add pkgconfig

Amitay Isaacs amitay at ozlabs.org
Wed Oct 14 09:52:19 AEDT 2020


On Fri, 2020-10-09 at 16:35 -0400, Brad Bishop wrote:
> Add a pdbg.pc for build systems that make use of pkgconfig.
> 
> Signed-off-by: Brad Bishop <bradleyb at 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..f39d56e
> --- /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 at libdir@ -lpdbg
> +Cflags: -I at includedir@

We can use the already defined ${libdir} and ${includedir} and avoid
extra substitutions.

Amitay.
-- 

Unix gives you all sorts of ways to shoot yourself in the foot if you
aren't careful. (NT shoots you in the head regardless of what you do)



More information about the Pdbg mailing list