+kmod.whitelist: kmod.whitelist.in
+ grep -v '^[[:space:]]*$$' < $< | grep -v '^#' > $@
+
+packagelist: packagelist.in
+ cpp -undef -DREDHAT=1 < $< | \
+ grep -v '^[[:space:]]*$$' | grep -v '^#' > $@
+
+# This is for building the supermin appliance. It has to be enabled
+# specifically with './configure --enable-supermin'. You really need
+# to read the README file.
+
+if SUPERMIN
+
+# 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
+
+endif
+
+#----------------------------------------------------------------------
+# Extra rules for testing the appliance.