From 9aecaedcd63216056ee8beecb21069ede6f324fc Mon Sep 17 00:00:00 2001 From: Albert Hopkins Date: Sat, 30 Aug 2014 18:12:04 +0000 Subject: [PATCH] Makefile: image, stage4: clean up after oneself Make these targets that have temporary targets/mount-points clean up after themselves. --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c4f1fca..7fd1a06 100644 --- a/Makefile +++ b/Makefile @@ -319,6 +319,7 @@ endif rmdir loop sync losetup --detach `cat partitions` + rm -f partitions device-map $(QCOW_IMAGE): image @scripts/echo Creating $(QCOW_IMAGE) @@ -340,7 +341,7 @@ $(VMDK_IMAGE): image vmdk: $(VMDK_IMAGE) -stage4: software kernel configs/rsync-excludes configs/rsync-excludes-critical grub +build_stage4: software kernel configs/rsync-excludes configs/rsync-excludes-critical grub @scripts/echo Creating stage4 tarball: $(STAGE4_TARBALL) mkdir -p stage4 mkdir -p gentoo @@ -350,6 +351,9 @@ stage4: software kernel configs/rsync-excludes configs/rsync-excludes-critical g rmdir gentoo mv "$(STAGE4_TARBALL).tmp.xz" "$(STAGE4_TARBALL)" +stage4: build_stage4 clean + + $(STAGE4_TARBALL): stage4 @@ -366,7 +370,7 @@ endif remove_checkpoints: rm -f mounts compile_options base_system portage sync_portage - rm -f parted kernel grub stage3 software preproot sysconfig systools partitions device-map + rm -f parted kernel grub stage3 software preproot sysconfig systools clean: umount remove_checkpoints rm -f umount