Tweak the cleaning of inplace/; fixes trac #4320
authorIan Lynagh <igloo@earth.li>
Sun, 5 Dec 2010 21:20:48 +0000 (21:20 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 5 Dec 2010 21:20:48 +0000 (21:20 +0000)
configure.ac
ghc.mk

index b943d4d..28a5875 100644 (file)
@@ -387,6 +387,8 @@ FP_FIND_ROOT
 
 if test "$HostOS" = "mingw32"
 then
+    test -d inplace || mkdir inplace
+
     CC="$hardtop/inplace/mingw/bin/gcc.exe"
     LD="$hardtop/inplace/mingw/bin/ld.exe"
     NM="$hardtop/inplace/mingw/bin/nm.exe"
@@ -404,7 +406,6 @@ then
     then
         AC_MSG_NOTICE([Making in-tree mingw tree])
         rm -rf inplace/mingw
-        test -d inplace || mkdir inplace
         mkdir inplace/mingw
         (
             cd inplace/mingw &&
diff --git a/ghc.mk b/ghc.mk
index 1fd8509..e7ae4d3 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -155,7 +155,7 @@ include rules/clean-target.mk
 # -----------------------------------------------------------------------------
 # The inplace tree
 
-$(eval $(call clean-target,inplace,,inplace))
+$(eval $(call clean-target,inplace,,inplace/bin inplace/lib))
 
 # -----------------------------------------------------------------------------
 # Whether to build dependencies or not
@@ -1254,6 +1254,7 @@ distclean : clean
        "$(RM)" $(RM_OPTS) libraries/unix/include/HsUnixConfig.h
        "$(RM)" $(RM_OPTS) libraries/old-time/include/HsTimeConfig.h
        "$(RM)" $(RM_OPTS_REC) utils/ghc-pwd/dist
+       "$(RM)" $(RM_OPTS_REC) inplace
 
        "$(RM)" $(RM_OPTS) $(patsubst %, libraries/%/config.log, $(PACKAGES) $(PACKAGES_STAGE2))
        "$(RM)" $(RM_OPTS) $(patsubst %, libraries/%/config.status, $(PACKAGES) $(PACKAGES_STAGE2))