-# First we need to decide which files go in and out of the supermin
-# appliance. This decision is made by 'supermin-split.sh'.
-$(SUPERMINFILES): supermin.incfiles
-supermin.incfiles: $(top_builddir)/initramfs/fakeroot.log $(top_builddir)/daemon/guestfsd supermin-split.sh
- rm -f supermin.incfiles $(SUPERMINFILES)
- bash supermin-split.sh
-
-# Second we need to create a supermin appliance with just the included
-# files (leaving out the host files, which we'll add back at runtime).
-$(SUPERMINIMG): supermin.incfiles supermin-make.sh
- rm -f $@
- bash supermin-make.sh
+supermin.d/base.img supermin.d/hostfiles: stamp-supermin
+stamp-supermin: $(INITRAMFSIMG)
+ mkdir -p supermin.d
+ rm -f $@ supermin.d/base.img supermin.d/hostfiles
+ febootstrap-to-supermin $(top_builddir)/initramfs supermin.d/base.img supermin.d/hostfiles
+ touch $@