Skip to content

Commit 58dab4f

Browse files
committed
Fix dll on mac
1 parent 33893e0 commit 58dab4f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

GNUmakefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ RM := rm
3030
RM_RF := $(RM) -rf
3131
CD := cd
3232

33+
ifeq ($(UNAME), Darwin)
34+
DLL := *.dylib
35+
else
36+
DLL := *.so
37+
endif
38+
3339
INSTALL_NAME_TOOL := install_name_tool
3440

3541
STORE_DIR := store
@@ -88,8 +94,8 @@ bindist-ghc:
8894
$(INSTALL_D) "$(BINDIST_OUT_DIR)/bin/"
8995
$(INSTALL_X) "out/$(GHC_VERSION)/haskell-language-server-wrapper" "$(BINDIST_OUT_DIR)/bin/haskell-language-server-wrapper"
9096
$(INSTALL_D) "$(ROOT_DIR)/$(BINDIST_OUT_DIR)/lib/$(GHC_VERSION)"
91-
$(FIND) "$(STORE_DIR)/ghc-$(GHC_VERSION)" -type f -name "*.so" -execdir $(INSTALL_X) "{}" "$(ROOT_DIR)/$(BINDIST_OUT_DIR)/lib/$(GHC_VERSION)/{}" \;
92-
$(FIND) "$(ROOT_DIR)/$(BINDIST_OUT_DIR)/lib/$(GHC_VERSION)" -type f -name '*.so' -execdir $(call set_rpath,,{}) \;
97+
$(FIND) "$(STORE_DIR)/ghc-$(GHC_VERSION)" -type f -name "$(DLL)" -execdir $(INSTALL_X) "{}" "$(ROOT_DIR)/$(BINDIST_OUT_DIR)/lib/$(GHC_VERSION)/{}" \;
98+
$(FIND) "$(ROOT_DIR)/$(BINDIST_OUT_DIR)/lib/$(GHC_VERSION)" -type f -name '$(DLL)' -execdir $(call set_rpath,,{}) \;
9399

94100
install-ghcs:
95101
ghcup install ghc recommended

0 commit comments

Comments
 (0)