From 41dc7a7212fc13f17ae411498a774f5b8e8e5c03 Mon Sep 17 00:00:00 2001 From: Ross Churchley Date: Mon, 13 Jun 2016 19:55:11 -0700 Subject: [PATCH] Restore `make clean` functionality 80a513f3 escaped directory and file names to avoid removing unrelated directories due to spaces in path names. However, this breaks clean-cache (since the wildcard * should not be escaped) and clean-sty (since the spaces in $(PACKAGE_STY) actually do indicate different files). This change reverts the change to clean-sty and provides a workaround to clean-cache to avoid wildcards. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index cef3def..bd1e6c9 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,10 @@ uninstall: @rmdir "$(DOC_DIR)" clean-cache: - @rm -f "$(CACHE_DIR)/*" + @rm -rf "$(CACHE_DIR)" clean-sty: - @rm -f "$(PACKAGE_STY)" + @rm -f $(PACKAGE_STY) ctan: $(CTAN_CONTENT) ctan-version @tar --transform "s@\(.*\)@metropolis/\1@" -cf metropolis-$(shell date "+%Y-%m-%d").tar.gz $(CTAN_CONTENT) @@ -58,15 +58,15 @@ ctan-version: $(CACHE_DIR): @mkdir -p $(CACHE_DIR) -$(PACKAGE_STY): $(PACKAGE_SRC) $(INS) | $(CACHE_DIR) clean-cache +$(PACKAGE_STY): $(PACKAGE_SRC) $(INS) | clean-cache $(CACHE_DIR) @cd $(dir $(INS)) && latex -output-directory=$(CACHE_DIR) $(notdir $(INS)) @cp $(addprefix $(CACHE_DIR)/,$(PACKAGE_STY)) . -$(DOC_PDF): $(DOC_SRC) $(PACKAGE_STY) | $(CACHE_DIR) clean-cache +$(DOC_PDF): $(DOC_SRC) $(PACKAGE_STY) | clean-cache $(CACHE_DIR) @cd $(dir $(DOC_SRC)) && $(COMPILE_TEX) $(notdir $(DOC_SRC)) @cp $(CACHE_DIR)/$(notdir $(DOC_PDF)) $(DOC_PDF) -$(DEMO_PDF): $(DEMO_SRC) $(PACKAGE_STY) | $(CACHE_DIR) clean-cache +$(DEMO_PDF): $(DEMO_SRC) $(PACKAGE_STY) | clean-cache $(CACHE_DIR) @cd $(dir $(DEMO_SRC)) && $(COMPILE_TEX) $(notdir $(DEMO_SRC)) @cp $(CACHE_DIR)/$(notdir $(DEMO_PDF)) $(DEMO_PDF)