summaryrefslogtreecommitdiff
path: root/makefiles/gmake/install.mk
diff options
context:
space:
mode:
Diffstat (limited to 'makefiles/gmake/install.mk')
-rw-r--r--makefiles/gmake/install.mk40
1 files changed, 20 insertions, 20 deletions
diff --git a/makefiles/gmake/install.mk b/makefiles/gmake/install.mk
index ac6d49d..ac8090b 100644
--- a/makefiles/gmake/install.mk
+++ b/makefiles/gmake/install.mk
@@ -13,10 +13,10 @@ DESTDIR=
prefix=/usr
# standard directories following FHS
-execdir=$(DESTDIR)$(prefix)
+execdir=$(prefix)
bindir=$(execdir)/bin
sbindir=$(execdir)/sbin
-libdir=$(execdir)/lib
+libdir=$(execdir)/$(LIBDIR)
sysconfdir=$(execdir)/etc
includedir=$(execdir)/include
datadir=$(execdir)/share
@@ -29,20 +29,20 @@ install_recursive:
(set -e; $(MAKE) -C $$d install || exit 1); done)
install: install_recursive local_install install_po
- @test -d "$(libdir)" || mkdir -p "$(libdir)"
+ @test -d "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)" || mkdir -p "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)"
@test -z "$(STATIC_LIB)" || ( \
- $(INSTALL) -m 644 $(STATIC_LIB) $(libdir)/$(STATIC_LIB) )
+ $(INSTALL) -m 644 $(STATIC_LIB) $(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(STATIC_LIB) )
@test -z "$(DYNAMIC_LIB)" || ( \
$(INSTALL) -m 755 $(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH) \
- $(libdir)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH) )
+ $(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH) )
@test -z "$(DYNAMIC_LIB)" || ( \
- rm -f "$(libdir)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)" && \
+ rm -f "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)" && \
ln -s "$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH)" \
- "$(libdir)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)" )
+ "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)" )
@test -z "$(DYNAMIC_LIB)" || ( \
- rm -f "$(libdir)/$(DYNAMIC_LIB)" && \
+ rm -f "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB)" && \
ln -s "$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH)" \
- "$(libdir)/$(DYNAMIC_LIB)" )
+ "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB)" )
.PHONY: uninstall_recursive uninstall local_uninstall
@@ -51,14 +51,14 @@ uninstall_recursive:
(set -e; $(MAKE) -C $$d uninstall || exit 1); done)
uninstall: uninstall_recursive local_uninstall uninstall_po
- test -z "$(DYNAMIC_LIB)" || ( \
- test ! -f "$(libdir)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH)" || \
- rm "$(libdir)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH)" )
- test -z "$(DYNAMIC_LIB)" || ( \
- test ! -h "$(libdir)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)" || \
- rm "$(libdir)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)" )
- test -z "$(DYNAMIC_LIB)" || ( \
- test ! -h "$(libdir)/$(DYNAMIC_LIB)" || \
- rm "$(libdir)/$(DYNAMIC_LIB)" )
- test -z "$(STATIC_LIB)" || ( \
- test ! -f "$(libdir)/$(STATIC_LIB)" || rm "$(libdir)/$(STATIC_LIB)" )
+ @test -z "$(DYNAMIC_LIB)" || ( \
+ test ! -f "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH)" || \
+ rm "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR).$(DYNAMIC_LIB_MINOR).$(DYNAMIC_LIB_PATCH)" )
+ @test -z "$(DYNAMIC_LIB)" || ( \
+ test ! -h "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)" || \
+ rm "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB).$(DYNAMIC_LIB_MAJOR)" )
+ @test -z "$(DYNAMIC_LIB)" || ( \
+ test ! -h "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB)" || \
+ rm "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(DYNAMIC_LIB)" )
+ @test -z "$(STATIC_LIB)" || ( \
+ test ! -f "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(STATIC_LIB)" || rm "$(DESTDIR)$(libdir)/$(PACKAGE_NAME)/$(STATIC_LIB)" )