When playing with the Makefile I realized hlwm installs things to
paths like this by default (note the triple-slash):
///usr/local/bin
After discussing a bit with the people from ##workingset on Freenode,
they told me the most projects set DESTDIR empty by default, assume
PREFIX starts with a slash, and then install the files to
$(DESTDIR)$(PREFIX)/foo (note the lack of a slash after DESTDIR).
The attached patch does the same for hlwm, and also improves
consistency a bit by using one (and only one) trailing slash for every
"install" call.
I'm not sure if this is a purely cosmetical issue, or if there are in
fact platforms which don't resolve /// to /.
Florian
--
www.the-compiler.org | Top-posting sucks! http://s.cmpl.cc/top
I love long mails! | http://email.is-not-s.ms/
BOFH excuse #369: Virus transmitted from computer to sysadmins.
From 8f31db94626984b3d123e3118cb00839f4645ec1 Mon Sep 17 00:00:00 2001 From: Florian Bruhin <git _at_ the _minus_ compiler _dot_ org> Date: Tue, 13 Aug 2013 10:26:58 +0200 Subject: [PATCH] Fix triple-slash for install paths --- Makefile | 98 +++++++++++++++++++++++++++++++-------------------------------- config.mk | 6 ++-- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/Makefile b/Makefile index a1b83e6..8e9bd60 100644 --- a/Makefile +++ b/Makefile @@ -92,65 +92,65 @@ doc/%.html: doc/%.txt version.mk install: all install-nodoc @echo "==> creating dirs..." - $(MKDIR) '$(DESTDIR)/$(MAN1DIR)' - $(MKDIR) '$(DESTDIR)/$(MAN7DIR)' - $(MKDIR) '$(DESTDIR)/$(DOCDIR)' + $(MKDIR) '$(DESTDIR)$(MAN1DIR)' + $(MKDIR) '$(DESTDIR)$(MAN7DIR)' + $(MKDIR) '$(DESTDIR)$(DOCDIR)' @echo "==> copying files..." - $(INSTALL) -m 644 doc/herbstclient.1 '$(DESTDIR)/$(MAN1DIR)/' - $(INSTALL) -m 644 doc/herbstluftwm.1 '$(DESTDIR)/$(MAN1DIR)/' - $(INSTALL) -m 644 doc/herbstluftwm-tutorial.7 '$(DESTDIR)/$(MAN7DIR)/' - $(INSTALL) -m 644 doc/herbstclient.html '$(DESTDIR)/$(DOCDIR)/' - $(INSTALL) -m 644 doc/herbstluftwm.html '$(DESTDIR)/$(DOCDIR)/' - $(INSTALL) -m 644 doc/herbstluftwm-tutorial.html '$(DESTDIR)/$(DOCDIR)/' + $(INSTALL) -m 644 doc/herbstclient.1 '$(DESTDIR)$(MAN1DIR)/' + $(INSTALL) -m 644 doc/herbstluftwm.1 '$(DESTDIR)$(MAN1DIR)/' + $(INSTALL) -m 644 doc/herbstluftwm-tutorial.7 '$(DESTDIR)$(MAN7DIR)/' + $(INSTALL) -m 644 doc/herbstclient.html '$(DESTDIR)$(DOCDIR)/' + $(INSTALL) -m 644 doc/herbstluftwm.html '$(DESTDIR)$(DOCDIR)/' + $(INSTALL) -m 644 doc/herbstluftwm-tutorial.html '$(DESTDIR)$(DOCDIR)/' install-nodoc: all-nodoc @echo "==> creating dirs..." - $(MKDIR) '$(DESTDIR)/$(LICENSEDIR)' - $(MKDIR) '$(DESTDIR)/$(BINDIR)' - $(MKDIR) '$(DESTDIR)/$(DOCDIR)' - $(MKDIR) '$(DESTDIR)/$(EXAMPLESDIR)' - $(MKDIR) '$(DESTDIR)/$(BASHCOMPLETIONDIR)' - $(MKDIR) '$(DESTDIR)/$(CONFIGDIR)' - $(MKDIR) '$(DESTDIR)/$(ZSHCOMPLETIONDIR)' - $(MKDIR) '$(DESTDIR)/$(XSESSIONSDIR)' + $(MKDIR) '$(DESTDIR)$(LICENSEDIR)' + $(MKDIR) '$(DESTDIR)$(BINDIR)' + $(MKDIR) '$(DESTDIR)$(DOCDIR)' + $(MKDIR) '$(DESTDIR)$(EXAMPLESDIR)' + $(MKDIR) '$(DESTDIR)$(BASHCOMPLETIONDIR)' + $(MKDIR) '$(DESTDIR)$(CONFIGDIR)' + $(MKDIR) '$(DESTDIR)$(ZSHCOMPLETIONDIR)' + $(MKDIR) '$(DESTDIR)$(XSESSIONSDIR)' @echo "==> copying files..." - $(INSTALL) $(TARGETS) '$(DESTDIR)/$(BINDIR)' - $(INSTALL) -m 644 LICENSE '$(DESTDIR)/$(LICENSEDIR)' - $(INSTALL) -m 644 BUGS '$(DESTDIR)/$(DOCDIR)/' - $(INSTALL) -m 644 NEWS '$(DESTDIR)/$(DOCDIR)/' - $(INSTALL) -m 644 README '$(DESTDIR)/$(DOCDIR)/' - $(INSTALL) -m 755 share/autostart '$(DESTDIR)/$(CONFIGDIR)/' - $(INSTALL) -m 755 share/panel.sh '$(DESTDIR)/$(CONFIGDIR)/' - $(INSTALL) -m 755 share/restartpanels.sh '$(DESTDIR)/$(CONFIGDIR)/' - $(INSTALL) -m 644 share/herbstclient-completion '$(DESTDIR)/$(BASHCOMPLETIONDIR)' - $(INSTALL) -m 644 share/_herbstclient '$(DESTDIR)/$(ZSHCOMPLETIONDIR)/' - $(INSTALL) -m 644 share/herbstluftwm.desktop '$(DESTDIR)/$(XSESSIONSDIR)/' - $(INSTALL) -m 644 scripts/README '$(DESTDIR)/$(EXAMPLESDIR)/' - $(INSTALL) -m 755 scripts/*.sh '$(DESTDIR)/$(EXAMPLESDIR)/' + $(INSTALL) $(TARGETS) '$(DESTDIR)$(BINDIR)/' + $(INSTALL) -m 644 LICENSE '$(DESTDIR)$(LICENSEDIR)/' + $(INSTALL) -m 644 BUGS '$(DESTDIR)$(DOCDIR)/' + $(INSTALL) -m 644 NEWS '$(DESTDIR)$(DOCDIR)/' + $(INSTALL) -m 644 README '$(DESTDIR)$(DOCDIR)/' + $(INSTALL) -m 755 share/autostart '$(DESTDIR)$(CONFIGDIR)/' + $(INSTALL) -m 755 share/panel.sh '$(DESTDIR)$(CONFIGDIR)/' + $(INSTALL) -m 755 share/restartpanels.sh '$(DESTDIR)$(CONFIGDIR)/' + $(INSTALL) -m 644 share/herbstclient-completion '$(DESTDIR)$(BASHCOMPLETIONDIR)/' + $(INSTALL) -m 644 share/_herbstclient '$(DESTDIR)$(ZSHCOMPLETIONDIR)/' + $(INSTALL) -m 644 share/herbstluftwm.desktop '$(DESTDIR)$(XSESSIONSDIR)/' + $(INSTALL) -m 644 scripts/README '$(DESTDIR)$(EXAMPLESDIR)/' + $(INSTALL) -m 755 scripts/*.sh '$(DESTDIR)$(EXAMPLESDIR)/' uninstall: @echo "==> deleting files..." - $(foreach TARGET,$(TARGETS),-$(RM) '$(DESTDIR)/$(BINDIR)/$(TARGET)';) - -$(RM) '$(DESTDIR)/$(LICENSEDIR)/LICENSE' - -$(RM) '$(DESTDIR)/$(MAN1DIR)/herbstclient.1' - -$(RM) '$(DESTDIR)/$(MAN1DIR)/herbstluftwm.1' - -$(RM) '$(DESTDIR)/$(MAN7DIR)/herbstluftwm-tutorial.7' - -$(RM) '$(DESTDIR)/$(DOCDIR)/herbstclient.html' - -$(RM) '$(DESTDIR)/$(DOCDIR)/herbstluftwm.html' - -$(RM) '$(DESTDIR)/$(DOCDIR)/herbstluftwm-tutorial.html' - -$(RM) '$(DESTDIR)/$(DOCDIR)/BUGS' - -$(RM) '$(DESTDIR)/$(DOCDIR)/NEWS' - -$(RM) '$(DESTDIR)/$(DOCDIR)/README' - -$(RM) '$(DESTDIR)/$(CONFIGDIR)/autostart' - -$(RM) '$(DESTDIR)/$(CONFIGDIR)/panel.sh' - -$(RM) '$(DESTDIR)/$(CONFIGDIR)/restartpanels.sh' - -$(RM) '$(DESTDIR)/$(BASHCOMPLETIONDIR)/herbstclient-completion' - -$(RM) '$(DESTDIR)/$(ZSHCOMPLETIONDIR)/_herbstclient' - -$(RM) '$(DESTDIR)/$(XSESSIONSDIR)/herbstluftwm.desktop' - -$(RM) '$(DESTDIR)/$(EXAMPLESDIR)/README' - $(foreach SCRIPT,$(wildcard '$(DESTDIR)/$(EXAMPLESDIR)/*.sh'),-$(RM) '$(SCRIPT)';) + $(foreach TARGET,$(TARGETS),-$(RM) '$(DESTDIR)$(BINDIR)/$(TARGET)';) + -$(RM) '$(DESTDIR)$(LICENSEDIR)/LICENSE' + -$(RM) '$(DESTDIR)$(MAN1DIR)/herbstclient.1' + -$(RM) '$(DESTDIR)$(MAN1DIR)/herbstluftwm.1' + -$(RM) '$(DESTDIR)$(MAN7DIR)/herbstluftwm-tutorial.7' + -$(RM) '$(DESTDIR)$(DOCDIR)/herbstclient.html' + -$(RM) '$(DESTDIR)$(DOCDIR)/herbstluftwm.html' + -$(RM) '$(DESTDIR)$(DOCDIR)/herbstluftwm-tutorial.html' + -$(RM) '$(DESTDIR)$(DOCDIR)/BUGS' + -$(RM) '$(DESTDIR)$(DOCDIR)/NEWS' + -$(RM) '$(DESTDIR)$(DOCDIR)/README' + -$(RM) '$(DESTDIR)$(CONFIGDIR)/autostart' + -$(RM) '$(DESTDIR)$(CONFIGDIR)/panel.sh' + -$(RM) '$(DESTDIR)$(CONFIGDIR)/restartpanels.sh' + -$(RM) '$(DESTDIR)$(BASHCOMPLETIONDIR)/herbstclient-completion' + -$(RM) '$(DESTDIR)$(ZSHCOMPLETIONDIR)/_herbstclient' + -$(RM) '$(DESTDIR)$(XSESSIONSDIR)/herbstluftwm.desktop' + -$(RM) '$(DESTDIR)$(EXAMPLESDIR)/README' + $(foreach SCRIPT,$(wildcard '$(DESTDIR)$(EXAMPLESDIR)/*.sh'),-$(RM) '$(SCRIPT)';) @echo "==> deleting directories..." -$(RMDIR) '$(EXAMPLESDIR)' -$(RMDIR) '$(DOCDIR)' diff --git a/config.mk b/config.mk index 271d5b8..d6c5b1f 100644 --- a/config.mk +++ b/config.mk @@ -27,7 +27,7 @@ CPPFLAGS ?= CPPFLAGS += $(INCS) -D _XOPEN_SOURCE=600 $(VERSIONFLAGS) $(XINERAMAFLAGS) CPPFLAGS += -D HERBSTLUFT_GLOBAL_AUTOSTART=\"$(CONFIGDIR)/autostart\" LDFLAGS ?= -g -DESTDIR = / +DESTDIR = PREFIX = /usr/local BINDIR = $(PREFIX)/bin DATADIR = $(PREFIX)/share @@ -40,8 +40,8 @@ LICENSEDIR = $(DOCDIR) SYSCONFDIR = /etc CONFIGDIR = $(SYSCONFDIR)/xdg/herbstluftwm XSESSIONSDIR = $(DATADIR)/xsessions -ZSHCOMPLETIONDIR = $(DATADIR)/zsh/functions/Completion/X/ -BASHCOMPLETIONDIR = $(SYSCONFDIR)/bash_completion.d/ +ZSHCOMPLETIONDIR = $(DATADIR)/zsh/functions/Completion/X +BASHCOMPLETIONDIR = $(SYSCONFDIR)/bash_completion.d TARFILE = herbstluftwm-$(SHORTVERSION).tar.gz A2X = a2x ASCIIDOC = asciidoc -- 1.8.3.4
Attachment:
pgpwTCIT_HTvO.pgp
Description: PGP signature