diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-04-22 17:21:01 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-04-22 17:21:01 +0200 |
commit | 37496853cd98e546142c1bef8deaecb78e8db8a2 (patch) | |
tree | 64107e00fa46b4b77fd4e71dbdbbae30079eb430 /config | |
parent | 3130514bd99bdc4cf8a51e24be2d8bf6f1e47f62 (diff) | |
download | hurd-37496853cd98e546142c1bef8deaecb78e8db8a2.tar.gz hurd-37496853cd98e546142c1bef8deaecb78e8db8a2.tar.bz2 hurd-37496853cd98e546142c1bef8deaecb78e8db8a2.zip |
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.
Diffstat (limited to 'config')
-rw-r--r-- | config/Makefile | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/config/Makefile b/config/Makefile index 00501598..e6cb61c8 100644 --- a/config/Makefile +++ b/config/Makefile @@ -40,14 +40,14 @@ endif include ../Makeconf -install: $(sysconfdir) $(sysconfdir)/login \ - $(installed_conf) $(installed_logins) +install: $(DESTDIR)$(sysconfdir) $(DESTDIR)$(sysconfdir)/login \ + $(addprefix $(DESTDIR),$(installed_conf)) $(addprefix $(DESTDIR),$(installed_logins)) -$(sysconfdir)/login: %: +$(DESTDIR)$(sysconfdir)/login: %: mkdir -p $@ -$(installed_logins): $(sysconfdir)/login/%: login-% - $(INSTALL_DATA) $< $(sysconfdir)/login/$* +$(addprefix $(DESTDIR),$(installed_logins)): $(DESTDIR)$(sysconfdir)/login/%: login-% + $(INSTALL_DATA) $< $(DESTDIR)$(sysconfdir)/login/$* -$(installed_conf): $(sysconfdir)/%: % - $(INSTALL_DATA) $< $(sysconfdir)/$* +$(addprefix $(DESTDIR),$(installed_conf)): $(DESTDIR)$(sysconfdir)/%: % + $(INSTALL_DATA) $< $(DESTDIR)$(sysconfdir)/$* |