+kmod.whitelist: kmod.whitelist.in
+ grep -v '^[[:space:]]*$$' < $< | grep -v '^#' > $@
+
+packagelist: packagelist.in
+ cpp -undef -D$(DIST)=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 symlinks needed by the Debian appliance.
+debirf_symlinks = \
+ a0_prep-root \
+ z0_remove-aptitude \
+ z0_remove-locales \
+ z1_clean-root
+noinst_DATA = $(debirf_symlinks:%=debian/modules/%)
+$(debirf_symlinks:%=debian/modules/%): stamp-debirf-modules
+stamp-debirf-modules:
+ mkdir -p debian/modules
+ for f in $(debirf_symlinks); do \
+ ln -sf /usr/share/debirf/modules/$$f debian/modules/$$f; \
+ done
+ touch $@
+
+#----------------------------------------------------------------------
+# Extra rules for testing the appliance.