summaryrefslogtreecommitdiff
path: root/console-client
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-04-22 17:21:01 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-04-22 17:21:01 +0200
commit37496853cd98e546142c1bef8deaecb78e8db8a2 (patch)
tree64107e00fa46b4b77fd4e71dbdbbae30079eb430 /console-client
parent3130514bd99bdc4cf8a51e24be2d8bf6f1e47f62 (diff)
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 'console-client')
-rw-r--r--console-client/Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/console-client/Makefile b/console-client/Makefile
index 024a053d..1b59b99d 100644
--- a/console-client/Makefile
+++ b/console-client/Makefile
@@ -81,12 +81,12 @@ all: $(addsuffix .so.$(hurd-version), $(modules))
cleantarg += $(addsuffix .so.$(hurd-version), $(modules))
-install: $(module-dir) $(addprefix $(module-dir)/,$(addsuffix .so.$(hurd-version),$(modules)))
+install: $(DESTDIR)$(module-dir) $(addprefix $(DESTDIR)$(module-dir)/,$(addsuffix .so.$(hurd-version),$(modules)))
-$(module-dir):
+$(DESTDIR)$(module-dir):
@$(MKINSTALLDIRS) $@
-$(module-dir)/%: %
+$(DESTDIR)$(module-dir)/%: %
$(INSTALL_DATA) $< $@
# You can use this rule to make a dynamically-loadable version of any
@@ -112,12 +112,12 @@ pc-kbd-CFLAGS = -DXKB_SUPPORT -DXKB_DATA_DIR=\"$(XKB_BASE)\" $(X11_CFLAGS)
$(foreach XKB_UNIT, $(XKB_UNITS), $(eval $(XKB_UNIT)-CFLAGS = $(X11_CFLAGS)))
compose-CFLAGS += -DDATADIR=\"$(datadir)\"
pc_kbd-LDLIBS = $(X11_LIBS)
-install: $(XKB_BASE) $(addprefix $(XKB_BASE)/, $(XKB_DATA_FILES))
+install: $(DESTDIR)$(XKB_BASE) $(addprefix $(DESTDIR)$(XKB_BASE)/, $(XKB_DATA_FILES))
-$(XKB_BASE):
+$(DESTDIR)$(XKB_BASE):
@$(MKINSTALLDIRS) $@
-$(XKB_BASE)/%: xkb/xkb-data/%
+$(DESTDIR)$(XKB_BASE)/%: xkb/xkb-data/%
$(INSTALL_DATA) $< $@
kstoucs.o: xkb/kstoucs_map.c