mirror of
https://github.com/haskell/haskell-language-server.git
synced 2024-09-11 08:45:35 +03:00
Improve bindist makefile (#2746)
* Fix 'argument list too long' errors in for loop * Fix symlink creation when DESTDIR is used Co-authored-by: Pepe Iborra <pepeiborra@me.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
911fe59d7f
commit
4ec1a4393f
@ -5,6 +5,7 @@ BINDIR ?= $(PREFIX)/bin
|
|||||||
|
|
||||||
HLS_VERSION := @@HLS_VERSION@@
|
HLS_VERSION := @@HLS_VERSION@@
|
||||||
|
|
||||||
|
FIND := find
|
||||||
INSTALL := install
|
INSTALL := install
|
||||||
INSTALL_D := $(INSTALL) -d
|
INSTALL_D := $(INSTALL) -d
|
||||||
INSTALL_X := $(INSTALL) -vm 755
|
INSTALL_X := $(INSTALL) -vm 755
|
||||||
@ -18,10 +19,7 @@ install:
|
|||||||
$(INSTALL_D) "$(DESTDIR)$(BINDIR)"
|
$(INSTALL_D) "$(DESTDIR)$(BINDIR)"
|
||||||
$(INSTALL_D) "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/lib"
|
$(INSTALL_D) "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/lib"
|
||||||
$(INSTALL_D) "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/bin"
|
$(INSTALL_D) "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/bin"
|
||||||
for f in $(wildcard lib/*/*) ; do \
|
$(FIND) lib -mindepth 2 -type f -exec sh -c '$(INSTALL_D) "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/`dirname $$1`" && $(INSTALL_X) "$$1" "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/$$1"' - '{}' \;
|
||||||
$(INSTALL_D) "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/`dirname $$f`" && \
|
|
||||||
$(INSTALL_X) "$$f" "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/$$f" ; \
|
|
||||||
done
|
|
||||||
for b in $(wildcard bin/*) ; do \
|
for b in $(wildcard bin/*) ; do \
|
||||||
$(INSTALL_D) "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/" && \
|
$(INSTALL_D) "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/" && \
|
||||||
$(INSTALL_X) "$$b" "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/$$b" ; \
|
$(INSTALL_X) "$$b" "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/$$b" ; \
|
||||||
@ -31,7 +29,7 @@ install:
|
|||||||
"$$h" > "$(DESTDIR)$(BINDIR)/$${h%.in}" && \
|
"$$h" > "$(DESTDIR)$(BINDIR)/$${h%.in}" && \
|
||||||
$(CHMOD_X) "$(DESTDIR)$(BINDIR)/$${h%.in}" ; \
|
$(CHMOD_X) "$(DESTDIR)$(BINDIR)/$${h%.in}" ; \
|
||||||
done
|
done
|
||||||
$(LN_S) "`scripts/relpath.sh "$(BINDIR)" "$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/bin/haskell-language-server-wrapper"`" \
|
$(LN_S) "`scripts/relpath.sh "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(LIBDIR)/haskell-language-server-$(HLS_VERSION)/bin/haskell-language-server-wrapper"`" \
|
||||||
"$(DESTDIR)$(BINDIR)/haskell-language-server-wrapper"
|
"$(DESTDIR)$(BINDIR)/haskell-language-server-wrapper"
|
||||||
|
|
||||||
version:
|
version:
|
||||||
|
Loading…
Reference in New Issue
Block a user