Commit f9f4b1ff authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Only install pkg-config file if library is also installed.

Fixes #1745  separate cdo issue: #1742
parent b531511c
......@@ -126,10 +126,13 @@ CLEANFILES += $(top_builddir)/src/mo_cdi.$(FCMODEXT) $(top_builddir)/src/mo_cdi.
endif
install-exec-local: pkgconfig/cdi.pc
$(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig"
$(install_sh_DATA) pkgconfig/cdi.pc "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
test $(ENABLE_CDI_LIB) = false \
|| ( $(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig" ; \
$(install_sh_DATA) pkgconfig/cdi.pc \
"$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" )
uninstall-local:
rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
rmdir "$(DESTDIR)$(libdir)/pkgconfig"
test $(ENABLE_CDI_LIB) = false \
|| ( rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" ; \
rmdir "$(DESTDIR)$(libdir)/pkgconfig" )
......@@ -799,12 +799,15 @@ pkgconfig/cdi.pc: pkgconfig/cdi.pc.in ../config.status
all-local: $(LOCALTARGETS)
install-exec-local: pkgconfig/cdi.pc
$(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig"
$(install_sh_DATA) pkgconfig/cdi.pc "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
test $(ENABLE_CDI_LIB) = false \
|| ( $(mkinstalldirs) "$(DESTDIR)$(libdir)/pkgconfig" ; \
$(install_sh_DATA) pkgconfig/cdi.pc \
"$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" )
uninstall-local:
rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc"
rmdir "$(DESTDIR)$(libdir)/pkgconfig"
test $(ENABLE_CDI_LIB) = false \
|| ( rm -f "$(DESTDIR)$(libdir)/pkgconfig/cdi.pc" ; \
rmdir "$(DESTDIR)$(libdir)/pkgconfig" )
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment