From: Yann E. MORIN Date: Mon, 28 Nov 2016 18:59:03 +0000 (+0100) Subject: libs/parser: add pkg-config file X-Git-Tag: v4.9.0.0~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c5e2919f40a83e52322e689e9e7791d57b569cc7;p=kconfig-frontends libs/parser: add pkg-config file Signed-off-by: "Yann E. MORIN" --- 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}