Split XARGS into XARGS and XARGS_OPTS
[ghc-hetmet.git] / rts / ghc.mk
index 60fb620..a667ac3 100644 (file)
@@ -114,7 +114,7 @@ $$(rts_$1_LIB) : $$(rts_$1_OBJS) rts/libs.depend
 else
 $$(rts_$1_LIB) : $$(rts_$1_OBJS)
        "$$(RM)" $$(RM_OPTS) $$@
-       echo $$(rts_$1_OBJS) | $$(XARGS) $$(AR) $$(EXTRA_AR_ARGS) $$@
+       echo $$(rts_$1_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@
 endif
 
 endef
@@ -334,7 +334,7 @@ $(DYNWRAPPER_PROG): $(DYNWRAPPER_SRC)
 # build the static lib containing the C main symbol
 
 rts/dist/build/libHSrtsmain.a : rts/dist/build/Main.o
-       $(AR) $(EXTRA_AR_ARGS) $@ $<
+       "$(AR)" $(AR_OPTS) $(EXTRA_AR_ARGS) $@ $<
 
 # -----------------------------------------------------------------------------
 # The RTS package config
@@ -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