Makefile: image, stage4: clean up after oneself
Make these targets that have temporary targets/mount-points clean up after themselves.
This commit is contained in:
parent
1fe98b6b7c
commit
9aecaedcd6
8
Makefile
8
Makefile
|
@ -319,6 +319,7 @@ endif
|
||||||
rmdir loop
|
rmdir loop
|
||||||
sync
|
sync
|
||||||
losetup --detach `cat partitions`
|
losetup --detach `cat partitions`
|
||||||
|
rm -f partitions device-map
|
||||||
|
|
||||||
$(QCOW_IMAGE): image
|
$(QCOW_IMAGE): image
|
||||||
@scripts/echo Creating $(QCOW_IMAGE)
|
@scripts/echo Creating $(QCOW_IMAGE)
|
||||||
|
@ -340,7 +341,7 @@ $(VMDK_IMAGE): image
|
||||||
|
|
||||||
vmdk: $(VMDK_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)
|
@scripts/echo Creating stage4 tarball: $(STAGE4_TARBALL)
|
||||||
mkdir -p stage4
|
mkdir -p stage4
|
||||||
mkdir -p gentoo
|
mkdir -p gentoo
|
||||||
|
@ -350,6 +351,9 @@ stage4: software kernel configs/rsync-excludes configs/rsync-excludes-critical g
|
||||||
rmdir gentoo
|
rmdir gentoo
|
||||||
mv "$(STAGE4_TARBALL).tmp.xz" "$(STAGE4_TARBALL)"
|
mv "$(STAGE4_TARBALL).tmp.xz" "$(STAGE4_TARBALL)"
|
||||||
|
|
||||||
|
stage4: build_stage4 clean
|
||||||
|
|
||||||
|
|
||||||
$(STAGE4_TARBALL):
|
$(STAGE4_TARBALL):
|
||||||
stage4
|
stage4
|
||||||
|
|
||||||
|
@ -366,7 +370,7 @@ endif
|
||||||
|
|
||||||
remove_checkpoints:
|
remove_checkpoints:
|
||||||
rm -f mounts compile_options base_system portage sync_portage
|
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
|
clean: umount remove_checkpoints
|
||||||
rm -f umount
|
rm -f umount
|
||||||
|
|
Loading…
Reference in New Issue