From 37496853cd98e546142c1bef8deaecb78e8db8a2 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 22 Apr 2018 17:21:01 +0200 Subject: Fix DESTDIR support Adding $(DESTDIR) to paths in config.make.in brings redundant additions when e.g. datarootdir is "${datadir}". The viable way is to just fix the installation rules. * Makeconf (install, install-headers): Prepend $(DESTDIR) to dependencies. ($(DESTDIR)$(installationdir)): New rule. ($(addprefix $(installationdir)/,$(installable))): Prepend $(DESTDIR). ($($(includedir)/$(installhdrsubdir))): Likewise. ($(addprefix $(libdir)/$(libname),_p.a .a _pic.a)): Likewise. ($(libdir)/$(libname).so.$(hurd-version)): Likewise. ($(libdir)/$(libname).so): Likewise. ($(addprefix $(includedir)/$(installhdrsubdir)/,$(installhdrs))): Likewise. ($(installationdirlist)): Likewise. * config.make.in (hurddir, libdir, bindir, sbindir, includedir, libexecdir, bootdir, infodir, sysconfdir, localstatedir, sharedstatedir, datadir, datarootdir): Remove $(DESTDIR). * config/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(sysconfdir)/login): Prepend $(DESTDIR). ($(installed_logins)): Likewise. ($(installed_conf)): Likewise. * console-client/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(module-dir)): Prepend $(DESTDIR). ($(module-dir)/%): Likewise. ($(XKB_BASE)): Likewise. ($(XKB_BASE)/%): Likewise. * hurd/Makefile (install-headers, install-msgids): Prepend $(DESTDIR) to dependencies. ($(includedir)/hurd/%): Prepend $(DESTDIR). ($(datadir)/msgids, $(includedir)/hurd): Prepend $(DESTDIR). * include/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(includedir)/%): Prepend $(DESTDIR). * libstore/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(store-types:%=$(libdir)/libstore_%.a): Prepend $(DESTDIR). * sutils/Makefile (install): Prepend $(DESTDIR) to dependencies. ($(prefix)/dev/MAKEDEV): Prepent $(DESTDIR). ($(prefix)/dev): Likewise. --- libstore/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libstore') diff --git a/libstore/Makefile b/libstore/Makefile index 3ba00176..c7af958b 100644 --- a/libstore/Makefile +++ b/libstore/Makefile @@ -85,6 +85,6 @@ cleantarg += $(store-types:%=libstore_%.a) all: $(store-types:%=libstore_%.a) -install: $(store-types:%=$(libdir)/libstore_%.a) -$(store-types:%=$(libdir)/libstore_%.a): $(libdir)/%: % +install: $(addprefix $(DESTDIR),$(store-types:%=$(libdir)/libstore_%.a)) +$(addprefix $(DESTDIR),$(store-types:%=$(libdir)/libstore_%.a)): $(DESTDIR)$(libdir)/%: % $(INSTALL_DATA) $< $@ -- cgit v1.2.3