Skip to content

Commit

Permalink
Rarrange the distclean list; part of #7941
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Lynagh committed Jun 9, 2013
1 parent 96eca81 commit 4c49772
Showing 1 changed file with 41 additions and 7 deletions.
48 changes: 41 additions & 7 deletions ghc.mk
Expand Up @@ -1220,21 +1220,55 @@ clean_bindistprep:
$(call removeTrees,bindistprep/)

distclean : clean
$(call removeFiles,config.cache config.status config.log mk/config.h mk/stamp-h)
$(call removeFiles,mk/config.mk mk/are-validating.mk mk/project.mk)
$(call removeFiles,mk/config.mk.old mk/project.mk.old)
$(call removeFiles,settings docs/users_guide/ug-book.xml)
$(call removeFiles,compiler/ghc.cabal compiler/ghc.cabal.old)
# Clean the files that ./validate creates.
$(call removeFiles,mk/are-validating.mk)

# Clean the files that we ask ./configure to create.
$(call removeFiles,mk/config.mk)
$(call removeFiles,mk/install.mk)
$(call removeFiles,mk/project.mk)
$(call removeFiles,compiler/ghc.cabal)
$(call removeFiles,ghc/ghc-bin.cabal)
$(call removeFiles,utils/runghc/runghc.cabal)
$(call removeFiles,settings)
$(call removeFiles,docs/users_guide/ug-book.xml)
$(call removeFiles,docs/users_guide/ug-ent.xml)
$(call removeFiles,docs/index.html)
$(call removeFiles,libraries/prologue.txt)
$(call removeFiles,distrib/configure.ac)

# ./configure also makes these.
$(call removeFiles,mk/stamp-h)
$(call removeFiles,mk/config.h)

# Internal files generated by ./configure for itself.
$(call removeFiles,config.cache config.status config.log)

# ./configure build ghc-pwd in utils/ghc-pwd/dist-boot, so clean it up.
$(call removeTrees,utils/ghc-pwd/dist-boot)

# The root Makefile makes .old versions of some files that configure
# generates, so we clean those too.
$(call removeFiles,mk/config.mk.old)
$(call removeFiles,mk/project.mk.old)
$(call removeFiles,compiler/ghc.cabal.old)

# Clean the *Config.h files generated by library configure scripts
$(call removeFiles,libraries/base/include/HsBaseConfig.h)
$(call removeFiles,libraries/directory/include/HsDirectoryConfig.h)
$(call removeFiles,libraries/process/include/HsProcessConfig.h)
$(call removeFiles,libraries/unix/include/HsUnixConfig.h)
$(call removeFiles,libraries/old-time/include/HsTimeConfig.h)
$(call removeTrees,utils/ghc-pwd/dist-boot)

# The library configure scripts also like creating autom4te.cache
# directories, so clean them all up.
$(call removeTrees,$(patsubst %, libraries/%/autom4te.cache, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))

# Not sure why this is being cleaned here.
$(call removeTrees,includes/dist-derivedconstants)

# Finally, clean the inplace tree.
$(call removeTrees,inplace)
$(call removeTrees,$(patsubst %, libraries/%/autom4te.cache, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))

maintainer-clean : distclean
$(call removeFiles,configure mk/config.h.in)
Expand Down

0 comments on commit 4c49772

Please sign in to comment.