X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=Makefile;h=edc04334c47ddd7c1c6cc9fc8cc56aa4f74c8193;hp=07c8175b26bdbd3618136a3de9b69338ff68e4d3;hb=3c506a6cb7a260a93f0ac272a6a3612c5586a5e1;hpb=fd96f0f738a243a4e5964aa36753ec6c28f2444a diff --git a/Makefile b/Makefile index 07c8175..edc0433 100644 --- a/Makefile +++ b/Makefile @@ -72,10 +72,15 @@ check-packages : @for d in `cat libraries/core-packages`; do \ if test ! -d libraries/$$d; then \ echo "Looks like you're missing libraries/$$d,"; \ - echo "maybe you haven't done 'sh darcs-all get'?"; \ + echo "Did you run 'sh boot' at the top level?"; \ exit 1; \ fi \ done + @if test ! -e libraries/base/configure; then \ + echo "Looks like you're missing base's configure script."; \ + echo "Did you run 'sh boot' at the top level?"; \ + exit 1; \ + fi stage1 : check-packages $(MAKE) -C utils/mkdependC boot @@ -389,20 +394,34 @@ $(BINARY_DIST_LIBRARY_RULES): binary-dist-lib-%: \( \( -name "*.o" -o -name "*.p_o" \) -a \! -name "HS*" \) \ -exec rm {} \; +# Jiggle the files around to make a valid Windows distribution if necessary +ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32" +binary-dist :: fiddle-binary-dist +endif + +.PHONY: fiddle-binary-dist +fiddle-binary-dist: + cd $(BIN_DIST_DIR) && ../distrib/prep-bin-dist-mingw # Tar up the distribution and build a manifest -binary-dist :: +binary-dist :: tar-binary-dist + +.PHONY: tar-binary-dist +tar-binary-dist: ( cd $(BIN_DIST_TOPDIR); tar cf - $(BIN_DIST_NAME) | bzip2 >$(BIN_DIST_TARBALL) ) ( cd $(BIN_DIST_TOPDIR); bunzip2 -c $(BIN_DIST_TARBALL) | tar tf - | sed "s/^ghc-$(ProjectVersion)/fptools/" | sort >bin-manifest-$(ProjectVersion) ) # Upload the distribution and documentation ifneq "$(PublishLocation)" "" -binary-dist :: +binary-dist :: publish-binary-dist +endif + +.PHONY: publish-binary-dist +publish-binary-dist : @for i in 0 1 2 3 4 5 6 7 8 9; do \ echo "Try $$i: $(PublishCp) $(BIN_DIST_TARBALL) $(PublishLocation)"; \ if $(PublishCp) $(BIN_DIST_TARBALL) $(PublishLocation); then break; fi\ done $(PublishCp) -r $(BIN_DIST_DIR)/share/html/* $(PublishLocation)/docs -endif binary-dist::