diff --git a/Makefile b/Makefile index 04b05bb..dc1639e 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ $(MAKEPAGES): make-pages/*.hs make-pages/make-pages.cabal $(TMPDIR)/index.mk: $(DATADIR)/index.yaml $(YAMLS) $(MAKEPAGES) $(call depend-gallery) +ifneq ($(MAKECMDGOALS),mostlyclean) ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),distclean) ifneq ($(MAKECMDGOALS),list-tags) @@ -68,15 +69,19 @@ ifneq ($(MAKECMDGOALS),list-tags) endif endif endif +endif -.PHONY: clean distclean -clean: - echo "[clean]" - rm -rf $(BUILDDIR) $(TMPDIR) +.PHONY: mostlyclean clean distclean +mostlyclean: + echo "[clean $(BUILDDIR)]" + rm -rf $(BUILDDIR) +clean: mostlyclean + echo "[clean $(TMPDIR)]" + rm -rf $(TMPDIR) distclean: clean - echo "[distclean]" - rm -rf dist-newstyle + echo "[cabal clean]" + cabal -v0 v2-clean .PHONY: list-tags