- 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
-
-# This should rebuild the scripts if the input files change, although
-# it doesn't always seem to work.
-%.sh: %.sh.in
- cd .. && ./config.status appliance/$@
- chmod +x $@
-
-libguestfs-supermin-helper: libguestfs-supermin-helper.in
- cd .. && ./config.status appliance/$@
- chmod +x $@
-
-#----------------------------------------------------------------------
-# Extra rules for testing the appliance.
-
-# Test-boot the appliance.
-
-test-boot: emptydisk
- qemu-system-$(host_cpu) \
- -m 384 \
- -kernel $(VMLINUZ) -initrd $(INITRAMFSIMG) \
- -hda emptydisk
-
-emptydisk:
- rm -f emptydisk
- dd if=/dev/zero of=emptydisk bs=1024 count=1440
- echo 0, | sfdisk -q -C 80 -H 2 -S 18 emptydisk > /dev/null
-
-# This is a more realistic test boot command line which better
-# reflects what the library does.
+ cpp -undef -D$(DISTRO)=1 < $< | \
+ grep -v '^[[:space:]]*$$' | grep -v '^#' > $@-t
+ mv $@-t $@
+
+excludelist: excludelist.in
+ cpp -undef -D$(DISTRO)=1 < $< | \
+ grep -v '^[[:space:]]*$$' | grep -v '^#' > $@-t
+ mv $@-t $@
+
+supermin.d/base.img supermin.d/hostfiles: stamp-supermin
+stamp-supermin: make.sh packagelist excludelist
+ mkdir -p supermin.d
+ rm -f $@ supermin.d/base.img supermin.d/hostfiles
+ ./make.sh
+ touch $@