Rearrange the clean target so we dont recursively delete things

pull/30/head
Hamish Coleman 7 years ago
parent 0c7ebb04e4
commit 8eb3d4f571

@ -33,15 +33,16 @@ list_laptops:
.PHONY: list_laptops .PHONY: list_laptops
DEPSDIR := .d DEPSDIR := .d
$(shell mkdir -p $(DEPSDIR))
# Remove all the locally generated junk (including any patched firmware # Remove all the locally generated junk (including any patched firmware
# images) and any small downloads # images) and any small downloads
clean: 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.enc.orig *.img.orig *.bat \
*.img \ *.img \
*.txt.orig *.txt.orig
rm -rf $(DEPSDIR)
# Also remove the large iso images downloaded from remote servers. # Also remove the large iso images downloaded from remote servers.
really_clean: clean really_clean: clean
@ -158,12 +159,14 @@ define patch_disable
$(call patch_mv,$1,$1.OFF) $(call patch_mv,$1,$1.OFF)
endef endef
$(shell mkdir -p $(DEPSDIR))
-include $(DEPSDIR)/slice.extract.deps -include $(DEPSDIR)/slice.extract.deps
CLEAN_FILES += $(DEPSDIR)/slice.extract.deps
$(DEPSDIR)/slice.extract.deps: Makefile $(DEPSDIR)/slice.extract.deps: Makefile
for i in *.slice; do read SLICEE other <$$i; echo $$i: $$SLICEE; done >$@.tmp for i in *.slice; do read SLICEE other <$$i; echo $$i: $$SLICEE; done >$@.tmp
mv $@.tmp $@ mv $@.tmp $@
-include $(DEPSDIR)/slice.insert.deps -include $(DEPSDIR)/slice.insert.deps
CLEAN_FILES += $(DEPSDIR)/slice.insert.deps
$(DEPSDIR)/slice.insert.deps: Makefile $(DEPSDIR)/slice.insert.deps: Makefile
for i in *.slice; do read SLICEE other <$$i; echo `basename $$SLICEE .orig`: $$i `basename $$i .slice`; done >$@.tmp for i in *.slice; do read SLICEE other <$$i; echo `basename $$SLICEE .orig`: $$i `basename $$i .slice`; done >$@.tmp
mv $@.tmp $@ mv $@.tmp $@

Loading…
Cancel
Save