make: don't get too upset on clean
authorNikita Shubin <maquefel@gmail.com>
Sun, 28 Jul 2019 11:21:33 +0000 (14:21 +0300)
committerNikita Shubin <maquefel@gmail.com>
Thu, 1 Aug 2019 12:53:54 +0000 (15:53 +0300)
Makefile

index a3b8703482ed95c5b1aa0e35ac7d1d229fcc0ea6..42985989640f6d86b0d4c65e8017a2a59030dad2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -105,9 +105,6 @@ ${SYSROOT}/init:    scripts/init | ${SYSROOT}
 ${SYSROOT}/loginroot:  scripts/loginroot | ${SYSROOT}
        install -m 755 $< $@
 
-distclean::
-       rm -rf ${SYSROOT}
-
 # --- busybox
 
 build-busybox:
@@ -131,10 +128,16 @@ ${SYSROOT}/bin/busybox:   build-busybox/busybox | populate-dirs
 .install-busybox : ${SYSROOT}/bin/busybox
 
 clean::
-       make -C build-busybox ARCH=${TARGET_ARCH} clean
+       -make -C build-busybox ARCH=${TARGET_ARCH} clean
 
 distclean::
        rm -rf build-busybox
 
 initramfs.cpio.xz: ${SYSROOT}/bin/busybox ${SYSROOT}/loginroot ${SYSROOT}/init ${SYSROOT}/etc/inittab ${SYSROOT}/etc/group ${SYSROOT}/etc/passwd
        (cd ${SYSROOT} && find . -print0 | cpio --null -ov --format=newc | xz -C crc32 > ../initramfs.cpio.xz)
+
+clean::
+       -rm -rf initramfs.cpio.xz
+
+distclean::
+       rm -rf ${SYSROOT}