From 8eb3d4f5715a50badfff735718e5a27a09da1674 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Fri, 23 Jun 2017 09:23:11 +0800 Subject: [PATCH] Rearrange the clean target so we dont recursively delete things --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e8c92cf..09787b0 100644 --- a/Makefile +++ b/Makefile @@ -33,15 +33,16 @@ list_laptops: .PHONY: list_laptops DEPSDIR := .d +$(shell mkdir -p $(DEPSDIR)) # Remove all the locally generated junk (including any patched firmware # images) and any small downloads clean: - rm -f patched.*.iso patched.*.img *.FL2 *.FL2.orig *.img.enc \ + rm -f $(CLEAN_FILES) \ + patched.*.iso patched.*.img *.FL2 *.FL2.orig *.img.enc \ *.img.enc.orig *.img.orig *.bat \ *.img \ *.txt.orig - rm -rf $(DEPSDIR) # Also remove the large iso images downloaded from remote servers. really_clean: clean @@ -158,12 +159,14 @@ define patch_disable $(call patch_mv,$1,$1.OFF) endef -$(shell mkdir -p $(DEPSDIR)) -include $(DEPSDIR)/slice.extract.deps +CLEAN_FILES += $(DEPSDIR)/slice.extract.deps $(DEPSDIR)/slice.extract.deps: Makefile for i in *.slice; do read SLICEE other <$$i; echo $$i: $$SLICEE; done >$@.tmp mv $@.tmp $@ + -include $(DEPSDIR)/slice.insert.deps +CLEAN_FILES += $(DEPSDIR)/slice.insert.deps $(DEPSDIR)/slice.insert.deps: Makefile for i in *.slice; do read SLICEE other <$$i; echo `basename $$SLICEE .orig`: $$i `basename $$i .slice`; done >$@.tmp mv $@.tmp $@