Fix build on cygwin: Normalise slashes in .depend files to be /
[ghc-hetmet.git] / rules / build-package-way.mk
index 735527c..a1930b1 100644 (file)
@@ -60,7 +60,7 @@ $$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS)
          `$$($1_$2_$3_MKSTUBOBJS)` \
          -shared -dynamic -dynload deploy \
         $$(addprefix -l,$$($1_$2_EXTRA_LIBRARIES)) \
-         -no-auto-link-packages $$(addprefix -package,$$($1_$2_DEPS)) \
+         -no-auto-link-packages $$(addprefix -package ,$$($1_$2_DEPS)) \
          -o $$@
 else
 $$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS)
@@ -68,7 +68,7 @@ $$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS)
          `$$($1_$2_$3_MKSTUBOBJS)` \
          -shared -dynamic -dynload deploy \
             -dylib-install-name $(ghclibdir)/`basename "$$@" | sed 's/^libHS//;s/[-]ghc.*//'`/`basename "$$@"` \
-         -no-auto-link-packages $$(addprefix -package,$$($1_$2_DEPS)) \
+         -no-auto-link-packages $$(addprefix -package ,$$($1_$2_DEPS)) \
          -o $$@
 endif
 else
@@ -81,7 +81,11 @@ ifeq "$$($1_$2_SplitObjs)" "YES"
 else
        echo $$($1_$2_$3_ALL_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` >> $$@.contents
 endif
+ifeq "$$(ArSupportsAtFile)" "YES"
        "$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ @$$@.contents
+else
+       "$$(XARGS)" $$(XARGS_OPTS) "$$(AR)" $$(AR_OPTS) $$(EXTRA_AR_ARGS) $$@ < $$@.contents
+endif
        "$$(RM)" $$(RM_OPTS) $$@.contents
 endif