diff options
author | Thomas Miedema <thomasmiedema@gmail.com> | 2015-08-15 17:45:57 +0200 |
---|---|---|
committer | Thomas Miedema <thomasmiedema@gmail.com> | 2015-09-04 16:01:06 +0200 |
commit | 64761ce9a899954a12d8e3ae8b400c5ad9648137 (patch) | |
tree | fb3e5bc7645158fdcb530803d4a9ab9d09ff5e73 /ghc.mk | |
parent | 19c6049a3d718a3200feab644d6bbbc6b5f2e74b (diff) | |
download | haskell-64761ce9a899954a12d8e3ae8b400c5ad9648137.tar.gz |
Build system: implement `make install-strip` (#1851)
Reviewed by: bgamari
Differential Revision: https://phabricator.haskell.org/D1209
Diffstat (limited to 'ghc.mk')
-rw-r--r-- | ghc.mk | 21 |
1 files changed, 17 insertions, 4 deletions
@@ -807,6 +807,11 @@ endif define installLibsTo # $1 = libraries to install # $2 = directory to install to +# +# The .dll case calls STRIP_CMD explicitly, instead of `install -s`, because +# on Win64, "install -s" calls a strip that doesn't understand 64bit binaries. +# For some reason, this means the DLLs end up non-executable, which means +# executables that use them just segfault. $(INSTALL_DIR) $2 for i in $1; do \ case $$i in \ @@ -826,11 +831,14 @@ define installLibsTo done endef -install_bins: $(INSTALL_BINS) +install_bins: $(INSTALL_BINS) $(INSTALL_SCRIPTS) $(INSTALL_DIR) "$(DESTDIR)$(bindir)" for i in $(INSTALL_BINS); do \ $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i "$(DESTDIR)$(bindir)" ; \ done + for i in $(INSTALL_SCRIPTS); do \ + $(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i "$(DESTDIR)$(bindir)" ; \ + done install_libs: $(INSTALL_LIBS) $(call installLibsTo, $(INSTALL_LIBS), "$(DESTDIR)$(ghclibdir)") @@ -848,11 +856,14 @@ else "$(MV)" "$(DESTDIR)$(ghclibexecdir)/bin/ghc-stage$(INSTALL_GHC_STAGE)" "$(DESTDIR)$(ghclibexecdir)/bin/ghc" endif -install_topdirs: $(INSTALL_TOPDIRS) +install_topdirs: $(INSTALL_TOPDIR_BINS) $(INSTALL_TOPDIR_SCRIPTS) $(INSTALL_DIR) "$(DESTDIR)$(topdir)" - for i in $(INSTALL_TOPDIRS); do \ + for i in $(INSTALL_TOPDIR_BINS); do \ $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i "$(DESTDIR)$(topdir)"; \ done + for i in $(INSTALL_TOPDIR_SCRIPTS); do \ + $(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i "$(DESTDIR)$(topdir)"; \ + done install_docs: $(INSTALL_DOCS) $(INSTALL_DIR) "$(DESTDIR)$(docdir)" @@ -963,8 +974,10 @@ $(eval $(call bindist-list,.,\ $(libffi_HEADERS) \ $(INSTALL_LIBEXECS) \ $(INSTALL_LIBEXEC_SCRIPTS) \ - $(INSTALL_TOPDIRS) \ + $(INSTALL_TOPDIR_BINS) \ + $(INSTALL_TOPDIR_SCRIPTS) \ $(INSTALL_BINS) \ + $(INSTALL_SCRIPTS) \ $(INSTALL_MANPAGES) \ $(INSTALL_DOCS) \ $(INSTALL_LIBRARY_DOCS) \ |