summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/ghci/ghc.mk16
-rw-r--r--ghc.mk72
-rw-r--r--ghc/ghc.mk4
-rw-r--r--ghc/ghc.wrapper2
-rw-r--r--includes/ghc.mk6
-rw-r--r--mk/config.mk.in6
-rw-r--r--mk/install.mk.in4
-rw-r--r--rts/ghc.mk6
-rw-r--r--rules/shell-wrapper.mk26
-rw-r--r--utils/ghc-pkg/ghc-pkg.wrapper4
-rw-r--r--utils/ghc-pkg/ghc.mk6
-rw-r--r--utils/runghc/ghc.mk4
-rw-r--r--utils/runghc/runghc.wrapper2
13 files changed, 76 insertions, 82 deletions
diff --git a/driver/ghci/ghc.mk b/driver/ghci/ghc.mk
index a80737bccd..eb4115f975 100644
--- a/driver/ghci/ghc.mk
+++ b/driver/ghci/ghc.mk
@@ -17,14 +17,14 @@ install: install_driver_ghci
.PHONY: install_driver_ghci
install_driver_ghci: WRAPPER=$(DESTDIR)$(bindir)/ghci-$(ProjectVersion)
install_driver_ghci:
- $(INSTALL_DIR) $(DESTDIR)$(bindir)
- "$(RM)" $(RM_OPTS) $(WRAPPER)
- $(CREATE_SCRIPT) $(WRAPPER)
- echo '#!$(SHELL)' >> $(WRAPPER)
- echo 'exec $(bindir)/ghc-$(ProjectVersion) --interactive $${1+"$$@"}' >> $(WRAPPER)
- $(EXECUTABLE_FILE) $(WRAPPER)
- "$(RM)" $(RM_OPTS) $(DESTDIR)$(bindir)/ghci
- $(LN_S) ghci-$(ProjectVersion) $(DESTDIR)$(bindir)/ghci
+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
+ "$(RM)" $(RM_OPTS) "$(WRAPPER)"
+ $(CREATE_SCRIPT) "$(WRAPPER)"
+ echo '#!$(SHELL)' >> "$(WRAPPER)"
+ echo 'exec "$(bindir)/ghc-$(ProjectVersion)" --interactive $${1+"$$@"}' >> "$(WRAPPER)"
+ $(EXECUTABLE_FILE) "$(WRAPPER)"
+ "$(RM)" $(RM_OPTS) "$(DESTDIR)$(bindir)/ghci"
+ $(LN_S) ghci-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghci"
else # Windows...
diff --git a/ghc.mk b/ghc.mk
index 336b2b0840..d352d5c90c 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -721,30 +721,30 @@ install: install_packages install_libs install_libexecs install_headers \
install_topdirs install_topdir_scripts
install_bins: $(INSTALL_BINS)
- $(INSTALL_DIR) $(DESTDIR)$(bindir)
+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
for i in $(INSTALL_BINS); do \
- $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i $(DESTDIR)$(bindir) ; \
+ $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i "$(DESTDIR)$(bindir)" ; \
if test "$(darwin_TARGET_OS)" = "1"; then \
- sh mk/fix_install_names.sh $(ghclibdir) $(DESTDIR)$(bindir)/$$i ; \
+ sh mk/fix_install_names.sh $(ghclibdir) "$(DESTDIR)$(bindir)/$$i" ; \
fi ; \
done
install_libs: $(INSTALL_LIBS)
- $(INSTALL_DIR) $(DESTDIR)$(ghclibdir)
+ $(INSTALL_DIR) "$(DESTDIR)$(ghclibdir)"
for i in $(INSTALL_LIBS); do \
case $$i in \
*.a) \
- $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(DESTDIR)$(ghclibdir); \
+ $(INSTALL_DATA) $(INSTALL_OPTS) $$i "$(DESTDIR)$(ghclibdir)"; \
$(RANLIB) $(DESTDIR)$(ghclibdir)/`basename $$i` ;; \
*.dll) \
- $(INSTALL_DATA) -s $(INSTALL_OPTS) $$i $(DESTDIR)$(ghclibdir) ;; \
+ $(INSTALL_DATA) -s $(INSTALL_OPTS) $$i "$(DESTDIR)$(ghclibdir)" ;; \
*.so) \
- $(INSTALL_SHLIB) $(INSTALL_OPTS) $$i $(DESTDIR)$(ghclibdir) ;; \
+ $(INSTALL_SHLIB) $(INSTALL_OPTS) $$i "$(DESTDIR)$(ghclibdir)" ;; \
*.dylib) \
- $(INSTALL_SHLIB) $(INSTALL_OPTS) $$i $(DESTDIR)$(ghclibdir); \
- install_name_tool -id $(DESTDIR)$(ghclibdir)/`basename $$i` $(DESTDIR)$(ghclibdir)/`basename $$i` ;; \
+ $(INSTALL_SHLIB) $(INSTALL_OPTS) $$i "$(DESTDIR)$(ghclibdir)"; \
+ install_name_tool -id "$(DESTDIR)$(ghclibdir)/`basename $$i`" "$(DESTDIR)$(ghclibdir)/`basename $$i`" ;; \
*) \
- $(INSTALL_DATA) $(INSTALL_OPTS) $$i $(DESTDIR)$(ghclibdir); \
+ $(INSTALL_DATA) $(INSTALL_OPTS) $$i "$(DESTDIR)$(ghclibdir)"; \
esac; \
done
@@ -752,9 +752,9 @@ install_libexec_scripts: $(INSTALL_LIBEXEC_SCRIPTS)
ifeq "$(INSTALL_LIBEXEC_SCRIPTS)" ""
@:
else
- $(INSTALL_DIR) $(DESTDIR)$(ghclibexecdir)
+ $(INSTALL_DIR) "$(DESTDIR)$(ghclibexecdir)"
for i in $(INSTALL_LIBEXEC_SCRIPTS); do \
- $(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i $(DESTDIR)$(ghclibexecdir); \
+ $(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i "$(DESTDIR)$(ghclibexecdir)"; \
done
endif
@@ -762,48 +762,48 @@ install_libexecs: $(INSTALL_LIBEXECS)
ifeq "$(INSTALL_LIBEXECS)" ""
@:
else
- $(INSTALL_DIR) $(DESTDIR)$(ghclibexecdir)
+ $(INSTALL_DIR) "$(DESTDIR)$(ghclibexecdir)"
for i in $(INSTALL_LIBEXECS); do \
- $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i $(DESTDIR)$(ghclibexecdir); \
+ $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i "$(DESTDIR)$(ghclibexecdir)"; \
done
endif
install_topdir_scripts: $(INSTALL_TOPDIR_SCRIPTS)
- $(INSTALL_DIR) $(DESTDIR)$(topdir)
+ $(INSTALL_DIR) "$(DESTDIR)$(topdir)"
for i in $(INSTALL_TOPDIR_SCRIPTS); do \
- $(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i $(DESTDIR)$(topdir); \
+ $(INSTALL_SCRIPT) $(INSTALL_OPTS) $$i "$(DESTDIR)$(topdir)"; \
done
install_topdirs: $(INSTALL_TOPDIRS)
- $(INSTALL_DIR) $(DESTDIR)$(topdir)
+ $(INSTALL_DIR) "$(DESTDIR)$(topdir)"
for i in $(INSTALL_TOPDIRS); do \
- $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i $(DESTDIR)$(topdir); \
+ $(INSTALL_PROGRAM) $(INSTALL_BIN_OPTS) $$i "$(DESTDIR)$(topdir)"; \
done
install_headers: $(INSTALL_HEADERS)
- $(INSTALL_DIR) $(DESTDIR)$(ghcheaderdir)
+ $(INSTALL_DIR) "$(DESTDIR)$(ghcheaderdir)"
for i in $(INSTALL_HEADERS); do \
- $(INSTALL_HEADER) $(INSTALL_OPTS) $$i $(DESTDIR)$(ghcheaderdir); \
+ $(INSTALL_HEADER) $(INSTALL_OPTS) $$i "$(DESTDIR)$(ghcheaderdir)"; \
done
install_docs: $(INSTALL_HEADERS)
- $(INSTALL_DIR) $(DESTDIR)$(docdir)
+ $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
ifneq "$(INSTALL_DOCS)" ""
for i in $(INSTALL_DOCS); do \
- $(INSTALL_DOC) $(INSTALL_OPTS) $$i $(DESTDIR)$(docdir); \
+ $(INSTALL_DOC) $(INSTALL_OPTS) $$i "$(DESTDIR)$(docdir)"; \
done
endif
- $(INSTALL_DIR) $(INSTALL_OPTS) $(DESTDIR)$(docdir)/html
- $(INSTALL_DOC) $(INSTALL_OPTS) docs/index.html $(DESTDIR)$(docdir)/html
+ $(INSTALL_DIR) $(INSTALL_OPTS) "$(DESTDIR)$(docdir)/html"
+ $(INSTALL_DOC) $(INSTALL_OPTS) docs/index.html "$(DESTDIR)$(docdir)/html"
ifneq "$(INSTALL_LIBRARY_DOCS)" ""
for i in $(INSTALL_LIBRARY_DOCS); do \
- $(INSTALL_DOC) $(INSTALL_OPTS) $$i $(DESTDIR)$(docdir)/html/libraries/; \
+ $(INSTALL_DOC) $(INSTALL_OPTS) $$i "$(DESTDIR)$(docdir)/html/libraries/"; \
done
endif
ifneq "$(INSTALL_HTML_DOC_DIRS)" ""
for i in $(INSTALL_HTML_DOC_DIRS); do \
- $(INSTALL_DIR) $(INSTALL_OPTS) $(DESTDIR)$(docdir)/html/`basename $$i`; \
- $(INSTALL_DOC) $(INSTALL_OPTS) $$i/* $(DESTDIR)$(docdir)/html/`basename $$i`; \
+ $(INSTALL_DIR) $(INSTALL_OPTS) "$(DESTDIR)$(docdir)/html/`basename $$i`"; \
+ $(INSTALL_DOC) $(INSTALL_OPTS) $$i/* "$(DESTDIR)$(docdir)/html/`basename $$i`"; \
done
endif
@@ -839,21 +839,21 @@ ALL_INSTALLED_PACKAGES = $(addprefix libraries/,$(INSTALLED_PACKAGES)) \
install_packages: install_libexecs
install_packages: libffi/package.conf.install rts/package.conf.install
- $(INSTALL_DIR) $(DESTDIR)$(topdir)
- "$(RM)" -r $(RM_OPTS) $(INSTALLED_PACKAGE_CONF)
- $(INSTALL_DIR) $(INSTALLED_PACKAGE_CONF)
- "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf $(INSTALLED_PACKAGE_CONF) update libffi/package.conf.install
- "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf $(INSTALLED_PACKAGE_CONF) update rts/package.conf.install
+ $(INSTALL_DIR) "$(DESTDIR)$(topdir)"
+ "$(RM)" -r $(RM_OPTS) "$(INSTALLED_PACKAGE_CONF)"
+ $(INSTALL_DIR) "$(INSTALLED_PACKAGE_CONF)"
+ "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update libffi/package.conf.install
+ "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update rts/package.conf.install
$(foreach p, $(ALL_INSTALLED_PACKAGES),\
"$(GHC_CABAL_INPLACE)" install \
- $(INSTALLED_GHC_REAL) \
- $(INSTALLED_GHC_PKG_REAL) \
- $(DESTDIR)$(topdir) \
+ "$(INSTALLED_GHC_REAL)" \
+ "$(INSTALLED_GHC_PKG_REAL)" \
+ "$(DESTDIR)$(topdir)" \
$p $(INSTALL_DISTDIR_$p) \
'$(DESTDIR)' '$(prefix)' '$(ghclibdir)' '$(docdir)/html/libraries' \
$(RelocatableBuild) &&) true
$(foreach p, $(HIDDEN_PACKAGES),\
- $(INSTALLED_GHC_PKG_REAL) --global-conf $(INSTALLED_PACKAGE_CONF) \
+ "$(INSTALLED_GHC_PKG_REAL)" --global-conf "$(INSTALLED_PACKAGE_CONF)" \
hide $p &&) true
# -----------------------------------------------------------------------------
diff --git a/ghc/ghc.mk b/ghc/ghc.mk
index 6d6652a17a..4c78e7fecb 100644
--- a/ghc/ghc.mk
+++ b/ghc/ghc.mk
@@ -153,8 +153,8 @@ ifeq "$(Windows)" "NO"
install: install_ghc_link
.PNONY: install_ghc_link
install_ghc_link:
- "$(RM)" $(RM_OPTS) $(DESTDIR)$(bindir)/ghc
- $(LN_S) ghc-$(ProjectVersion) $(DESTDIR)$(bindir)/ghc
+ "$(RM)" $(RM_OPTS) "$(DESTDIR)$(bindir)/ghc"
+ $(LN_S) ghc-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghc"
else
# On Windows we install the main binary as $(bindir)/ghc.exe
# To get ghc-<version>.exe we have a little C program in driver/ghc
diff --git a/ghc/ghc.wrapper b/ghc/ghc.wrapper
index 093d9af784..083a66db7e 100644
--- a/ghc/ghc.wrapper
+++ b/ghc/ghc.wrapper
@@ -1 +1 @@
-exec $executablename -B$topdir ${1+"$@"}
+exec "$executablename" -B"$topdir" ${1+"$@"}
diff --git a/includes/ghc.mk b/includes/ghc.mk
index 007ce4bb5d..ef98e74531 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -186,10 +186,10 @@ install: install_includes
.PHONY: install_includes
install_includes :
- $(INSTALL_DIR) $(DESTDIR)$(ghcheaderdir)
+ $(INSTALL_DIR) "$(DESTDIR)$(ghcheaderdir)"
for d in $(includes_subdirs); do \
- $(INSTALL_DIR) $(DESTDIR)$(ghcheaderdir)/$$d; \
+ $(INSTALL_DIR) "$(DESTDIR)$(ghcheaderdir)/$$d"; \
done
for i in $(subst includes/,,$(includes_H_FILES) $(includes_H_CONFIG) $(includes_H_PLATFORM)); do \
- $(INSTALL_HEADER) $(INSTALL_OPTS) includes/$$i $(DESTDIR)$(ghcheaderdir)/$$i; \
+ $(INSTALL_HEADER) $(INSTALL_OPTS) includes/$$i "$(DESTDIR)$(ghcheaderdir)/$$i"; \
done
diff --git a/mk/config.mk.in b/mk/config.mk.in
index bbdb63cac6..6f255a4bcc 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -784,12 +784,6 @@ ICONV_LIB_DIRS = @ICONV_LIB_DIRS@
#
################################################################################
-ifeq "$(Windows)" "YES"
BIN_DIST_INST_SUBDIR = "install dir"
-else
-# I very much doubt that paths with spaces will work on Unix
-BIN_DIST_INST_SUBDIR = installed
-endif
-
BIN_DIST_INST_DIR = $(TOP)/bindisttest/$(BIN_DIST_INST_SUBDIR)
diff --git a/mk/install.mk.in b/mk/install.mk.in
index 3aed8b77be..d1bce874a6 100644
--- a/mk/install.mk.in
+++ b/mk/install.mk.in
@@ -133,8 +133,8 @@ INSTALL_GROUP =
# Invocations of `install' for the four different classes
# of targets:
#
-CREATE_SCRIPT = create () { touch $$1 && chmod 755 $$1 ; } && create
-CREATE_DATA = create () { touch $$1 && chmod 644 $$1 ; } && create
+CREATE_SCRIPT = create () { touch "$$1" && chmod 755 "$$1" ; } && create
+CREATE_DATA = create () { touch "$$1" && chmod 644 "$$1" ; } && create
INSTALL_PROGRAM = $(INSTALL) -m 755
INSTALL_SCRIPT = $(INSTALL) -m 755
INSTALL_SHLIB = $(INSTALL) -m 755
diff --git a/rts/ghc.mk b/rts/ghc.mk
index e4e9aad6ab..b002bdc2a6 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -361,9 +361,9 @@ install : install_rts
.PHONY: install_rts
install_rts:
- $(INSTALL_DIR) $(DESTDIR)$(ghclibdir)
- $(INSTALL_DIR) $(DESTDIR)$(ghclibdir)/include
- "$(CP)" $(ALL_RTS_LIBS) $(DESTDIR)$(ghclibdir)
+ $(INSTALL_DIR) "$(DESTDIR)$(ghclibdir)"
+ $(INSTALL_DIR) "$(DESTDIR)$(ghclibdir)/include"
+ "$(CP)" $(ALL_RTS_LIBS) "$(DESTDIR)$(ghclibdir)"
# -----------------------------------------------------------------------------
# cleaning
diff --git a/rules/shell-wrapper.mk b/rules/shell-wrapper.mk
index 9535a7d720..3f01286fe8 100644
--- a/rules/shell-wrapper.mk
+++ b/rules/shell-wrapper.mk
@@ -35,10 +35,10 @@ all_$1_$2 : $$(INPLACE_BIN)/$$($1_$2_PROG)
$$(INPLACE_BIN)/$$($1_$2_PROG): $$($1_$2_INPLACE)
"$$(RM)" $$(RM_OPTS) $$@
echo '#!$$(SHELL)' >> $$@
- echo 'executablename=$$(TOP)/$$<' >> $$@
- echo 'datadir=$$(TOP)/$$(INPLACE_LIB)' >> $$@
- echo 'bindir=$$(TOP)/$$(INPLACE_BIN)' >> $$@
- echo 'topdir=$$(TOP)/$$(INPLACE_TOPDIR)' >> $$@
+ echo 'executablename="$$(TOP)/$$<"' >> $$@
+ echo 'datadir="$$(TOP)/$$(INPLACE_LIB)"' >> $$@
+ echo 'bindir="$$(TOP)/$$(INPLACE_BIN)"' >> $$@
+ echo 'topdir="$$(TOP)/$$(INPLACE_TOPDIR)"' >> $$@
cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$@
$$(EXECUTABLE_FILE) $$@
endif
@@ -59,15 +59,15 @@ install: install_$1_$2_wrapper
install_$1_$2_wrapper: WRAPPER=$$(DESTDIR)$$(bindir)/$$($1_$2_INSTALL_SHELL_WRAPPER_NAME)
install_$1_$2_wrapper:
$$(INSTALL_DIR) $$(DESTDIR)$$(bindir)
- "$$(RM)" $$(RM_OPTS) $$(WRAPPER)
- $$(CREATE_SCRIPT) $$(WRAPPER)
- echo '#!$$(SHELL)' >> $$(WRAPPER)
- echo 'executablename=$$(ghclibexecdir)/$$($1_$2_PROG)' >> $$(WRAPPER)
- echo 'datadir=$$(datadir)' >> $$(WRAPPER)
- echo 'bindir=$$(bindir)' >> $$(WRAPPER)
- echo 'topdir=$$(topdir)' >> $$(WRAPPER)
- cat $$($1_$2_SHELL_WRAPPER_NAME) >> $$(WRAPPER)
- $$(EXECUTABLE_FILE) $$(WRAPPER)
+ "$$(RM)" $$(RM_OPTS) "$$(WRAPPER)"
+ $$(CREATE_SCRIPT) "$$(WRAPPER)"
+ echo '#!$$(SHELL)' >> "$$(WRAPPER)"
+ echo 'executablename="$$(ghclibexecdir)/$$($1_$2_PROG)"' >> "$$(WRAPPER)"
+ echo 'datadir="$$(datadir)"' >> "$$(WRAPPER)"
+ echo 'bindir="$$(bindir)"' >> "$$(WRAPPER)"
+ echo 'topdir="$$(topdir)"' >> "$$(WRAPPER)"
+ cat $$($1_$2_SHELL_WRAPPER_NAME) >> "$$(WRAPPER)"
+ $$(EXECUTABLE_FILE) "$$(WRAPPER)"
endif # $1_$2_INSTALL_SHELL_WRAPPER
diff --git a/utils/ghc-pkg/ghc-pkg.wrapper b/utils/ghc-pkg/ghc-pkg.wrapper
index d21fd59e2c..fad4bdfca0 100644
--- a/utils/ghc-pkg/ghc-pkg.wrapper
+++ b/utils/ghc-pkg/ghc-pkg.wrapper
@@ -1,5 +1,5 @@
#!/bin/sh
-PKGCONF=$topdir/package.conf.d
-exec $executablename --global-conf $PKGCONF ${1+"$@"}
+PKGCONF="$topdir/package.conf.d"
+exec "$executablename" --global-conf "$PKGCONF" ${1+"$@"}
diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk
index d5ee062419..44b448d69a 100644
--- a/utils/ghc-pkg/ghc.mk
+++ b/utils/ghc-pkg/ghc.mk
@@ -100,8 +100,8 @@ install: install_utils/ghc-pkg_link
.PNONY: install_utils/ghc-pkg_link
install_utils/ghc-pkg_link:
- $(INSTALL_DIR) $(DESTDIR)$(bindir)
- "$(RM)" $(RM_OPTS) $(DESTDIR)$(bindir)/ghc-pkg
- $(LN_S) ghc-pkg-$(ProjectVersion) $(DESTDIR)$(bindir)/ghc-pkg
+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
+ "$(RM)" $(RM_OPTS) "$(DESTDIR)$(bindir)/ghc-pkg"
+ $(LN_S) ghc-pkg-$(ProjectVersion) "$(DESTDIR)$(bindir)/ghc-pkg"
endif
diff --git a/utils/runghc/ghc.mk b/utils/runghc/ghc.mk
index 8892ce0c82..a70e38a03b 100644
--- a/utils/runghc/ghc.mk
+++ b/utils/runghc/ghc.mk
@@ -32,7 +32,7 @@ install_runhaskell: install_bins
"$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext) $(DESTDIR)$(bindir)/runhaskell$(exeext)
else
install_runhaskell:
- "$(RM)" $(RM_OPTS) $(DESTDIR)$(bindir)/runhaskell
- $(LN_S) runghc $(DESTDIR)$(bindir)/runhaskell
+ "$(RM)" $(RM_OPTS) "$(DESTDIR)$(bindir)/runhaskell"
+ $(LN_S) runghc "$(DESTDIR)$(bindir)/runhaskell"
endif
diff --git a/utils/runghc/runghc.wrapper b/utils/runghc/runghc.wrapper
index 71b869cb54..9110dccacf 100644
--- a/utils/runghc/runghc.wrapper
+++ b/utils/runghc/runghc.wrapper
@@ -1,3 +1,3 @@
#!/bin/sh
-exec $executablename -f $bindir/ghc ${1+"$@"}
+exec "$executablename" -f "$bindir/ghc" ${1+"$@"}