Unverified Commit aef89448 authored by memreflect's avatar memreflect Committed by GitHub
Browse files

Allow install of pkg-config files outside libdir (#310)

Specifying the directory to install .pc files is necessary on systems
where the pkg-config tool expects those files in a directory other
than $(libdir)/pkgconfig.
parent 7c49a3b2
SHELL=/bin/sh
prefix?=/usr/local
pkgconfigdir?=$(libdir)/pkgconfig
PKG_CONFIG?=pkg-config
OS=$(shell uname || uname -s)
......@@ -379,33 +380,33 @@ install-shared-peas: $(SONAME_PEASD) install-shared-gtkd
install-headers-gtkd: gtkd-$(MAJOR).pc
install -d $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)
install -d $(DESTDIR)$(prefix)/$(libdir)/pkgconfig
install -d $(DESTDIR)$(prefix)/$(pkgconfigdir)
(cd generated/gtkd; echo $(SOURCES_GTKD) | sed -e s,generated/gtkd/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xvf -)
install -m 644 gtkd-$(MAJOR).pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig
install -m 644 gtkd-$(MAJOR).pc $(DESTDIR)$(prefix)/$(pkgconfigdir)
install-headers-gtkdgl: gtkdgl-$(MAJOR).pc install-headers-gtkd
(cd generated/gtkdgl; echo $(SOURCES_GTKDGL) | sed -e s,generated/gtkdgl/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xvf -)
install -m 644 gtkdgl-$(MAJOR).pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig
install -m 644 gtkdgl-$(MAJOR).pc $(DESTDIR)$(prefix)/$(pkgconfigdir)
install-headers-gtkdsv: gtkdsv-$(MAJOR).pc install-headers-gtkd
(cd generated/sourceview; echo $(SOURCES_GTKDSV) | sed -e s,generated/sourceview/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xvf -)
install -m 644 gtkdsv-$(MAJOR).pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig
install -m 644 gtkdsv-$(MAJOR).pc $(DESTDIR)$(prefix)/$(pkgconfigdir)
install-headers-gstreamer: gstreamerd-$(MAJOR).pc install-headers-gtkd
(cd generated/gstreamer; echo $(SOURCES_GSTREAMERD) | sed -e s,generated/gstreamer/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xvf -)
install -m 644 gstreamerd-$(MAJOR).pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig
install -m 644 gstreamerd-$(MAJOR).pc $(DESTDIR)$(prefix)/$(pkgconfigdir)
install-headers-vte: vted-$(MAJOR).pc install-headers-gtkd
(cd generated/vte; echo $(SOURCES_VTED) | sed -e s,generated/vte/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xvf -)
install -m 644 vted-$(MAJOR).pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig
install -m 644 vted-$(MAJOR).pc $(DESTDIR)$(prefix)/$(pkgconfigdir)
install-headers-peas: peasd-$(MAJOR).pc install-headers-gtkd
(cd generated/peas; echo $(SOURCES_PEASD) | sed -e s,generated/peas/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xvf -)
install -m 644 peasd-$(MAJOR).pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig
install -m 644 peasd-$(MAJOR).pc $(DESTDIR)$(prefix)/$(pkgconfigdir)
uninstall: uninstall-gtkdgl uninstall-gtkdsv uninstall-gstreamer uninstall-vte uninstall-peas
$(foreach dir,$(shell ls generated/gtkd) , rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/gtkd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(pkgconfigdir)/gtkd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKD).$(SO_VERSION)
......@@ -413,7 +414,7 @@ uninstall: uninstall-gtkdgl uninstall-gtkdsv uninstall-gstreamer uninstall-vte u
uninstall-gtkdgl:
$(foreach dir,$(shell ls generated/gtkdgl), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/gtkdgl-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(pkgconfigdir)/gtkdgl-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKDGL)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDGL)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDGL).$(SO_VERSION)
......@@ -421,7 +422,7 @@ uninstall-gtkdgl:
uninstall-gtkdsv:
$(foreach dir,$(shell ls generated/sourceview), rm -rf $(DESTDIR)$(prefix)/include/d/$(dir))
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/gtkdsv-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(pkgconfigdir)/gtkdsv-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKDSV)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDSV)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDSV).$(SO_VERSION)
......@@ -429,7 +430,7 @@ uninstall-gtkdsv:
uninstall-gstreamer:
$(foreach dir,$(shell ls generated/gstreamer), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/gstreamerd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(pkgconfigdir)/gstreamerd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GSTREAMERD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GSTREAMERD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GSTREAMERD).$(SO_VERSION)
......@@ -437,7 +438,7 @@ uninstall-gstreamer:
uninstall-vte:
$(foreach dir,$(shell ls generated/vte), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/vted-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(pkgconfigdir)/vted-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_VTED)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_VTED)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_VTED).$(SO_VERSION)
......@@ -445,7 +446,7 @@ uninstall-vte:
uninstall-peas:
$(foreach dir,$(shell ls generated/peas), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir))
rm -f $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/peasd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(pkgconfigdir)/peasd-$(MAJOR).pc
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_PEASD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD)
rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD).$(SO_VERSION)
......
Markdown is supported
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