X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc.mk;h=705e8528c264615b0c5b0d24dbbdc908cee39d02;hb=ac011c456a0b91a7596fbd40c676655ed1284575;hp=8f2737dd63d311514ddd33a6ace6d29966b822fc;hpb=883d980815437736c486bf69b2f066ef918d2989;p=ghc-hetmet.git diff --git a/ghc.mk b/ghc.mk index 8f2737d..705e852 100644 --- a/ghc.mk +++ b/ghc.mk @@ -39,8 +39,6 @@ # # * per-source-file dependencies instead of one .depend file? # * eliminate undefined variables, and use --warn-undefined-variables? -# * perhaps we should make all the output dirs in the .depend rule, to -# avoid all these mkdirhier calls? # * put outputs from different ways in different subdirs of distdir/build, # then we don't have to use -osuf/-hisuf. We would have to install # them in different places too, so we'd need ghc-pkg support for packages @@ -405,6 +403,9 @@ endif # ----------------------------------------------------------------------------- # Directories +# Don't try to delete directories: +.PRECIOUS: %/. + %/. : $(MKDIRHIER) "$(MKDIRHIER)" $@ @@ -892,8 +893,8 @@ endif BIN_DIST_MK = $(BIN_DIST_PREP_DIR)/bindist.mk unix-binary-dist-prep: - "$(RM)" $(RM_OPTS) -r bindistprep/* - mkdir $(BIN_DIST_PREP_DIR) + "$(RM)" $(RM_OPTS) -r bindistprep/ + "$(MKDIRHIER)" $(BIN_DIST_PREP_DIR) set -e; for i in LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK) echo "LATEX_DOCS = $(LATEX_DOCS)" >> $(BIN_DIST_MK) @@ -908,12 +909,12 @@ unix-binary-dist-prep: cd bindistprep && "$(TAR)" hcf - -T ../$(BIN_DIST_LIST) | bzip2 -c > ../$(BIN_DIST_PREP_TAR_BZ2) windows-binary-dist-prep: - "$(RM)" $(RM_OPTS) -r bindistprep/* + "$(RM)" $(RM_OPTS) -r bindistprep/ $(MAKE) prefix=$(TOP)/$(BIN_DIST_PREP_DIR) install cd bindistprep && "$(TAR)" cf - $(BIN_DIST_NAME) | bzip2 -c > ../$(BIN_DIST_PREP_TAR_BZ2) windows-installer: - "$(ISCC)" /O. /F$(WINDOWS_INSTALLER_BASE) - < distrib/ghc.iss + "$(ISCC)" /O. /Fbindistprep/$(WINDOWS_INSTALLER_BASE) - < distrib/ghc.iss nTimes = set -e; for i in `seq 1 $(1)`; do echo Try "$$i: $(2)"; if $(2); then break; fi; done @@ -1069,6 +1070,11 @@ $(foreach lib,$(PACKAGES) $(PACKAGES_STAGE2),\ $(eval $(call clean-target,libraries/$(lib),dist-install,libraries/$(lib)/dist-install))) endif +clean : clean_bindistprep +.PHONY: clean_bindistprep +clean_bindistprep: + "$(RM)" $(RM_OPTS) -r bindistprep/ + distclean : clean "$(RM)" $(RM_OPTS) config.cache config.status config.log mk/config.h mk/stamp-h "$(RM)" $(RM_OPTS) mk/config.mk mk/are-validating.mk mk/project.mk