The pc-files target is a stamp file rather than one of the generated
pkg-config files.  If the stamp remains in the build directory while the
generated .pc files are missing, install.libs can skip gen-pkgconfig and then
silently install no pkg-config files because the install loop ignores missing
files.

Regenerate the pkg-config files directly from install and install.libs instead
of relying on the stamp target.  The pc-files stamp remains useful for all and
sources, but installation now guarantees that the files it is about to copy
exist in the build tree.

Signed-off-by: Luca Fancellu <[email protected]>
---
 misc/Makefile.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/misc/Makefile.in b/misc/Makefile.in
index bfcee26a6dd3..306aadd7461a 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -153,7 +153,8 @@ install.libs :: $(BINDIR) ncurses-config
 # pkg-config is not installed.  Work around that by creating the library
 # directory during this rule:
 @MAKE_PC_FILES@install \
-@[email protected] :: pc-files
+@[email protected] ::
+@MAKE_PC_FILES@        $(SHELL) ./gen-pkgconfig
 @MAKE_PC_FILES@        @$(SHELL) -c 'case "x$(PKG_CONFIG_LIBDIR)" in \
 @MAKE_PC_FILES@                x@GLOB_FULLPATH_POSIX@|x@GLOB_FULLPATH_OTHER@) \
 @MAKE_PC_FILES@                        mkdir -p $(INSTALL_CONFIG); \
-- 
2.34.1


Reply via email to