`make maintainer-clean` removes a version-controlled file
On GHC HEAD (as commit 52f755aa), running make maintainer-clean
will mistakenly remove the version-controlled file libraries/ghc-boot/ghc.mk
. (Yes, that is supposed to be version-controlled—see commit 24782b89, which made this so.) This causes havoc if you then try to rebuild GHC, since it will be missing some critical logic contained in that file.
The culprit is this part of ghc.mk
:
maintainer-clean : distclean
...
$(call removeFiles,$(patsubst %, libraries/%/ghc.mk, $(PACKAGES_STAGE1) $(PACKAGES_STAGE2)))
Once upon a time, it was probably a safe assumption to remove all ghc.mk
files under libraries/%
. But as of commit 24782b89, that assumption no longer holds true, so we should update this line accordingly.