From c5e2919f40a83e52322e689e9e7791d57b569cc7 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Mon, 28 Nov 2016 19:59:03 +0100 Subject: [PATCH] libs/parser: add pkg-config file Signed-off-by: "Yann E. MORIN" --- .gitignore | 1 + Makefile.am | 6 ++++++ configure.ac | 6 ++++++ libs/parser/kconfig-parser.pc.in | 11 +++++++++++ 4 files changed, 24 insertions(+) create mode 100644 libs/parser/kconfig-parser.pc.in diff --git a/.gitignore b/.gitignore index a4095f8..69bf859 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ /libs/parser/hconf.c /libs/parser/lconf.c /libs/parser/yconf.c +/libs/parser/kconfig-parser.pc /utils/kconfig-tweak /utils/kconfig-gettext diff --git a/Makefile.am b/Makefile.am index 3b0d651..1bde1e3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -85,6 +85,12 @@ BUILT_SOURCES += libs/parser/hconf.c libs/parser/lconf.c CLEANFILES += libs/parser/hconf.c libs/parser/lconf.c libs/parser/yconf.c EXTRA_DIST += libs/parser/yconf.y.patch +# libs/parser/kconfig-parser.pc generated by AC_CONFIG_FILES in configure.ac +pkgconfigdir = $(libdir)/pkg-config +pkgconfig_DATA = libs/parser/kconfig-parser.pc +CLEANFILES += libs/parser/kconfig-parser.pc +EXTRA_DIST += libs/parser/kconfig-parser.pc.in + #-------------------------- # lxdialog lib (for mconf) if COND_lxdialog diff --git a/configure.ac b/configure.ac index ba7db9b..b465dac 100644 --- a/configure.ac +++ b/configure.ac @@ -498,8 +498,14 @@ AS_IF( #---------------------------------------- # Finalise +# All generated files are generated by a Makefile rule, except Makefile +# itself of course. +# There is no generic solution in automake to generate a file from its +# .in source, so we'd have to provide custom, hand-made rules, which is +# not nice. So, we handle libs/parser/kconfig-parser.pc here. AC_CONFIG_FILES([ Makefile + libs/parser/kconfig-parser.pc ]) AC_OUTPUT diff --git a/libs/parser/kconfig-parser.pc.in b/libs/parser/kconfig-parser.pc.in new file mode 100644 index 0000000..086b3f8 --- /dev/null +++ b/libs/parser/kconfig-parser.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=${prefix}/include + +Name: kconfig-parser +Description: kconfig-parser library +Requires: +Version: @KCONFIGPARSER_LIB_VERSION@ +Libs: -L${libdir} -lkconfig-parser +Cflags: -I${includedir} -- 2.39.5